/* =========================================
   1. BASE VARIABLES & RESET
========================================= */
:root {
    --bg-color: #0f0f13;
    --accent-red: #ef5350;     /* Pokéball Red */
    --accent-blue: #29b6f6;    /* Water Blue */
    --accent-purple: #ab47bc;  /* Psychic Purple */
    --accent-gold: #fdd835;    /* Electric Yellow */
    --text-light: #ffffff;
    --text-dim: #a0a0a5;
    --card-radius: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    touch-action: manipulation; /* 🔥 STOPS fast-tapping zoom & button glitches */
}
body {
    background-color: #0f0f13; /* Fallback color */
    color: var(--text-light);
    min-height: 100vh;
    overflow-x: hidden;
    overscroll-behavior-y: none; /* Stops the bouncy scrolling on phones */
    /* ALL BACKGROUND RULES MOVED TO THE LAYER BELOW */
}
/* =========================================
   🔥 BULLETPROOF DYNAMIC BACKGROUND LAYER 🔥
   This layer stays exactly the size of your screen (100dvh)
   and pulls the image directly from your JS variable.
========================================= */
body::before {
    content: "";
    position: fixed;
    top: -10vh; /* Bleeds off the top */
    left: 0;
    width: 100vw;
    height: 120vh; /* Bleeds off the bottom so it never resizes */
    z-index: -1; 
    
    /* 🔥 PULLS THE IMAGE FROM YOUR JAVASCRIPT 🔥 */
    background-image: var(--dynamic-bg, url('images/wall2.webp')); 
    
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    
    /* Hardware acceleration to stop all jitter and lag */
    transform: translateZ(0); 
    will-change: transform;
}

/* =========================================
   2. DASHBOARD LAYOUT
========================================= */
.dashboard-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.dashboard-header { text-align: center; }
.logo { font-size: 2.5rem; font-weight: 900; letter-spacing: 1px; }
.logo .accent { color: var(--accent-red); }
.sub-title {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 4px;
    margin-top: 5px;
    background: linear-gradient(to right, var(--accent-red), var(--accent-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.tournament-banner {
    background-color: #1a1a20; 
    border: 2px solid rgba(253, 216, 53, 0.4);
    border-radius: var(--card-radius);
    padding: 35px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 0 30px rgba(253, 216, 53, 0.15);
    position: relative;
    overflow: hidden;
}

.tournament-banner::before {
    content: ''; position: absolute; top: -50%; left: -10%; width: 100%; height: 200%;
    background: radial-gradient(circle, rgba(253,216,53,0.15) 0%, transparent 60%);
    z-index: 0; pointer-events: none;
}

.banner-content { position: relative; z-index: 1; }
.live-badge {
    background: var(--accent-red); color: white; font-size: 0.8rem; font-weight: bold;
    padding: 5px 12px; border-radius: 20px; display: inline-block; margin-bottom: 12px;
    box-shadow: 0 0 10px rgba(239, 83, 80, 0.6);
    animation: pulse 2s infinite;
}

@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.6; } 100% { opacity: 1; } }

.tournament-banner h2 { font-size: 2rem; font-weight: 900; margin-bottom: 5px; color: var(--accent-gold); text-transform: uppercase; }
.tournament-banner p { color: var(--text-dim); font-size: 1.1rem; }

.banner-btn {
    background: var(--accent-gold); color: #000; font-weight: 800; font-size: 1.1rem;
    padding: 18px 35px; border: none; border-radius: 50px; cursor: pointer;
    transition: 0.3s; z-index: 1; box-shadow: 0 0 15px rgba(253, 216, 53, 0.4);
}
.banner-btn:hover { transform: scale(1.05); box-shadow: 0 0 30px rgba(253, 216, 53, 0.7); }

/* --- Grid Layout (Left/Right Split) --- */
.dashboard-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 40px; 
}
.section-title { font-size: 1.4rem; font-weight: 800; margin-bottom: 20px; color: #fff; border-left: 4px solid var(--accent-red); padding-left: 12px; }

/* --- Mode Cards (Left Side) --- */
.mode-cards { display: flex; flex-direction: column; gap: 15px; }
.mode-card {
    background: rgba(255, 255, 255, 0.03); border: 2px solid rgba(255, 255, 255, 0.05);
    padding: 22px; border-radius: 12px; cursor: pointer; transition: 0.3s ease;
}
.mode-card h3 { font-size: 1.4rem; margin-bottom: 5px; }
.mode-card p { color: var(--text-dim); font-size: 0.95rem; }

/* Hover effects */
.mixed-mode:hover { border-color: var(--accent-red); background: rgba(239, 83, 80, 0.1); box-shadow: 0 0 20px rgba(239, 83, 80, 0.2); transform: translateX(5px); }
.special-mode-card { border-color: rgba(253, 216, 53, 0.5) !important; background: linear-gradient(45deg, rgba(253,216,53,0.05), rgba(41,182,246,0.05)) !important; }
.special-mode-card:hover { box-shadow: 0 0 20px rgba(253,216,53,0.3) !important; transform: translateX(5px); }
.special-mode-card h3 { color: var(--accent-gold); }

/* --- Leaderboard (Right Side) --- */
.leaderboard-box {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--card-radius); padding: 25px;
    display: flex; flex-direction: column; gap: 15px;
}
.lb-item {
    display: flex; align-items: center; gap: 15px; background: rgba(0, 0, 0, 0.4);
    padding: 15px; border-radius: 10px; transition: 0.3s; border: 1px solid transparent;
}
.lb-item:hover { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.1); transform: scale(1.02); }

