/* ============================================
   WARACCADEMY — MODERN RED THEME
   ============================================ */

:root {
    --bg-base: #0d0f12;
    --bg-surface: #15181d;
    --bg-card: #1b1f25;
    --bg-elevated: #242932;
    --border: #262b34;
    --border-light: #353b45;
    --text-primary: #eaedf2;
    --text-secondary: #8b919c;
    --text-muted: #5c6270;
    --accent: #e63946;
    --accent-dim: #b52d38;
    --accent-bright: #f25560;
    --red: #e63946;
    --discord: #5865F2;
    --radius: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --font: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Consolas', monospace;
    --max-width: 1200px;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    min-height: 100vh;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover { color: var(--accent-bright); }

img { max-width: 100%; height: auto; display: block; }

button { font-family: inherit; cursor: pointer; }

ul, ol { list-style: none; }

/* ============================================
   NAVBAR
   ============================================ */

.nav-bar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(13, 15, 18, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 32px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    height: 84px;
    gap: 20px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--text-primary) !important;
    font-weight: 800;
    font-size: 20px;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.nav-brand img {
    height: 50px;
    width: auto;
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.nav-link {
    color: var(--text-secondary) !important;
    font-size: 16px;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: var(--radius);
    transition: all var(--transition);
    white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
    color: var(--text-primary) !important;
    background: var(--bg-elevated);
}

.nav-cta {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--accent);
    color: #fff !important;
    font-weight: 700;
    font-size: 16px;
    padding: 12px 24px;
    border-radius: var(--radius);
    transition: all var(--transition);
}

.nav-cta:hover {
    background: var(--accent-bright);
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(230, 57, 70, 0.3);
}

/* ============================================
   LOGO HERO (grande sotto navbar)
   ============================================ */

/* ============================================
   HERO LOGO (dentro hero, grande)
   ============================================ */

.hero-logo,
.hero-content > .hero-logo,
.hero .hero-logo {
    display: block !important;
    height: 250px !important;
    width: auto !important;
    max-width: 90% !important;
    max-height: 250px !important;
    margin: 0 auto 24px !important;
    filter: drop-shadow(0 15px 50px rgba(230, 57, 70, 0.6));
    animation: logoFloat 4s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

@media screen and (max-width: 768px) {
    .hero-logo {
        height: 170px !important;
        max-height: 170px !important;
    }
}

/* ============================================
   HERO
   ============================================ */

.hero {
    position: relative;
    min-height: 900px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 60px 24px 80px;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: blur(2px) brightness(0.4);
    transform: scale(1.05);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at center, transparent 0%, rgba(13, 15, 18, 0.7) 70%, var(--bg-base) 100%),
        linear-gradient(180deg, rgba(13,15,18,0.4) 0%, rgba(13,15,18,0.9) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 780px;
    animation: fadeUp 0.8s ease-out;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.25);
    color: #4ade80;
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 24px;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4ade80;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.7); }
    50% { opacity: 0.7; box-shadow: 0 0 0 8px rgba(74, 222, 128, 0); }
}

.hero-title {
    font-size: clamp(40px, 7vw, 76px);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
}

.hero-gradient {
    background: linear-gradient(135deg, #e63946 0%, #f25560 50%, #c0392b 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.hero-subtitle {
    font-size: clamp(15px, 2vw, 18px);
    color: var(--text-secondary);
    margin-bottom: 36px;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--accent);
    color: #fff;
    border: none;
    font-size: 15px;
    font-weight: 700;
    font-family: var(--font-mono);
    padding: 14px 22px;
    border-radius: var(--radius);
    transition: all var(--transition);
}

.btn-primary:hover {
    background: var(--accent-bright);
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(230, 57, 70, 0.4);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-elevated);
    color: var(--text-primary) !important;
    border: 1px solid var(--border-light);
    font-size: 15px;
    font-weight: 600;
    padding: 14px 22px;
    border-radius: var(--radius);
    transition: all var(--transition);
}

