
    
    
    
    /* =========================================
       CSS Variables — Dark Fantasy Theme
       ========================================= */
    :root {
        --bg-dark:        #050302;
        --bg-panel:       #1a120b;
        --bg-widget:      #1a120b;
        --bg-input:       #120c07;
        --bg-item:        #241a10;
        --bg-item-hover:  #2f2214;
        --border-dark:    #3b2a1d;
        --border-gold:    #4a3622;
        --gold-bright:    #d3a84a;
        --gold-text:      #e7d6a8;
        --gold-text-2:    #f1e7c5;
        --gold-text-3:    #f0e4bf;
        --header-bg:      #211b16;
        --text-primary:   #e7d6a8;
        --text-secondary: #cbbca0;
        --text-muted:     #9b8b6c;
        --radius-sm:      10px;
        --radius-md:      16px;
        --radius-pill:    999px;
        --font-display:   'Inter', sans-serif;
        --font-body:      'SitkaText', Georgia, serif;
    }

    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
    html { scroll-behavior: smooth; }

    body {
        font-family: var(--font-body);
        background-color: var(--bg-dark);
        color: var(--text-primary);
        font-size: 13px;
        line-height: 1.6;
        overflow-x: hidden;
        min-height: 100vh;
        background-image: url('images/background.jpg');
        background-size: cover;
        background-repeat: no-repeat;
        background-position: center top;
        background-attachment: fixed;
    }
    a { color: inherit; text-decoration: none; }
    img { max-width: 100%; display: block; }
    button { cursor: pointer; font-family: var(--font-body); }
    input  { font-family: var(--font-body); }

    /* -- Social Sidebar ----------------------- */
    .social-sidebar {
        position: fixed;
        left: 0; top: 50%;
        transform: translateY(-50%);
        z-index: 200;
        display: flex;
        flex-direction: column;
        gap: 2px;
    }
    
    /* -- Backlinks Bar ------------------------ */