.rank { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 1.2rem; color: #000; }
.gold { background: linear-gradient(135deg, #ffd700, #daa520); box-shadow: 0 0 10px rgba(255, 215, 0, 0.5); }
.silver { background: linear-gradient(135deg, #e0e0e0, #a0a0a0); box-shadow: 0 0 10px rgba(192, 192, 192, 0.5); }
.bronze { background: linear-gradient(135deg, #cd7f32, #8b4513); box-shadow: 0 0 10px rgba(205, 127, 50, 0.5); }

.lb-info h4 { font-size: 1.1rem; margin-bottom: 2px; }
.lb-info p { font-size: 0.9rem; color: var(--accent-red); font-weight: bold; }

.menu-btn { padding: 18px; font-size: 1.1rem; font-weight: 800; border-radius: 12px; cursor: pointer; transition: 0.3s; text-align: center; border: none; }
.secondary-btn { background: rgba(255, 255, 255, 0.05); color: white; border: 1px solid rgba(255, 255, 255, 0.1); }
.secondary-btn:hover { background: rgba(255, 255, 255, 0.1); }

/* =========================================
   3. GAME AREA (Cinematic Mode)
========================================= */
.game-container {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 20px; width: 100%; max-width: 450px; margin: 0 auto; min-height: 100vh;
}

.game-header { width: 100%; margin-bottom: 20px; display: flex; justify-content: flex-start; }
.nav-btn { background: transparent; color: var(--text-dim); border: none; font-size: 1.1rem; cursor: pointer; transition: 0.2s; font-weight: bold; }
.nav-btn:hover { color: white; }

.card-wrapper {
    position: relative; width: 100%; aspect-ratio: 3 / 4; max-height: 65vh;
    border-radius: var(--card-radius); overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.8);
    background-color: #1a1a2e; 
}
.pokemon-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-info {
    position: absolute; bottom: 0; left: 0; width: 100%; padding: 80px 20px 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.6) 50%, transparent 100%);
    pointer-events: none; 
}
.pokemon-name { font-size: 2.5rem; font-weight: 900; text-transform: uppercase; line-height: 1; margin-bottom: 4px; text-shadow: 2px 2px 4px rgba(0,0,0,0.5); }
.pokemon-type { font-size: 1.2rem; color: var(--accent-gold); font-weight: 700; text-transform: uppercase; letter-spacing: 1px;}

.action-buttons { display: flex; gap: 15px; margin-top: 30px; width: 100%; justify-content: center; }
.btn { font-size: 1.2rem; font-weight: 800; padding: 20px 0; border-radius: 50px; cursor: pointer; transition: all 0.2s ease; border: none; width: 50%; text-align: center; }

.pass-btn { background: rgba(255, 255, 255, 0.05); color: var(--text-light); border: 2px solid rgba(255, 255, 255, 0.1); }
.pass-btn:hover { background: rgba(255, 255, 255, 0.1); transform: scale(0.95); }
.smash-btn { background: var(--accent-red); color: white; box-shadow: 0 0 15px rgba(239, 83, 80, 0.4); }
.smash-btn:hover { transform: scale(1.05); box-shadow: 0 0 25px rgba(239, 83, 80, 0.7); }

/* =========================================
   4. NAVBAR & HEADER POLISH
========================================= */
.navbar {
    background: #0b0b0e; border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0 40px; height: 70px; display: flex; justify-content: space-between;
    align-items: center; position: sticky; top: 0; z-index: 1000; width: 100%;
    transition: transform 0.3s ease-in-out;
}
.navbar-hidden { transform: translateY(-100%); }

.nav-left { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.nav-left img { height: 30px; width: 30px; border-radius: 5px; }
.logo-text { font-size: 1.5rem; font-weight: 900; color: white; }
.logo-text .accent { color: var(--accent-red); }

.center-nav { position: absolute; left: 50%; transform: translateX(-50%); }
.center-nav .nav-links { display: flex; gap: 40px; list-style: none; margin: 0; padding: 0; }
/* --- ALIGNMENT FIX --- */
.center-nav .nav-links li {
    display: flex;
    align-items: center; /* Forces perfect vertical alignment */
}

/* Base state for all nav items */
.center-nav a, .center-nav span.nav-item { 
    color: #fff; 
    text-decoration: none; 
    font-weight: 700; 
    font-size: 1.1rem; 
    transition: color 0.2s; 
    display: inline-flex; /* Helps align the text and the arrow */
    align-items: center;
    cursor: pointer;
}

/* The permanent red state for the active page */
.active-nav { 
    color: var(--accent-red) !important; 
}

/* Desktop Hover (Only applies to devices with a real mouse) */
@media (hover: hover) and (pointer: fine) {
    .center-nav a:hover, .center-nav span.nav-item:hover { 
        color: var(--accent-red) !important; 
    }
}

/* JS Class for Mobile Red State */
.mobile-active-text {
    color: var(--accent-red) !important;
}

.nav-right { display: flex; align-items: center; gap: 15px; }

/* Header Social Buttons */
.discord-icon { color: white; transition: 0.2s; display: flex; align-items: center; margin-top: 3px; }
.discord-icon:hover { color: #5865F2; transform: scale(1.1); }
.support-btn { background: var(--accent-blue); color: white; display: flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 20px; text-decoration: none; font-weight: bold; font-size: 0.95rem; transition: 0.2s; }
.support-btn:hover { background: #1a9bdc; transform: translateY(-2px); }
.kofi-icon { width: 22px; height: 22px; }

/* View More / Promos */
.view-more-btn { background: transparent; color: var(--text-dim); border: none; font-size: 1rem; font-weight: 800; padding: 15px 0 5px 0; margin-top: 10px; cursor: pointer; border-top: 1px solid rgba(255, 255, 255, 0.05); transition: all 0.3s ease; display: flex; justify-content: center; align-items: center; gap: 8px; width: 100%; }
.view-more-btn:hover { color: var(--text-light); transform: translateY(2px); }

.promo-btn { font-weight: 800; font-size: 0.95rem; padding: 12px 25px; border-radius: 30px; transition: all 0.3s ease; cursor: pointer; text-decoration: none; display: inline-block; }
.discord-promo { color: var(--accent-red); background: rgba(239, 83, 80, 0.1); border: 1px solid rgba(239, 83, 80, 0.3); }
.discord-promo:hover { background: rgba(239, 83, 80, 0.2); transform: translateY(-2px); box-shadow: 0 4px 15px rgba(239, 83, 80, 0.3); }
.share-promo { color: white; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.2); }
.share-promo:hover { background: rgba(255, 255, 255, 0.2); transform: translateY(-2px); box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2); }

/* =========================================
   5. GALLERY & RANKINGS SYSTEM
========================================= */
.search-container { width: 100%; margin: 20px 0; display: flex; justify-content: center; }
#searchInput { width: 100%; max-width: 500px; padding: 15px 25px; border-radius: 50px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); color: var(--text-light); font-size: 1.1rem; outline: none; transition: all 0.3s ease; }
#searchInput:focus { border-color: var(--accent-red); box-shadow: 0 0 15px rgba(239, 83, 80, 0.3); background: rgba(0, 0, 0, 0.6); }

.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 20px; width: 100%; margin-top: 20px; }

.gallery-card {
    background: #1a1a2e; border: 2px solid rgba(255, 255, 255, 0.15); border-radius: 12px; overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); cursor: pointer; position: relative; aspect-ratio: 3/4;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
}
.gallery-card:hover { transform: translateY(-10px) scale(1.03); border-color: var(--accent-red); box-shadow: 0 15px 30px rgba(239, 83, 80, 0.3), 0 0 15px rgba(253, 216, 53, 0.2); z-index: 2; }
.gallery-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.gallery-card:hover img { transform: scale(1.08); }

.gallery-info { position: absolute; bottom: 0; left: 0; width: 100%; padding: 40px 15px 15px; background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.7) 40%, transparent 100%); text-align: center; transition: padding 0.3s ease; }
.gallery-card:hover .gallery-info { padding-bottom: 22px; }
.gallery-name { font-size: 1.3rem; font-weight: 900; color: white; text-transform: uppercase; letter-spacing: 1px; text-shadow: 2px 2px 5px rgba(0,0,0,0.9); margin-bottom: 4px; }
.gallery-group { font-size: 0.85rem; color: var(--accent-gold); font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; }

.gallery-card::after {
    content: ''; position: absolute; top: 0; left: -150%; width: 50%; height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-25deg); transition: all 0.6s ease; z-index: 3; pointer-events: none;
}
.gallery-card:hover::after { left: 200%; transition: all 0.6s ease; }

/* --- STATS MODAL --- */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.85); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); display: flex; justify-content: center; align-items: center; z-index: 9999; }
.modal-content { 
    background: #050508 !important; /* Pure dark mode */
    border: 2px solid rgba(253, 216, 53, 0.4) !important; /* Electric Yellow Border */
    border-radius: 20px; padding: 20px; max-width: 400px; width: 90%; 
    position: relative; 
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.9), 0 0 20px rgba(253, 216, 53, 0.1) !important; 
    animation: modalPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
}
@keyframes modalPop { 0% { transform: scale(0.8); opacity: 0;} 100% { transform: scale(1); opacity: 1;} }
.close-btn { position: absolute; top: 10px; right: 15px; font-size: 2rem; background: none; border: none; color: white; cursor: pointer; z-index: 10; text-shadow: 0 2px 5px black; transition: 0.2s; }
.close-btn:hover { color: var(--accent-red); transform: scale(1.1); }
.modal-card img { width: 100%; border-radius: 12px; max-height: 400px; object-fit: cover; border: 1px solid rgba(255,255,255,0.05); }
.modal-info-box { text-align: center; margin-top: 15px; }