.btn-secondary:hover {
    background: var(--bg-card);
    border-color: var(--discord);
    color: var(--text-primary) !important;
    transform: translateY(-2px);
}

.hero-versions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 13px;
}

.hero-versions .fa-check-circle { color: #4ade80; }

/* ============================================
   SECTION BASE
   ============================================ */

section { padding: 80px 24px; }

.section-inner {
    max-width: var(--max-width);
    margin: 0 auto;
}

.section-head {
    margin-bottom: 48px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.section-head.centered {
    text-align: center;
    align-items: center;
}

.section-kicker {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent);
}

.section-title {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.section-sub {
    color: var(--text-secondary);
    max-width: 580px;
    margin-top: 8px;
}

/* ============================================
   MODES - clean, no gradients, placeholder icons
   ============================================ */

.modes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.mode-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all var(--transition);
}

.mode-card:hover {
    border-color: var(--border-light);
    transform: translateY(-2px);
}

.mode-image {
    aspect-ratio: 1 / 1;
    background: var(--bg-elevated);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.mode-icon-img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    image-rendering: auto;
}

.mode-card:hover .mode-icon-img {
    transform: scale(1.08);
}

.mode-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--border-light);
    font-size: 64px;
    background:
        linear-gradient(135deg, var(--bg-elevated) 0%, var(--bg-card) 100%);
}

