/* === ROOT VARIABLES & GLOBAL RESETS === */
:root {
    --bg-dark: #0A0A10;
    --bg-light: #1A1A24;
    --primary-accent: #33A1FF;
    --secondary-accent: #E53935;
    --text-light: #EAEAEA;
    --text-dark: #8A8A8A;
    --border-color: rgba(255, 255, 255, 0.1);
    --border-radius: 14px;
    --shadow-color: rgba(51, 161, 255, 0.2);
    --shadow-intense: rgba(51, 161, 255, 0.4);
    --gold-color: #FFD700;
    --silver-color: #C0C0C0;
    --bronze-color: #CD7F32;
    --noise-texture: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><filter id="n"><feTurbulence type="fractalNoise" baseFrequency="0.75" numOctaves="3" stitchTiles="stitch"/></filter><rect width="100" height="100" filter="url(%23n)" opacity="0.05"/></svg>');
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-light);
    padding-top: 70px; 
    position: relative;
    background-image: url('https://images.unsplash.com/photo-1582447151295-0a5749443502?q=80&w=2070&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(rgba(10, 10, 16, 0.8), rgba(10, 10, 16, 0.95)), var(--noise-texture);
    z-index: -1;
    pointer-events: none;
}
ul { list-style: none; }
a { text-decoration: none; color: var(--text-light); transition: color 0.3s ease; }
a:hover { color: var(--primary-accent); }

/* === ANIMATIONS & TRANSITIONS === */
.modern-button, .card-dark, .login-btn, .buy-btn, .sidebar-menu a, .dash-card, .shop-item, .rank-item, .ruler-card, .event-card, .modal-overlay {
    transition: all 0.3s ease-in-out;
}

/* === MODERN BUTTON STYLE === */
.modern-button, .login-btn, .buy-btn, .event-button {
    background: var(--primary-accent);
    color: white;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    border: none;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.modern-button:hover, .login-btn:hover, .buy-btn:hover, .event-button:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px var(--shadow-intense);
}