.stats-container { display: flex; gap: 10px; }
.stat-box { flex: 1; padding: 15px; border-radius: 12px; background: rgba(0,0,0,0.5); }
.smash-stat { border-bottom: 3px solid var(--accent-red); }
.smash-stat h3 { color: var(--accent-red); font-size: 0.9rem; margin-bottom: 5px; font-weight: 900;}
.pass-stat { border-bottom: 3px solid var(--accent-blue); }
.pass-stat h3 { color: var(--accent-blue); font-size: 0.9rem; margin-bottom: 5px; font-weight: 900;}
.stat-box p { font-size: 1.8rem; font-weight: 900; color: white; }

/* --- RANKINGS PAGE --- */
#rankingsPage .rank-card { display: flex; gap: 14px; align-items: center; background: rgba(255,255,255,0.02); padding: 10px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.03); box-shadow: 0 6px 18px rgba(0,0,0,0.6); transition: transform 0.3s ease, box-shadow 0.3s ease; }
#rankingsPage .rank-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(239, 83, 80, 0.2); border-color: rgba(255, 255, 255, 0.1); }
.rank-avatar { width: 72px; height: 92px; border-radius: 8px; object-fit: cover; flex-shrink: 0; border: 3px solid transparent; position: relative; }
.rank-info { flex: 1; color: #fff; }
.rank-name { font-weight: 800; margin:0 0 4px 0; font-size: 1.05rem; }
.rank-meta { color: #ccc; font-size: 0.9rem; display:flex; align-items:center; gap:8px; }
.rank-badge { margin-left: 10px; font-size: 1.1rem; }
.rank-pos { font-weight:700; margin-right:10px; color:#fff; min-width:28px; text-align:center; }
.rank-first .rank-avatar { box-shadow: 0 6px 20px rgba(255,215,0,0.18); border-color: rgba(255,215,0,0.9); }
.rank-second .rank-avatar { border-color: rgba(192,192,192,0.9); }
.rank-third .rank-avatar { border-color: rgba(205,127,50,0.9); }
.rank-first .rank-name::after { content:" 👑 Ultimate"; margin-left:6px; font-size:0.85rem; color:#ffd700; }
.rankings-title { font-size: clamp(1.5rem, 5vw, 2rem) !important; margin: 0; color: white; text-align: center; white-space: nowrap; }

/* =========================================
   ⚔️ TOURNAMENT & SPECIAL MODE ARENA
========================================= */
.tournament-loading { color: var(--accent-gold); font-size: 1.5rem; text-transform: uppercase; letter-spacing: 2px; animation: pulse 1.5s infinite; }
.battle-wrapper { display: flex; gap: 30px; justify-content: center; margin-top: 20px; flex-wrap: nowrap; }
.battle-side { background: rgba(255,255,255,0.02); padding: 20px; border-radius: 16px; border: 1px solid rgba(255,255,255,0.05); width: 340px; max-width: 100%; text-align: center; box-shadow: 0 10px 20px rgba(0,0,0,0.5); }
.battle-img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 12px; margin-bottom: 15px; border: 1px solid rgba(255,255,255,0.1); }
.battle-votes { font-size: 1.2rem; font-weight: bold; color: var(--accent-gold); margin-bottom: 15px; }

.vote-btn { width: 100%; padding: 12px; font-size: 1.1rem; border-radius: 8px; cursor: pointer; font-weight: 900; transition: 0.2s; text-transform: uppercase; }
.vote-btn.pink { background: var(--accent-red); color: white; border: none; box-shadow: 0 0 15px rgba(239, 83, 80, 0.4); }
.vote-btn.blue { background: var(--accent-blue); color: #000; border: none; box-shadow: 0 0 15px rgba(41, 182, 246, 0.4); }
.vote-btn:hover { transform: scale(1.05); }
.vote-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.tug-arena { margin-top: 40px; max-width: 750px; margin-left: auto; margin-right: auto; text-align: center; }
.tug-total { margin-top: 10px; color: var(--text-dim); font-size: 0.95rem; font-weight: bold; letter-spacing: 1px; text-transform: uppercase; }

/* =========================================
   🌿 WILD ENCOUNTER / SPECIAL MODE
========================================= */
.special-mode-wrapper { max-width: 1400px; margin: 0 auto; padding: 40px 20px 80px; }
.special-header-cinematic { text-align: center; margin-bottom: 50px; position: relative; }
.cinematic-title { font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 900; text-transform: uppercase; margin-top: 10px; line-height: 1; background: linear-gradient(to right, var(--accent-red), var(--accent-gold)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; display: inline-block; }
.cinematic-timer { color: #aaa; font-size: 1.1rem; margin-top: 10px; }

.special-chars-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 350px)); gap: 40px; justify-content: center; }
.special-card-v3 { background: rgba(20, 20, 25, 0.8); border: 1px solid rgba(253, 216, 53, 0.2); border-radius: 20px; overflow: hidden; transition: 0.3s; position: relative; box-shadow: 0 10px 30px rgba(0,0,0,0.6); }
.special-card-v3:hover { transform: translateY(-5px); border-color: var(--accent-gold); box-shadow: 0 15px 35px rgba(253, 216, 53, 0.2); }
.special-idol-img { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-bottom: 1px solid rgba(253, 216, 53, 0.1); }
.special-idol-info { padding: 20px; text-align: center; }
.special-idol-info .idol-name { font-size: 1.6rem; font-weight: 900; color: white; text-transform: uppercase; margin-bottom: 4px; }
.special-idol-info .idol-group { font-size: 0.95rem; color: var(--accent-gold); font-weight: bold; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 15px; }
.special-vote-btn { width: 100%; border-radius: 12px; font-weight: 900; text-transform: uppercase; padding: 12px; }

.special-empty-card { background: #1a1a20; border: 1px solid rgba(255, 255, 255, 0.05); border-radius: 20px; padding: 40px; text-align: center; max-width: 500px; margin: 50px auto; box-shadow: 0 15px 35px rgba(0,0,0,0.7); }
.special-title { font-size: 2.2rem; margin: 10px 0 15px; color: white; font-weight: 900; text-transform: uppercase; }
.divider { height: 2px; width: 60px; background: var(--accent-gold); margin: 0 auto 20px; border-radius: 2px; }
.special-subtext { color: #aaa; margin-bottom: 30px; font-size: 1.1rem; line-height: 1.6; }
.suggest-box { background: rgba(255,255,255,0.02); padding: 15px; border-radius: 10px; margin-bottom: 25px; color: #aaa; font-size: 0.95rem; line-height: 1.5; }

/* Inline Voted Message */
.voted-msg { font-size: 0.9rem; color: var(--accent-blue); font-weight: bold; margin-bottom: 15px; opacity: 0; transform: translateY(-5px); transition: all 0.3s ease; display: none; }
.show-voted { display: block; opacity: 1; transform: translateY(0); }

/* =========================================
   🔥 FAQ ACCORDION OVERHAUL 
========================================= */
.faq-details { background: rgba(0, 0, 0, 0.4); border: 1px solid rgba(255, 255, 255, 0.05); border-radius: 12px; margin-bottom: 15px; border-left: 4px solid var(--accent-red); transition: all 0.3s ease; overflow: hidden; }
.faq-details:hover { background: rgba(0, 0, 0, 0.6); border-color: rgba(255, 255, 255, 0.15); }
.faq-details summary { padding: 20px; font-size: 1.15rem; font-weight: 800; color: white; cursor: pointer; list-style: none; position: relative; outline: none; }
.faq-details summary::-webkit-details-marker { display: none; }
.faq-details summary::after { content: '+'; position: absolute; right: 20px; font-size: 1.5rem; color: var(--accent-red); top: 50%; transform: translateY(-50%); transition: 0.3s; }
.faq-details[open] summary::after { content: '−'; }
.faq-details .faq-content { padding: 0 20px 20px 20px; }
.faq-details .faq-content p { font-size: 0.95rem; line-height: 1.6; color: #bbb; margin-bottom: 10px; }
.faq-details .faq-content p:last-child { margin-bottom: 0; }

/* =========================================
   GLOBAL FOOTER
========================================= */
.global-footer { background: #070709; border-top: 1px solid rgba(255,255,255,0.05); padding: 60px 20px 20px; margin-top: 50px; font-family: 'Inter', sans-serif; }
.footer-container { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.footer-col h4 { color: white; font-size: 1.2rem; margin-bottom: 20px; border-bottom: 2px solid var(--accent-red); padding-bottom: 5px; display: inline-block; }
.footer-col ul { list-style: none; padding: 0; }
.footer-col ul li { margin-bottom: 12px; }
.footer-col ul li a { color: var(--text-dim); text-decoration: none; font-size: 0.95rem; transition: 0.2s; }
.footer-col ul li a:hover { color: var(--accent-red); }
.brand-col p { color: var(--text-dim); font-size: 0.95rem; line-height: 1.6; max-width: 300px; }
.footer-bottom { max-width: 1200px; margin: 40px auto 0; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.05); display: flex; justify-content: space-between; align-items: center; color: var(--text-dim); font-size: 0.85rem; }
.level-up { color: var(--accent-red); font-weight: 900; letter-spacing: 1px; }

/* =========================================
   CLEAN MASTER MOBILE FIX (768px)
========================================= */
/* =========================================
   📱 TABLET / IPAD FIX (900px - 1100px)
========================================= */
/* =========================================
   📱 TABLET / IPAD FIX (900px - 1100px)
========================================= */
@media (max-width: 1100px) {
    .navbar {
        height: auto; 
        padding: 15px 30px;
        flex-wrap: wrap; /* Allows items to wrap to a new line */
    }
    .nav-left, .nav-right {
        flex: 0 0 auto; /* Keeps Logo and Buttons at the top */
    }
    .center-nav {
        position: static;
        transform: none;
        width: 100%; /* Forces the menu to its own row */
        display: flex;
        justify-content: center;
        margin-top: 15px; /* Adds breathing room below the logo */
        order: 3; /* Puts the menu below the top items */
    }
    .center-nav .nav-links {
        gap: 25px; /* Perfect spacing for tablet fingers */
    }
}
@media (max-width: 900px) {
    .rankings-grid { grid-template-columns: 1fr; }
    .rank-avatar { width: 68px; height: 88px; }
    .footer-container { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
    .footer-container { grid-template-columns: 1fr; text-align: center; }
    .brand-col p { margin: 0 auto; }
    .footer-col h4 { display: block; margin: 0 auto 20px; width: fit-content; }
    .footer-bottom { flex-direction: column; gap: 10px; }
}

@media (max-width: 768px) {
    :root { --card-radius: 12px; }
    h2 { font-size: 1.8rem !important; }

    .navbar { padding: 10px 15px; height: auto; flex-wrap: wrap; }
    .nav-left, .nav-right { flex: 0 0 auto; }
    .center-nav { position: static; transform: none; width: 100%; display: flex; justify-content: center; margin-top: 12px; order: 3; }
    .center-nav .nav-links { gap: 20px; font-size: 0.95rem; }
    .logo-text { font-size: 1.2rem; }
    .nav-left img { height: 24px; width: 24px; }
    .discord-icon svg { width: 22px; height: 22px; }
    .support-btn { padding: 6px; }
    .kofi-icon { width: 18px; height: 18px; }
    .support-text { display: none; }

    .dashboard-container { padding: 20px 10px; gap: 30px; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .tournament-banner { flex-direction: column; text-align: center; gap: 20px; }
    .banner-btn { width: 100%; }
    .hero-section h1 { font-size: 1.8rem !important; }
    .hero-section p { font-size: 0.95rem !important; padding: 0 10px; }
    
    #faqArea .dashboard-container > div { padding: 25px !important; }
    #faqArea h2:first-of-type { font-size: 1.6rem !important; margin-bottom: 20px !important; line-height: 1.2; }
    #faqArea div h2 { font-size: 1.3rem !important; line-height: 1.3; }

    .gallery-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 12px; }
    .gallery-card { border-radius: 12px; }
    .gallery-info { padding: 30px 10px 10px; }
    .gallery-name { font-size: 1rem; margin-bottom: 2px; }
    .gallery-group { font-size: 0.8rem; }

    .special-empty-card { padding: 30px 20px; }
    .special-title { font-size: 1.6rem !important; margin: 10px 0; }
    .special-subtext { font-size: 0.95rem !important; margin-bottom: 20px; }

    #faqArea .dashboard-container > div > div { padding: 20px !important; }

    .special-mode-wrapper { padding: 20px 10px; }
    .cinematic-title { font-size: 1.5rem !important; line-height: 1.2 !important; padding: 0 10px; }
    .special-chars-grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
    .special-card-v3 { border-radius: 12px; }
    .special-idol-info { padding: 10px; }
    .special-idol-info .idol-name { font-size: 1.1rem !important; }
    .special-idol-info .idol-group { font-size: 0.75rem !important; }
    .special-vote-btn { padding: 8px; font-size: 0.85rem !important; border-radius: 8px; }

    .battle-wrapper { gap: 10px; padding: 0 5px; }
    .battle-side { width: 50%; padding: 10px; }
    .battle-img { margin-bottom: 10px; }
    .battle-votes { font-size: 1rem; }
    .vote-btn { padding: 8px; font-size: 0.95rem; }

    .rankings-grid { grid-template-columns: 1fr !important; gap: 15px !important; }
    .ranks-column { padding: 10px !important; }
    .rank-info { overflow: hidden; }
    .rank-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 0.95rem; }
    .rank-meta { font-size: 0.75rem; flex-wrap: wrap; }
    .rank-avatar { width: 60px !important; height: 80px !important; }
    
    #faqArea .dashboard-container > div { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; background: rgba(15, 15, 19, 0.95) !important; box-shadow: none !important; padding: 20px 15px !important; }
    .faq-details summary { font-size: 1rem !important; padding: 15px !important; }
    .faq-details .faq-content { padding: 0 15px 15px 15px !important; }
    .dropdown-menu {
        left: auto !important;
        right: 0 !important; /* Anchors the menu to the right edge */
        transform: none !important; /* Kills the centering math */
    }
}

@media (hover: none) and (pointer: coarse) {
    body { min-height: 100dvh !important; }
}


.leaderboard-box {
    background: rgba(15, 15, 19, 0.4) !important; /* Semi-transparent dark tint */
    backdrop-filter: blur(12px) !important; /* Creates the frosted glass effect */
    -webkit-backdrop-filter: blur(12px) !important; /* Safari support */
    border: 1px solid rgba(255, 255, 255, 0.1) !important; /* Clean glass edge */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
}

/* Lighten the list items so they don't look muddy on the transparent background */
.lb-item {
    background: rgba(255, 255, 255, 0.05) !important; 
    border: 1px solid rgba(255, 255, 255, 0.03) !important;
}

/* FIX #2: FIXING THE BLURRY VAPOREON CONTAINER
   Screenshot ref: Image 4.
   This cleans up the main voting arena card container.
*/
.game-container .card-wrapper {
    backdrop-filter: none !important; /* Removes blur behind the Vaporeon card */
    background: rgba(15, 15, 19, 0.95); /* Ensure it's dark and clean */
}


/* FIX #3: FIXING GALLERY CARD BORDERS & CONTRAST
   Screenshot ref: Image 5.
   Your feedback on contrast was perfect. We change the card background 
   to pure black and make the border use our bright accent color.
*/
.gallery-card {
    /* Step 1: Set the card itself to total black */
    background: #000000 !important;

    /* Step 2: Change border from dark to dim Electric Yellow for subtle contrast */
    border: 2px solid rgba(253, 216, 53, 0.2) !important;
    
    /* Add a clean shadow to lift the card off the background void */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.7);
    
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Step 3: intensify the hover effect to feel electric */
.gallery-card:hover {
    /* Bright Pokéball Red border on hover */
    border-color: var(--accent-red) !important;
    
    /* Themed red glow */
    box-shadow: 0 10px 25px rgba(239, 83, 80, 0.3);
}

/* Ensure the text glows over the new black card */
.gallery-name {
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}
.gallery-group {
    text-shadow: 0 0 10px rgba(253, 216, 53, 0.5);
}
@media (max-width: 768px) {
    /* Shrink the huge Gallery Title text */
    #galleryArea .logo { font-size: 2rem !important; }
    #galleryArea .sub-title { font-size: 0.9rem !important; letter-spacing: 2px !important; margin-bottom: 15px !important; }

    /* Shrink the text on the actual Pokémon cards */
    .gallery-name { font-size: 0.85rem !important; margin-bottom: 2px; }
    .gallery-group { font-size: 0.7rem !important; }
    .gallery-info { padding: 20px 10px 10px !important; } /* Reduces padding so text fits better */
}
/* =========================================
   🌐 NAVBAR DROPDOWN MENU
========================================= */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    display: none; /* Hidden by default */
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 15, 19, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 10px 0;
    min-width: 200px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    z-index: 2000;
    list-style: none;
    text-align: left;
}

/* Desktop Hover (Only applies if device has a real mouse) */
@media (hover: hover) and (pointer: fine) {
    .dropdown:hover .dropdown-menu {
        display: flex;
        flex-direction: column;
        animation: fadeIn 0.2s ease-in-out;
    }
}

/* Mobile JS Toggle Class */
.dropdown-menu.show-mobile {
    display: flex !important;
    flex-direction: column;
    animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translate(-50%, -10px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

.dropdown-menu li { margin: 0; }

.dropdown-menu li a {
    display: block;
    padding: 10px 20px;
    color: white;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 700;
    transition: background 0.2s, color 0.2s;
}

.dropdown-menu li a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--accent-red) !important; /* 🔥 Changed to Red 🔥 */
}

/* 🔥 MOBILE SIZING FIXES 🔥 */
@media (max-width: 768px) {
    .dropdown-menu {
        width: 85vw; /* Takes up a nice portion of the screen */
        max-width: 260px; /* Prevents it from getting too wide */
        margin-top: 15px; /* Adds breathing room below the navbar */
    }
    .dropdown-menu li a {
        padding: 12px 20px; /* Slightly taller tap targets for fingers */
        font-size: 0.9rem; /* Slightly smaller text so it fits perfectly */
    }
}