.mode-body {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mode-tag {
    display: inline-block;
    width: fit-content;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 4px 10px;
    background: rgba(230, 57, 70, 0.12);
    color: var(--accent);
    border-radius: 6px;
    margin-bottom: 4px;
}

.mode-body h3 {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.mode-body p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

/* ============================================
   SOCIAL GRID (Community section)
   ============================================ */

.community-section {
    background: var(--bg-surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.social-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.social-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 22px;
    color: var(--text-primary) !important;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.social-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--social-color, var(--accent));
    opacity: 0;
    transition: opacity var(--transition);
    z-index: 0;
}

.social-card > * { position: relative; z-index: 1; }

.social-card:hover {
    transform: translateY(-3px);
    color: #fff !important;
    border-color: transparent;
}

.social-card:hover::before { opacity: 1; }

.social-card:hover .social-body p { color: rgba(255, 255, 255, 0.8); }

.social-discord { --social-color: #5865F2; }
.social-instagram { --social-color: #e4405f; }
.social-tiktok { --social-color: #111; }
.social-telegram { --social-color: #26A5E4; }

.social-icon {
    width: 48px;
    height: 48px;
    background: var(--bg-elevated);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--social-color, var(--accent));
    flex-shrink: 0;
    transition: all var(--transition);
}

.social-card:hover .social-icon {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.social-body {
    flex: 1;
    min-width: 0;
}

.social-body h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 2px;
}

.social-body p {
    font-size: 13px;
    color: var(--text-secondary);
    transition: color var(--transition);
}

.social-arrow {
    color: var(--text-muted);
    font-size: 14px;
    transition: all var(--transition);
}

.social-card:hover .social-arrow {
    color: #fff;
    transform: translateX(4px);
}

/* ============================================
   PAGE HEADER (stats.php)
   ============================================ */

.page-header {
    padding: 80px 24px 40px;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.page-title {
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin: 8px 0 12px;
}

.page-sub {
    color: var(--text-secondary);
    max-width: 580px;
    margin: 0 auto;
    font-size: 16px;
}

/* ============================================
   STATS
   ============================================ */

.stats-section {
    padding-top: 48px;
}

.stats-controls {
    display: flex;
    justify-content: center;
    margin-bottom: 32px;
}

.stats-tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-surface);
    padding: 4px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.stats-tab {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: 8px;
    transition: all var(--transition);
}

.stats-tab:hover { color: var(--text-primary); }

.stats-tab.active {
    background: var(--accent);
    color: #fff;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    transition: all var(--transition);
}

.stat-card:hover {
    border-color: var(--border-light);
    transform: translateY(-2px);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 16px;
}

.stat-value {
    font-size: 40px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 8px;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 14px;
}

.stats-note {
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* ============================================
   POLICY
   ============================================ */

.policy-section { padding: 60px 24px; }

.policy-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.policy-btn {
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    font-family: var(--font);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 10px 20px;
    border-radius: var(--radius);
    transition: all var(--transition);
}

.policy-btn:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border-color: var(--border-light);
}

.policy-btn.selected {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.info-block {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 28px;
    margin: 20px auto 0;
    max-width: 720px;
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-secondary);
    text-align: left;
}

/* ============================================
   FOOTER
   ============================================ */

.site-footer {
    border-top: 1px solid var(--border);
    padding: 60px 24px 24px;
    background: var(--bg-surface);
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid var(--border);
}

.footer-col h4 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.footer-col a {
    display: block;
    color: var(--text-secondary) !important;
    font-size: 14px;
    padding: 4px 0;
    transition: color var(--transition);
}

.footer-col a:hover { color: var(--accent) !important; }

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.footer-brand img { height: 40px; width: auto; }

.footer-brand span {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.footer-desc {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.footer-socials {
    display: flex;
    gap: 10px;
}

.footer-socials a {
    width: 38px;
    height: 38px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex !important;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary) !important;
    padding: 0 !important;
    transition: all var(--transition);
}

.footer-socials a:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff !important;
    transform: translateY(-2px);
}

.footer-legal {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 10px;
    line-height: 1.5;
}

.footer-legal a {
    display: inline !important;
    color: var(--accent) !important;
    padding: 0 !important;
}

.footer-bottom {
    max-width: var(--max-width);
    margin: 24px auto 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-muted);
    flex-wrap: wrap;
    gap: 12px;
}

.footer-bottom .fa-heart { color: var(--red); }

.footer-bottom a { color: var(--text-muted) !important; }
.footer-bottom a:hover { color: var(--accent) !important; }

/* ============================================
   NAV ACTIONS (user + login + cta)
   ============================================ */

.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-login {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--discord);
    color: #fff !important;
    border: none;
    font-weight: 700;
    font-size: 16px;
    padding: 12px 24px;
    border-radius: var(--radius);
    transition: all var(--transition);
    white-space: nowrap;
}

.nav-login:hover {
    background: #4752c4;
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(88, 101, 242, 0.3);
}

.nav-login i { color: #fff; transition: color var(--transition); }
.nav-login:hover i { color: #fff; }

.nav-user {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-elevated);
    color: var(--text-primary) !important;
    border: 1px solid var(--border-light);
    font-weight: 600;
    font-size: 14px;
    padding: 6px 12px 6px 6px;
    border-radius: 100px;
    transition: all var(--transition);
}

.nav-user:hover {
    border-color: var(--accent);
    color: var(--text-primary) !important;
}

.nav-user img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.nav-logout {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    color: var(--text-secondary) !important;
    transition: all var(--transition);
}

.nav-logout:hover {
    color: var(--accent) !important;
    border-color: var(--accent);
}

/* ============================================
   LEADERBOARD
   ============================================ */

.leaderboard-section {
    padding-top: 24px;
    padding-bottom: 80px;
}

.leaderboard-table {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.lb-header, .lb-row {
    display: grid;
    grid-template-columns: 80px 1fr 1fr 120px;
    align-items: center;
    padding: 16px 24px;
    gap: 16px;
}

.lb-header {
    background: var(--bg-elevated);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.lb-row {
    border-top: 1px solid var(--border);
    transition: background var(--transition);
}

.lb-row:hover { background: var(--bg-elevated); }

.lb-rank {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 16px;
    color: var(--text-secondary);
}

.medal-gold .lb-rank { color: #fbbf24; }
.medal-silver .lb-rank { color: #cbd5e1; }
.medal-bronze .lb-rank { color: #d97706; }

.medal-gold { background: linear-gradient(90deg, rgba(251, 191, 36, 0.08) 0%, transparent 60%); }
.medal-silver { background: linear-gradient(90deg, rgba(203, 213, 225, 0.05) 0%, transparent 60%); }
.medal-bronze { background: linear-gradient(90deg, rgba(217, 119, 6, 0.05) 0%, transparent 60%); }

.lb-player {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    color: var(--text-primary);
}

.lb-player img {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: var(--bg-base);
}

.lb-role {
    color: var(--text-secondary);
    font-size: 14px;
}

.lb-hours {
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--accent);
    text-align: right;
}

.stat-max {
    color: var(--text-muted);
    font-size: 24px;
    font-weight: 500;
}

/* ============================================
   STAFF AREA
   ============================================ */

.staff-denied {
    padding: 40px 24px;
}

.denied-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: rgba(230, 57, 70, 0.12);
    color: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
}

.staff-section {
    padding: 40px 24px 80px;
}

.staff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.staff-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
    color: var(--text-primary) !important;
}

.staff-card-link {
    cursor: pointer;
}

.staff-card-link:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
    color: var(--text-primary) !important;
}

.staff-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 16px;
}

.staff-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
}

.staff-card p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 16px;
    flex: 1;
}

.staff-soon {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 4px 10px;
    background: var(--bg-elevated);
    color: var(--text-muted);
    border-radius: 6px;
    align-self: flex-start;
}

.staff-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent);
    font-size: 14px;
    font-weight: 600;
    transition: gap var(--transition);
}