.backlinks-bar {
    background: rgba(5,3,2,0.9);
    border-top: 1px solid var(--border-dark);
    padding: 9px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom:-11px;
}
.backlinks-bar a {
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-muted);
    transition: color 0.2s;
}
.backlinks-bar a:hover {
    color: var(--gold-bright);
}
.backlinks-bar a.featured {
    color: var(--gold-text-2);
}
.backlinks-bar .sep {
    color: var(--border-gold);
    font-size: 10px;
    line-height: 1;
}
    .social-link {
        display: flex; align-items: center; justify-content: center;
        width: 36px; height: 36px;
        background: rgba(23,14,10,0.92);
        border: 1px solid var(--border-dark);
        border-left: none;
        color: var(--text-secondary);
        font-size: 15px;
        transition: all 0.2s ease;
    }
    .social-link:hover { background: var(--bg-item); border-color: var(--border-gold); }
    .social-link.facebook:hover  { color: #1877F2; }
.social-link.discord:hover   { color: #5865F2; }
.social-link.youtube:hover   { color: #FF0000; }
.social-link.instagram:hover { color: #E4405F; } /* Instagram Pink */
.social-link.tiktok:hover    { color: #25F4EE; } /* TikTok Cyan */


.news-tabs {
    display: flex; align-items: center; gap: 8px;
    background: rgba(11,7,6,0.7);
    border-bottom: 1px solid var(--border-dark);
    padding: 10px 14px; flex-wrap: wrap;
}
.news-tab {
    display: flex; align-items: center; gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(to bottom, #241a10, #1a120b);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-pill);
    color: var(--text-secondary);
    font-family: var(--font-display);
    font-size: 11px; font-weight: 600;
    letter-spacing: 0.5px; text-transform: uppercase;
    transition: all 0.2s; cursor: pointer;
    text-decoration: none; white-space: nowrap;
}
.news-tab i { color: var(--border-gold); font-size: 12px; }
.news-tab:hover { background: linear-gradient(to bottom, #2f2214, #241a10); color: var(--gold-text); }
.news-tab.active {
    background: linear-gradient(to bottom, #d3a84a, #a67f34);
    color: #201202;
    border-color: var(--gold-bright);
}
.news-tab.active i { color: #201202; }

.news-post {
    background: rgba(0,0,0,0.25);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin-bottom: 14px;
}
.news-post:last-child { margin-bottom: 0; }
.news-post-top {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 10px;
}
.news-post-title { color: var(--gold-text); font-size: 14px; font-weight: 600; }
.news-post-badge {
    background: var(--bg-item);
    border: 1px solid var(--border-dark);
    color: var(--text-secondary);
    font-size: 10px; padding: 3px 10px; border-radius: 3px;
    text-transform: uppercase; letter-spacing: 0.5px;
}
.news-post-body { color: var(--text-primary); font-size: 12px; line-height: 1.8; }
.news-post-body a { color: var(--gold-bright); text-decoration: underline; }
.news-post-footer {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 12px; padding-top: 10px;
    border-top: 1px solid rgba(61,38,25,0.3);
    font-size: 11px; color: var(--text-muted);
}
.news-post-footer strong { color: var(--gold-text); }
.news-post-footer .comments { display: flex; align-items: center; gap: 4px; }


    /* -- Header ------------------------------- */
    .site-header {
        position: relative; z-index: 50;
        background: rgba(33, 27, 22, 0.95);
        backdrop-filter: blur(6px);
        border-bottom: 1px solid var(--border-dark);
        box-shadow: 0 2px 20px rgba(0,0,0,0.6);
    }
    .header-inner {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 20px;
        display: flex;
        align-items: center;
        height: 56px;
        gap: 0;
    }
    .logo { display: flex; align-items: center; margin-right: 24px; flex-shrink: 0; }
    .logo img { height: 42px; width: auto; }

    /* Nav */
    .main-nav { display: flex; gap: 0; flex: 1; }
    .nav-link {
        margin: 0 2px;
        padding: 9px 16px;
        font-family: var(--font-display);
        font-size: 11px;
        font-weight: 600;
        letter-spacing: 1.5px;
        color: var(--text-secondary);
        border-radius: var(--radius-pill);
        transition: color 0.2s, background 0.2s;
        position: relative;
        white-space: nowrap;
    }
    .nav-link:hover, .nav-link.active {
        color: var(--gold-text-2);
        background: rgba(211,168,74,0.12);
    }

    /* -- Language Selector --------------------- */
    .lang-selector { position: relative; margin-left: auto; flex-shrink: 0; }
    .lang-btn {
        display: flex; align-items: center; gap: 6px;
        padding: 6px 12px;
        background: rgba(26,18,11,0.9);
        border: 1px solid var(--border-gold);
        border-radius: var(--radius-pill);
        color: var(--gold-text);
        font-size: 12px;
        font-family: var(--font-display);
        font-weight: 600;
        letter-spacing: 1px;
        transition: background 0.2s;
    }
    .lang-btn:hover { background: var(--bg-item); }
    .lang-btn .flag-emoji { font-size: 16px; line-height: 1; }
    .lang-btn i { font-size: 9px; color: var(--text-secondary); transition: transform 0.2s; }
    .lang-btn.open i { transform: rotate(180deg); }

    .lang-dropdown {
        display: none;
        position: absolute;
        right: 0; top: calc(100% + 5px);
        background: #120c07;
        border: 1px solid var(--border-gold);
        border-radius: var(--radius-md);
        min-width: 250px;
        z-index: 300;
        overflow: hidden;
        box-shadow: 0 8px 24px rgba(0,0,0,0.8);
        /* Two-column grid */
        display: none;
    }
    .lang-dropdown.open { display: grid; grid-template-columns: 1fr 1fr; }
    .lang-dropdown a {
        display: flex; align-items: center; gap: 7px;
        padding: 8px 12px;
        color: var(--text-primary);
        font-size: 11px;
        font-family: var(--font-body);
        transition: background 0.15s;
        border-bottom: 1px solid rgba(61,38,25,0.25);
        white-space: nowrap;
    }
    .lang-dropdown a:hover { background: var(--bg-item-hover); color: var(--gold-bright); }
    .lang-dropdown a.active-lang { background: var(--bg-item); color: var(--gold-bright); }
    .lang-dropdown a .flag-emoji { font-size: 15px; }

    /* -- Hero Banner --------------------------- */
    .hero-banner {
        height: 180px;
        display: flex; align-items: center; justify-content: center;
        overflow: hidden;
    }
    .hero-banner img.site-logo {
        max-height: 160px; width: auto;
        filter: drop-shadow(0 4px 20px rgba(0,0,0,0.9));
    }

    /* -- Main Content -------------------------- */
    .main-content { padding: 18px 0 50px; min-height: 600px; }
    .content-wrapper {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 20px;
        display: flex;
        gap: 16px;
        align-items: flex-start;
    }

    /* -- LEFT COLUMN --------------------------- */
    .left-column {
        width: 215px;
        flex-shrink: 0;
        display: flex;
        flex-direction: column;
        gap: 7px;
    }
    .widget {
        background: rgba(26, 18, 11, 0.95);
        border: 1px solid var(--border-gold);
        border-radius: var(--radius-md);
        overflow: hidden;
    }
    .widget-header {
        background: linear-gradient(to bottom, #4a3622, #211b16);
        border-bottom: 1px solid var(--border-gold);
        color: var(--gold-text-2);
        font-family: var(--font-display);
        font-size: 11px;
        font-weight: 700;
        letter-spacing: 1.5px;
        padding: 10px 12px;
        text-align: center;
        text-transform: uppercase;
    }

    /* Login Form */
    .login-form { display: flex; flex-direction: column; gap: 7px; padding: 10px; }
    .form-group  { display: flex; flex-direction: column; gap: 3px; }
    .form-group > label {
        color: var(--text-secondary);
        font-size: 10px;
        display: flex; justify-content: space-between; align-items: center;
    }
    .forgot-link { color: var(--text-muted); font-size: 10px; transition: color 0.2s; }
    .forgot-link:hover { color: var(--gold-bright); }
    .input-wrap { position: relative; }
    .input-wrap i {
        position: absolute; left: 14px; top: 50%;
        transform: translateY(-50%);
        color: var(--text-muted); font-size: 11px;
        pointer-events: none;
    }
    .input-wrap input {
        width: 100%;
        padding: 8px 14px 8px 32px;
        background: var(--bg-input);
        border: 1px solid var(--border-dark);
        border-radius: var(--radius-pill);
        color: var(--text-primary);
        font-size: 12px;
        outline: none;
        min-width: unset; height: auto;
        line-height: normal; margin: 0;
        transition: border-color 0.2s;
    }
    .input-wrap input:focus { border-color: var(--gold-bright); }
    .input-wrap input::placeholder { color: var(--text-muted); opacity: 0.5; }
    .btn-login {
        width: 100%; margin-top: 4px; padding: 9px;
        background: linear-gradient(to bottom, #d3a84a, #a67f34);
        border: 1px solid var(--gold-bright);
        border-radius: var(--radius-pill);
        color: #201202;
        font-family: var(--font-display);
        font-size: 11px; font-weight: 700;
        letter-spacing: 2px; text-transform: uppercase;
        transition: all 0.2s; cursor: pointer;
        box-shadow: 0 4px 14px rgba(211,168,74,0.25);
        height: auto; line-height: normal;
    }
    .btn-login:hover { background: linear-gradient(to bottom, #e7bd63, #b8913f); box-shadow: 0 6px 18px rgba(211,168,74,0.4); }

    /* User Panel */
    .userpanel-welcome { padding: 10px 12px 4px; text-align: center; }
    .userpanel-welcome h3 {
        font-family: var(--font-display);
        font-size: 12px; color: var(--gold-text);
        letter-spacing: 0.5px; margin-bottom: 10px;
    }
    .panel-btn-row { display: flex; flex-direction: column; gap: 4px; padding: 0 10px 10px; }
    .panel-btn {
        display: block; width: 100%; padding: 8px 10px;
        background: linear-gradient(to bottom, #241a10, #1a120b);
        border: 1px solid var(--border-gold);
        border-radius: var(--radius-pill);
        color: var(--gold-text);
        font-family: var(--font-display);
        font-size: 10px; font-weight: 600;
        letter-spacing: 1px; text-align: center;
        text-transform: uppercase; transition: all 0.2s; cursor: pointer;
    }
    .panel-btn:hover { background: linear-gradient(to bottom, #2f2214, #241a10); color: var(--gold-bright); border-color: var(--gold-bright); }
    .panel-btn i { margin-right: 5px; }

    /* Statistics — hero stat + status chips */
    .stat-hero {
        display: flex; flex-direction: column; align-items: center;
        padding: 18px 10px 12px;
        position: relative;
    }
    .stat-hero-ring {
        position: relative;
        width: 64px; height: 64px;
        border-radius: 50%;
        display: flex; align-items: center; justify-content: center;
        background: radial-gradient(circle, rgba(211,168,74,0.16), transparent 72%);
        margin-bottom: 8px;
    }
    .stat-hero-ring::before {
        content: '';
        position: absolute; inset: 0;
        border-radius: 50%;
        border: 2px solid rgba(211,168,74,0.4);
        animation: stat-pulse 2.4s ease-in-out infinite;
    }
    .stat-hero-ring i { color: var(--gold-bright); font-size: 15px; }
    @keyframes stat-pulse {
        0%, 100% { transform: scale(1); opacity: 0.55; }
        50%      { transform: scale(1.15); opacity: 1; }
    }
    .stat-hero-num {
        font-family: var(--font-display);
        font-size: 24px; font-weight: 800;
        color: var(--gold-bright);
        line-height: 1;
    }
    .stat-hero-label {
        font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase;
        color: var(--text-secondary);
        margin-top: 5px;
    }
    .status-divider {
        height: 1px; margin: 0 12px;
        background: linear-gradient(to right, transparent, var(--border-gold), transparent);
    }
    .status-chips {
        display: flex; flex-wrap: wrap; gap: 6px;
        padding: 12px;
    }
    .status-chip {
        display: flex; align-items: center; justify-content: center; gap: 6px;
        flex: 1 1 calc(50% - 6px);
        padding: 6px 8px;
        background: rgba(0,0,0,0.28);
        border: 1px solid var(--border-dark);
        border-radius: var(--radius-pill);
        font-size: 10px; font-weight: 600;
        letter-spacing: 0.5px;
        color: var(--text-secondary);
        transition: border-color 0.2s, background 0.2s;
    }
    .status-chip:hover { border-color: var(--border-gold); background: rgba(0,0,0,0.4); }
    .status-chip .dot {
        width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
        background: #3ddc5c;
        box-shadow: 0 0 7px 1px rgba(61,220,92,0.75);
    }
    .status-chip.offline { color: #b97a7a; }
    .status-chip.offline .dot {
        background: #e34d4d;
        box-shadow: 0 0 7px 1px rgba(227,77,77,0.65);
        animation: none;
    }

    /* Ranking — podium list */
    .rank-list { display: flex; flex-direction: column; padding: 8px; gap: 3px; }
    .rank-row {
        display: flex; align-items: center; gap: 9px;
        padding: 6px 8px;
        border-radius: var(--radius-sm);
        transition: background 0.15s;
    }
    .rank-row:hover { background: rgba(211,168,74,0.08); }
    .rank-row.rank-top {
        background: linear-gradient(to right, rgba(211,168,74,0.10), transparent);
        border: 1px solid rgba(211,168,74,0.22);
        padding: 7px 8px;
    }
    .rank-badge {
        width: 24px; height: 24px; flex-shrink: 0;
        border-radius: 50%;
        background: #20170a;
        border: 1px solid var(--border-gold);
        display: inline-flex; align-items: center; justify-content: center;
        color: var(--gold-text);
        font-family: var(--font-display); font-size: 10.5px; font-weight: 700;
    }
    .rank-row.rank-1 .rank-badge {
        background: linear-gradient(160deg, #ffe28f, #c99a2e);
        color: #2a1a02; border-color: #ffe28f;
        box-shadow: 0 0 10px rgba(255,215,90,0.55);
    }
    .rank-row.rank-2 .rank-badge {
        background: linear-gradient(160deg, #eef0f2, #a9adb2);
        color: #23262b; border-color: #eef0f2;
        box-shadow: 0 0 8px rgba(200,205,212,0.4);
    }
    .rank-row.rank-3 .rank-badge {
        background: linear-gradient(160deg, #e6a667, #a85e2a);
        color: #2a1502; border-color: #e6a667;
        box-shadow: 0 0 8px rgba(210,140,70,0.4);
    }
    .rank-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
    .rank-player-name {
        color: var(--text-primary); font-size: 12px; font-weight: 600;
        overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
        transition: color 0.15s;
    }
    .rank-row:hover .rank-player-name, .rank-row.rank-top .rank-player-name { color: var(--gold-text-2); }
    .rank-player-lv { color: #8fe84a; font-size: 9.5px; font-weight: 600; letter-spacing: 0.3px; }
    .rank-empire {
        flex-shrink: 0; width: 22px; height: 22px;
        border-radius: 50%;
        background: rgba(0,0,0,0.3);
        border: 1px solid var(--border-dark);
        display: flex; align-items: center; justify-content: center;
        overflow: hidden;
    }
    .rank-empire img { width: 13px; height: 13px; object-fit: contain; }
    .rank-more { display: flex; gap: 6px; padding: 8px; }
    .rank-more a {
        flex: 1; display: block; padding: 6px 4px;
        background: linear-gradient(to bottom, #241a10, #1a120b);
        border: 1px solid var(--border-gold);
        border-radius: var(--radius-pill);
        color: var(--gold-text);
        font-family: var(--font-display);
        font-size: 10px; font-weight: 600;
        text-align: center; text-transform: uppercase;
        letter-spacing: 0.5px; transition: all 0.2s;
    }
    .rank-more a:hover { background: linear-gradient(to bottom, #2f2214, #241a10); color: var(--gold-bright); border-color: var(--gold-bright); }

    /* -- RIGHT COLUMN -------------------------- */
    .right-column {
        flex: 1; min-width: 0;
        display: flex; flex-direction: column; gap: 8px;
    }
    .hero-slider {
    display: flex;
    gap: 8px;
    border-radius: var(--radius-md);
    overflow: hidden;
}
.hero-slider img {
    flex: 1 1 0;
    width: 33.333%;
    display: block;
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-md);
}
    /* News section */
    .news-section {
        background: rgba(26,18,11,0.95);
        border: 1px solid var(--border-gold);
        border-radius: var(--radius-md);
        overflow: hidden;
    }
    .news-tabs {
        display: flex; align-items: center; gap: 10px;
        background: rgba(11,7,6,0.7);
        border-bottom: 1px solid var(--border-dark);
        padding: 8px 14px; flex-wrap: wrap;
    }
    .news-header {
        display: flex; align-items: center; gap: 6px;
        color: var(--text-secondary);
        font-size: 12px; white-space: nowrap; margin-right: 4px;
        font-family: var(--font-display); font-weight: 600; letter-spacing: 1px;
    }
    .news-header i { color: var(--border-gold); }
    .news-divider { height: 1px; background: linear-gradient(to right, transparent, var(--border-gold), transparent); }
    .news-body { padding: 16px 20px 20px; }
    .news-body p { color: var(--text-primary); font-size: 12px; line-height: 1.7; margin-bottom: 6px; }

    /* -- Footer ------------------------------- */
    .site-footer {
        background: linear-gradient(to top, #030201, #050302);
        border-top: 1px solid var(--border-gold);
        text-align: center;
        padding: 14px 20px;
        color: var(--text-muted);
        font-size: 11px; letter-spacing: 0.5px;
        margin-top: 10px;
    }
    .site-footer strong { color: var(--text-secondary); }
    .footer-links { display: flex; justify-content: center; gap: 16px; margin-top: 6px; flex-wrap: wrap; }
    .footer-links a { color: var(--text-muted); font-size: 11px; transition: color 0.2s; }
    .footer-links a:hover { color: var(--gold-bright); }

    /* -- CTA Banner (account creation) --------- */
    .cta-banner {
        display: flex; align-items: center; justify-content: space-between;
        background: linear-gradient(to right, #2f2214, #1a120b);
        border: 1px solid var(--border-gold);
        border-radius: var(--radius-md);
        padding: 10px 12px 10px 18px;
        color: var(--gold-text-2);
        font-size: 12px;
    }
    .cta-banner a {
        display: inline-flex; align-items: center; gap: 6px;
        background: linear-gradient(to bottom, #d3a84a, #a67f34);
        color: #201202; font-weight: 700;
        padding: 6px 14px; border-radius: var(--radius-pill);
        text-decoration: none; transition: box-shadow 0.2s;
    }
    .cta-banner a:hover { box-shadow: 0 4px 14px rgba(211,168,74,0.35); }
    .cta-banner i { margin-left: 2px; }

    /* -- Top row: slider + latest news --------- */
    .top-row { display: flex; gap: 8px; align-items: stretch; }
    .top-row .hero-slider { flex: 2; }
    .latest-news-widget { flex: 1; min-width: 220px; display: flex; flex-direction: column; }
    .latest-news-list { list-style: none; }
    .latest-news-list li {
        display: flex; flex-direction: column; gap: 2px;
        padding: 8px 12px;
        border-bottom: 1px solid rgba(61,38,25,0.4);
        font-size: 11px;
    }
    .latest-news-list li:last-child { border-bottom: none; }
    .latest-news-list a { color: var(--gold-text); font-weight: 600; }
    .latest-news-list a:hover { color: var(--gold-bright); }
    .latest-news-list span { color: var(--text-muted); font-size: 10px; }
    .latest-news-empty { padding: 12px; font-size: 11px; color: var(--text-muted); text-align: center; }

    /* -- Players Toplist (top 3, avatar cards) - */
    .toplist-row { display: flex; gap: 6px; padding: 10px; justify-content: center; }
    .toplist-card { flex: 1; text-align: center; }
    .toplist-avatar-wrap { position: relative; width: 56px; height: 56px; margin: 0 auto 4px; }
    .toplist-avatar-wrap img {
        width: 56px; height: 56px; border-radius: 50%;
        border: 2px solid var(--border-gold); object-fit: cover;
        background: var(--bg-item);
    }
    .toplist-rank {
        position: absolute; top: -4px; left: -4px;
        width: 18px; height: 18px; border-radius: 50%;
        display: flex; align-items: center; justify-content: center;
        font-family: var(--font-display); font-size: 10px; font-weight: 700;
        color: #1a1a1a; background: var(--gold-bright);
        border: 1px solid var(--bg-dark);
    }
    .toplist-rank.rank-1 { background: #ffd700; }
    .toplist-rank.rank-2 { background: #c0c0c0; }
    .toplist-rank.rank-3 { background: #cd7f32; }
    .toplist-name { font-size: 10px; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

    /* -- Responsive ---------------------------- */
    @media (max-width: 900px) {
        .content-wrapper { flex-direction: column; }
        .left-column { width: 100%; flex-direction: row; flex-wrap: wrap; gap: 6px; }
        .left-column .widget { flex: 1 1 200px; }
        .hero-banner { height: 120px; }
        .lang-dropdown.open { grid-template-columns: 1fr; }
    }
    @media (max-width: 600px) {
        .main-nav { display: none; }
        .social-sidebar { display: none; }
    }
    