:root {
    --bg-dark: #121212;
    --bg-card: #1e1e1e;
    --bg-sidebar: #181818;
    --primary: #00b4d8;
    --accent: #fca311;
    --text-main: #e0e0e0;
    --text-muted: #a0a0a0;
    --border-color: #333;
    --gold: #ffd700;
    --font-main: 'Inter', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.5;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

header {
    background-color: #1a1a1a;
    border-bottom: 1px solid var(--border-color);
    padding: 0 20px;
    height: 70px;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    /* RIDOTTO Z-INDEX e rimosso !important per non coprire le modali */
    z-index: 5000; 
}

.header-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-links a {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.nav-links a.active,
.nav-links a:hover {
    color: white;
}

.main-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 30px;
    max-width: 1400px;
    margin: 30px auto;
    padding: 0 20px;
}

.content-area {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.site-footer {
    background-color: var(--card-bg);
    border-top: 1px solid var(--border-color);
    padding: 20px 0;
    margin-top: 40px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.footer-text {
    color: #888;
    font-size: 0.9rem;
    font-weight: 500;
}

.footer-socials {
    position: absolute;
    right: 20px;
    display: flex;
    gap: 15px;
}

.footer-socials a {
    color: #888;
    font-size: 1.2rem;
    transition: color 0.2s, transform 0.2s;
}

.footer-socials a:hover {
    color: var(--primary);
    transform: translateY(-2px);
}

.divider-text {
    text-align: center;
    margin: 15px 0;
    color: #888;
    font-size: 0.9em;
    position: relative;
}

.divider-text::before,
.divider-text::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: #333;
}

.divider-text::before {
    left: 0;
}

.divider-text::after {
    right: 0;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.lang-switcher {
    margin-left: 20px;
    display: flex;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 4px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    gap: 2px;
}

.lang-btn {
    padding: 6px 14px;
    border-radius: 4px;
    font-weight: 800;
    font-size: 0.9rem;
    color: var(--text-muted);
    text-decoration: none;
    line-height: 1;
}

.lang-btn.active {
    background-color: var(--primary);
    color: #fff;
}

.lang-btn:hover:not(.active) {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

@media (max-width: 900px) {
    .main-layout {
        grid-template-columns: 1fr;
        margin: 20px auto;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    header {
        height: auto;
        padding: 15px 20px;
    }

    .header-container {
        flex-direction: column;
        gap: 15px;
    }

    .nav-links {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
    }

    .nav-links a {
        font-size: 0.85rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .footer-socials {
        position: static;
        justify-content: center;
    }
}

/* =========================================
   Custom Scrollbar (Stile HytaleServers)
   ========================================= */

/* Larghezza barra verticale e altezza orizzontale */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

/* Sfondo della barra (il binario) */
::-webkit-scrollbar-track {
    background: var(--bg-dark); 
}

/* La parte che si muove (il pollice) */
::-webkit-scrollbar-thumb {
    background: var(--border-color); /* Grigio scuro (#333) */
    border-radius: 4px;
}

/* Effetto hover: si illumina con il colore primario del sito */
::-webkit-scrollbar-thumb:hover {
    background: var(--primary); /* Azzurro (#00b4d8) */
}