.staff-card-link:hover .staff-link {
    gap: 10px;
}

/* ============================================
   PERIOD STATS
   ============================================ */

.period-stats {
    display: flex;
    gap: 16px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.period-item {
    flex: 1;
    min-width: 180px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.period-label {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
}

.period-value {
    font-weight: 700;
    color: var(--accent);
    font-size: 16px;
}

/* ============================================
   BAN FILTERS & TABLE
   ============================================ */

.ban-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: var(--radius);
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary) !important;
    font-size: 14px;
    font-weight: 600;
    transition: all var(--transition);
}

.filter-btn:hover {
    background: var(--bg-elevated);
    color: var(--text-primary) !important;
}

.filter-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff !important;
}

.filter-btn i { font-size: 10px; }

.ban-table {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.ban-header, .ban-row {
    display: grid;
    grid-template-columns: 2fr 3fr 1.5fr 1.5fr 1fr;
    align-items: center;
    padding: 14px 20px;
    gap: 16px;
}

.ban-header {
    background: var(--bg-elevated);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ban-row {
    border-top: 1px solid var(--border);
    transition: background var(--transition);
    color: var(--text-primary) !important;
}

.ban-row:hover {
    background: var(--bg-elevated);
    color: var(--text-primary) !important;
}

.ban-player {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ban-player img {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: var(--bg-base);
}

.ban-player strong {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

.ban-player small {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--font-mono);
    margin-top: 2px;
}

.ban-reason {
    color: var(--text-secondary);
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ban-staff {
    color: var(--text-secondary);
    font-size: 13px;
}

.ban-date {
    color: var(--text-muted);
    font-size: 13px;
    font-family: var(--font-mono);
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.badge-perm {
    background: rgba(230, 57, 70, 0.15);
    color: #e63946;
    border: 1px solid rgba(230, 57, 70, 0.3);
}

.badge-temp {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-expired {
    background: var(--bg-elevated);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

/* ============================================
   PAGINATION
   ============================================ */

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 24px;
}

.page-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary) !important;
    transition: all var(--transition);
}

.page-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff !important;
}

.page-info {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

/* ============================================
   SEARCH FORM
   ============================================ */

.search-form {
    display: flex;
    gap: 10px;
    max-width: 600px;
    margin: 0 auto 32px;
}

.search-form input {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 18px;
    color: var(--text-primary);
    font-size: 15px;
    font-family: var(--font);
    transition: border-color var(--transition);
}

.search-form input:focus {
    outline: none;
    border-color: var(--accent);
}

.search-form input::placeholder {
    color: var(--text-muted);
}

/* ============================================
   PLAYER CARD
   ============================================ */

.player-card {
    display: flex;
    gap: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: 24px;
    align-items: flex-start;
}

.player-skin {
    width: 120px;
    height: auto;
    border-radius: var(--radius);
    background: var(--bg-elevated);
    flex-shrink: 0;
}

.player-info {
    flex: 1;
    min-width: 0;
}

.player-info h2 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.player-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.meta-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    font-weight: 600;
}

.meta-value {
    font-size: 14px;
    color: var(--text-primary);
    word-break: break-all;
}

.meta-value.mono {
    font-family: var(--font-mono);
    font-size: 12px;
}

/* ============================================
   HISTORY
   ============================================ */

.history-tabs {
    display: flex;
    flex-direction: column;
    gap: 32px;
    margin-top: 40px;
}

.history-section h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
}

.history-section h3 i {
    color: var(--text-muted);
    font-size: 14px;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.history-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    transition: all var(--transition);
}

.history-item.is-active {
    border-color: rgba(230, 57, 70, 0.4);
    background: rgba(230, 57, 70, 0.04);
}

.history-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
    font-size: 13px;
}

.history-date {
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.history-by {
    color: var(--text-secondary);
}

.history-by strong {
    color: var(--text-primary);
}

.history-reason {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
}

/* ============================================
   TOAST
   ============================================ */

.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    padding: 12px 24px;
    border-radius: var(--radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    opacity: 0;
    transition: all var(--transition);
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media screen and (max-width: 900px) {
    .nav-inner { padding: 0 16px; gap: 8px; }
    .nav-brand span { display: none; }
    .nav-links { gap: 0; }
    .nav-link { font-size: 13px; padding: 6px 10px; }
    .nav-cta span { display: none; }
    .nav-cta { padding: 10px 12px; }
    .nav-login { font-size: 13px; padding: 8px 14px; }
    .nav-login span { display: inline !important; }
    .nav-user span { display: none; }
    .nav-user { padding: 4px; }

    section { padding: 60px 20px; }

    .hero { min-height: 520px; padding: 60px 20px; }

    .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }

    .footer-bottom { flex-direction: column; text-align: center; }

    .lb-header, .lb-row {
        grid-template-columns: 50px 1fr 90px;
        padding: 12px 16px;
        font-size: 13px;
    }
    .lb-role { display: none; }
    .lb-player img { width: 24px; height: 24px; }

    .ban-header, .ban-row {
        grid-template-columns: 2fr 1fr 1fr;
        padding: 12px 16px;
    }
    .hide-mobile { display: none !important; }

    .player-card {
        flex-direction: column;
        padding: 20px;
    }

    .player-skin {
        width: 80px;
        margin: 0 auto;
    }
}

@media screen and (max-width: 520px) {
    .nav-inner { display: flex; }
    .nav-links { display: none; }
    .nav-cta { display: none; } /* nasconde Client su mobile piccolo, per dare spazio ad Accedi */

    .btn-primary, .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .hero-actions { flex-direction: column; }

    .footer-inner { grid-template-columns: 1fr; }

    .stat-value { font-size: 32px; }

    .stats-tabs { width: 100%; overflow-x: auto; }

    .search-form { flex-direction: column; }
    .search-form input, .search-form button { width: 100%; }
}

/* ============================================
   SPLASH SCREEN (sigla di apertura)
   ============================================ */

.splash-screen {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: radial-gradient(ellipse at center, #1b1f25 0%, #0d0f12 70%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.splash-content {
    position: relative;
    text-align: center;
    z-index: 2;
    animation: splashIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    opacity: 0;
    transform: scale(0.5);
}

.splash-logo {
    display: block;
    height: 220px;
    width: auto;
    margin: 0 auto 20px;
    filter: drop-shadow(0 0 60px rgba(230, 57, 70, 0.8));
    animation: splashPulse 1.2s ease-in-out infinite alternate;
}

.splash-text {
    animation: splashTextIn 1s cubic-bezier(0.4, 0, 0.2, 1) 0.4s forwards;
    opacity: 0;
    transform: translateY(20px);
}

.splash-title {
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: 48px;
    font-weight: 900;
    letter-spacing: 2px;
    margin: 0;
    text-transform: uppercase;
    text-shadow: 0 0 30px rgba(230, 57, 70, 0.6);
    background: linear-gradient(135deg, #fff 0%, #e63946 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.splash-since {
    color: #e63946;
    font-family: 'Outfit', sans-serif;
    font-size: 22px;
    font-style: italic;
    font-weight: 400;
    margin: 6px 0 0 0;
    letter-spacing: 3px;
    text-shadow: 0 0 20px rgba(230, 57, 70, 0.5);
}

/* Onde d'urto esplosione */
.splash-shockwave {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100px;
    height: 100px;
    border: 4px solid rgba(230, 57, 70, 0.8);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    pointer-events: none;
}

/* Esplosione finale */
.splash-screen.splash-exploding .splash-content {
    animation: splashExplode 0.8s cubic-bezier(0.55, 0, 0.45, 1) forwards;
}

.splash-screen.splash-exploding .splash-shockwave {
    animation: shockwave 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.splash-screen.splash-exploding .splash-shockwave-2 {
    animation: shockwave 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.15s forwards;
}

.splash-screen.splash-exploding {
    background: radial-gradient(ellipse at center, rgba(230, 57, 70, 0.4) 0%, rgba(13, 15, 18, 0.95) 50%, #0d0f12 100%);
}

.splash-screen.splash-gone {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

/* Particelle esplosione */
.splash-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.splash-screen.splash-exploding .splash-particles::before,
.splash-screen.splash-exploding .splash-particles::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    background: #e63946;
    border-radius: 50%;
    box-shadow:
        60px -40px 0 #e63946,
        -80px -60px 0 #ff6b73,
        120px 80px 0 #e63946,
        -140px 20px 0 #ff6b73,
        200px -100px 0 #e63946,
        -200px 100px 0 #ff6b73,
        -180px -180px 0 #e63946,
        180px 180px 0 #ff6b73,
        -60px 160px 0 #e63946,
        60px -160px 0 #ff6b73,
        -240px -60px 0 #e63946,
        240px 60px 0 #ff6b73;
    animation: particleBurst 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.splash-screen.splash-exploding .splash-particles::after {
    animation-delay: 0.1s;
    transform: translate(-50%, -50%) rotate(45deg);
}

@keyframes splashIn {
    0% { opacity: 0; transform: scale(0.3); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes splashTextIn {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes splashPulse {
    0% { transform: scale(1); filter: drop-shadow(0 0 40px rgba(230, 57, 70, 0.6)); }
    100% { transform: scale(1.04); filter: drop-shadow(0 0 70px rgba(230, 57, 70, 1)); }
}

@keyframes splashExplode {
    0% { transform: scale(1); opacity: 1; }
    30% { transform: scale(1.15); opacity: 1; filter: brightness(2); }
    100% { transform: scale(3); opacity: 0; filter: brightness(3) blur(20px); }
}

@keyframes shockwave {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 1;
        border-width: 8px;
    }
    100% {
        transform: translate(-50%, -50%) scale(30);
        opacity: 0;
        border-width: 1px;
    }
}

@keyframes particleBurst {
    0% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
    30% { opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(3); opacity: 0; }
}

@media (max-width: 768px) {
    .splash-logo { height: 140px; }
    .splash-title { font-size: 32px; letter-spacing: 1px; }
    .splash-since { font-size: 17px; letter-spacing: 2px; }
}