/* === HEADER & NAVIGATION (MOBILE-FIRST) === */
.modern-header-dark {
    background: rgba(10, 10, 16, 0.75);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.modern-nav-dark { display: flex; justify-content: space-between; align-items: center; height: 100%; padding: 0 20px; }
.nav-logo a { font-size: 26px; font-weight: 700; letter-spacing: 1px; color: var(--primary-accent); }
.nav-toggle { display: block; background: none; border: none; color: var(--text-light); font-size: 28px; cursor: pointer; }
.nav-toggle .fa-times { display: none; }
.modern-header-dark.nav-open .nav-toggle .fa-bars { display: none; }
.modern-header-dark.nav-open .nav-toggle .fa-times { display: block; }

.nav-right {
    display: none; flex-direction: column; align-items: center; position: absolute;
    top: 70px; left: 0; width: 100%; background: rgba(10, 10, 16, 0.95); padding: 40px 0;
}
.modern-header-dark.nav-open .nav-right { display: flex; }
.nav-menu-modern { display: flex; flex-direction: column; align-items: center; gap: 30px; margin-bottom: 30px; }
.nav-menu-modern a { font-size: 20px; font-weight: 500; }
.nav-actions { display: flex; flex-direction: column; align-items: center; gap: 20px; }

/* === MAIN CONTENT (INDEX PAGE) === */
.hero-dark { display: flex; align-items: center; justify-content: center; text-align: center; min-height: calc(100vh - 70px); padding: 0 20px; }
.hero-content h1 { font-size: 3rem; font-weight: 700; margin-bottom: 1rem; text-shadow: 0 0 15px var(--shadow-intense), 0 0 25px var(--shadow-intense); animation: fade-in-down 1s ease-out; }
.hero-content h2 { font-size: 1.2rem; max-width: 600px; margin: 0 auto 2.5rem auto; color: var(--text-dark); animation: fade-in-up 1s ease-out; line-height: 1.6; }

.download-btn-dark {
    background: var(--primary-accent); color: #FFF; padding: 15px 35px; border-radius: 50px;
    font-weight: bold; font-size: 1.1rem; display: inline-flex; align-items: center; gap: 12px;
    box-shadow: 0 5px 20px var(--shadow-color); animation: bounce-in 1.2s ease-out; transition: all 0.3s ease;
}
.download-btn-dark:hover { transform: translateY(-4px); box-shadow: 0 8px 30px var(--shadow-intense); }

.download-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.features-dark, .monster-rank-section, .throne-rulers-section, .activity-section { padding: 100px 20px; text-align: center; }
.features-dark h2, .monster-rank-section .section-title, .activity-section .section-title { font-size: 2.8rem; margin-bottom: 60px; animation: fade-in 1s ease-out; }
.throne-rulers-section .section-title { font-size: 2.8rem; margin-bottom: 60px; font-weight: 700; color: var(--text-light); text-shadow: none; }

.feature-cards { display: flex; flex-direction: column; gap: 40px; align-items: center; }

.card-dark {
    background-color: var(--bg-light); border: 1px solid var(--border-color); padding: 40px 30px;
    border-radius: var(--border-radius); width: 100%; max-width: 360px;
    animation: zoom-in 0.8s ease-out; box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.card-dark:hover { transform: translateY(-10px); box-shadow: 0 15px 40px rgba(0,0,0,0.4); border-color: var(--primary-accent); }
.card-icon { font-size: 2.8rem; color: var(--primary-accent); margin-bottom: 25px; }
.card-dark h3 { font-size: 1.6rem; margin-bottom: 1rem; }
.card-dark p { color: var(--text-dark); line-height: 1.7; }

/* === MONSTER RANK SECTION === */
.monster-rank-section .section-title { margin-bottom: 40px; }
.rank-list { max-width: 800px; margin: 0 auto; display: flex; flex-direction: column; gap: 15px; }
.rank-item {
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    padding: 15px 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}
.rank-item:hover { transform: scale(1.03); box-shadow: 0 8px 25px rgba(0,0,0,0.4); border-color: var(--primary-accent); }

.rank-number { font-size: 1.5rem; font-weight: 700; color: var(--text-dark); width: 50px; }
.rank-avatar img { width: 50px; height: 50px; border-radius: 50%; margin-right: 20px; border: 2px solid var(--border-color); }
.rank-name { font-size: 1.2rem; font-weight: 600; flex-grow: 1; text-align: left; }
.rank-kills { font-size: 1.1rem; color: var(--primary-accent); font-weight: 600; }
.rank-medal { font-size: 1.8rem; margin-left: 20px; }

.top-rank-1 { border-left: 5px solid var(--gold-color); }
.top-rank-1 .rank-medal { color: var(--gold-color); }

.top-rank-2 { border-left: 5px solid var(--silver-color); }
.top-rank-2 .rank-medal { color: var(--silver-color); }

.top-rank-3 { border-left: 5px solid var(--bronze-color); }
.top-rank-3 .rank-medal { color: var(--bronze-color); }

/* === THRONE RULERS SECTION (TRIANGLE LAYOUT) === */
.throne-room { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.king-container { margin-bottom: 30px; }
.ministers-container { display: flex; flex-wrap: wrap; justify-content: center; gap: 30px; }

.ruler-card {
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 30px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
    width: 320px;
}
.ruler-card:hover { transform: translateY(-10px); box-shadow: 0 15px 40px rgba(0,0,0,0.4); }

.ruler-card-king {
    border-color: var(--gold-color);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
.ruler-card-king:hover { 
    transform: translateY(-10px); 
    box-shadow: 0 15px 40px rgba(0,0,0,0.5);
}

.ruler-card-minister:hover {
    border-color: var(--primary-accent);
}

.ruler-avatar img { width: 120px; height: 120px; border-radius: 50%; border: 4px solid var(--primary-accent); margin-bottom: 20px; }
.ruler-card-king .ruler-avatar img { border-color: var(--gold-color); }

.ruler-name { font-size: 1.8rem; font-weight: 700; margin-bottom: 10px; }
.ruler-kingdom { font-size: 1rem; color: var(--text-dark); margin-bottom: 5px; }
.ruler-title { font-size: 1.1rem; color: var(--primary-accent); font-weight: 600; }
.ruler-icon { position: absolute; top: 20px; right: 20px; font-size: 2.5rem; color: var(--gold-color); opacity: 0.9; transition: color 0.3s ease; }

/* === MODAL STYLES === */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}
.modal-content {
    background-color: #1E1E2E;
    border-radius: 12px;
    padding: 30px;
    width: 90%;
    max-width: 500px;
    text-align: center;
    color: #EAEAEA;
    position: relative;
}
.modal-content h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 25px;
}

.modal-buttons-inline {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.modal-download-link {
    color: #EAEAEA;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.modal-download-link:hover {
    background-color: #33A1FF;
}

.modal-download-link i {
    font-size: 1.3rem;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}
.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: var(--text-dark);
    font-size: 28px;
    cursor: pointer;
    transition: color 0.3s ease;
}
.modal-close-btn:hover { color: var(--text-light); }

/* === NEW MODAL STYLES === */
.modal-content-new {
    background-color: #1E1E2E;
    border: 1px solid #3A3A5A;
    border-radius: 12px;
    width: 90%;
    max-width: 420px;
    text-align: center;
    color: #EAEAEA;
    font-family: 'Poppins', sans-serif;
    position: relative;
    overflow: hidden;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #3A3A5A;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
}

.modal-header p {
    margin: 4px 0 0;
    font-size: 0.9rem;
    color: #8A8A8A;
}

.modal-body-new {
    padding: 40px 20px;
}

.game-logo {
    width: 100%;
    max-width: 320px;
    height: auto;
    margin-bottom: 30px;
}

.progress-bar-container {
    background-color: #12121A;
    border-radius: 5px;
    height: 10px;
    margin-bottom: 10px;
    overflow: hidden;
}

.progress-bar {
    background-color: #33A1FF;
    width: 60%; /* Example progress */
    height: 100%;
    border-radius: 5px;
}

.loading-text {
    font-size: 0.9rem;
    color: #8A8A8A;
    letter-spacing: 1px;
}

.modal-footer-new {
    padding: 20px;
    border-top: 1px solid #3A3A5A;
    background-color: #12121A;
}

.download-link {
    color: #EAEAEA;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
}

.download-link i {
    font-size: 1.3rem;
}


/* === ACTIVITY / EVENT PAGE === */
.event-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 40px; max-width: 1200px; margin: 0 auto; }
.event-card {
    background-color: var(--bg-light);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.event-card:hover { transform: translateY(-10px); box-shadow: 0 20px 40px rgba(0,0,0,0.5); border-color: var(--primary-accent); }

.event-image { position: relative; }
.event-image img { width: 100%; height: 200px; object-fit: cover; }
.event-date-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: rgba(0,0,0,0.7);
    color: white;
    border-radius: 8px;
    padding: 8px 12px;
    text-align: center;
    font-weight: 700;
    line-height: 1;
}
.event-date-badge span:first-child { font-size: 1.8rem; display: block; }
.event-date-badge span:last-child { font-size: 0.9rem; }

.event-content { padding: 25px; }
.event-title { font-size: 1.5rem; margin-bottom: 15px; color: var(--primary-accent); }
.event-description { color: var(--text-dark); margin-bottom: 25px; line-height: 1.6; }
.event-button { display: block; text-align: center; }

/* === LOGIN & REGISTER PAGE === */
.login-container { display: flex; justify-content: center; align-items: center; min-height: calc(100vh - 70px); padding: 2rem; }
.login-form {
    background-color: var(--bg-light); border: 1px solid var(--border-color); border-radius: var(--border-radius);
    padding: 2.5rem; width: 100%; max-width: 420px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    animation: fade-in 0.5s ease-in-out; border-top: 3px solid var(--primary-accent);
}
.login-form h1 { color: var(--text-light); text-align: center; margin-bottom: 2rem; font-size: 2.2rem; }
.input-group { margin-bottom: 1.5rem; position: relative; }
.input-group label { display: block; color: var(--text-dark); margin-bottom: 0.5rem; font-size: 0.9rem; }
.input-group input {
    width: 100%; background: rgba(0,0,0,0.2); border: 1px solid var(--border-color);
    border-radius: 8px; padding: 0.85rem 1rem; color: var(--text-light); font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.input-group input:focus { outline: none; border-color: var(--primary-accent); box-shadow: 0 0 15px var(--shadow-color); }
.form-footer { text-align: center; margin-top: 1.5rem; font-size: 0.9rem; }
.form-footer p { color: var(--text-dark); }
.form-footer a { color: var(--primary-accent); font-weight: 600; }
.form-footer a:hover { text-decoration: underline; }

/* === DOWNLOAD PAGE === */
.download-section {
    padding: 100px 20px;
    text-align: center;
}

.download-section h1 {
    font-size: 2.8rem;
    margin-bottom: 60px;
}

.platform-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

.platform-btn {
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 25px 40px;
    color: var(--text-light);
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 300px;
    text-align: left;
    transition: all 0.3s ease;
}

.platform-btn:hover {
    transform: translateY(-5px);
    border-color: var(--primary-accent);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.platform-btn i {
    font-size: 2.5rem;
    color: var(--primary-accent);
}

/* === DESKTOP & RESPONSIVE STYLES === */
@media (min-width: 992px) {
    .modern-nav-dark { padding: 0 50px; }
    .nav-toggle { display: none; }
    .nav-right {
        display: flex; position: static; flex-direction: row;
        background: none; padding: 0; width: auto; align-items: center; gap: 40px;
    }
    .nav-menu-modern { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); flex-direction: row; margin-bottom: 0; gap: 40px; }
    .nav-actions { flex-direction: row; gap: 25px; }

    .hero-content h1 { font-size: 4.5rem; }
    .hero-content h2 { font-size: 1.5rem; }
    .feature-cards { flex-direction: row; flex-wrap: wrap; justify-content: center; }
}

@media (max-width: 992px) {
    .ministers-container { flex-direction: column; align-items: center; }
}

@media (max-width: 600px) {
    .event-list { grid-template-columns: 1fr; }
    .download-buttons { flex-direction: column; align-items: center; gap: 20px; }
    .download-btn-dark { width: 100%; max-width: 220px; justify-content: center; padding: 12px 24px; font-size: 0.95rem; }
    .hero-content h2 { margin-bottom: 2rem; }
}
