/* =========================================
   1. BASE VARIABLES & RESET
========================================= */
:root {
    --bg-color: #0f0f13;
    --accent-pink: #f9196b;
    --accent-blue: #00f3ff;
    --accent-purple: #bc13fe;
    --accent-gold: #ffcc00;
    --text-light: #ffffff;
    --text-dim: #a0a0a5;
    --card-radius: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: #0f0f13;
    /* Put your wallpaper URL here */
   
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    /* 🔥 This is the magic sauce: it blends the image with a heavy dark tint */
    background-blend-mode: overlay; 
    color: var(--text-light);
    min-height: 100vh;
    overflow-y: scroll; 
    overflow-x: hidden;
}
/* =========================================
   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-pink); }
.sub-title {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 4px;
    margin-top: 5px;
    background: linear-gradient(to right, #f9196b, #bc13fe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.tournament-banner {
    background-color: #1a1a20; /* Solid dark background to stop flickering */
    border: 2px solid rgba(255, 204, 0, 0.4);
    border-radius: var(--card-radius);
    padding: 35px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 0 30px rgba(255, 204, 0, 0.15); /* Smooth, static outer glow */
    position: relative;
    overflow: hidden;
}

/* Glowing orb effect behind the banner text */
.tournament-banner::before {
    content: ''; position: absolute; top: -50%; left: -10%; width: 100%; height: 200%;
    background: radial-gradient(circle, rgba(255,204,0,0.15) 0%, transparent 60%);
    z-index: 0; pointer-events: none;
}

.banner-content { position: relative; z-index: 1; }
.live-badge {
    background: #ff0055; 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(255, 0, 85, 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(255, 204, 0, 0.4);
}
.banner-btn:hover { transform: scale(1.05); box-shadow: 0 0 30px rgba(255, 204, 0, 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-pink); 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 */
.girl-mode:hover { border-color: var(--accent-pink); background: rgba(249, 25, 107, 0.1); box-shadow: 0 0 20px rgba(249, 25, 107, 0.2); transform: translateX(5px); }
.boy-mode:hover { border-color: var(--accent-blue); background: rgba(0, 243, 255, 0.1); box-shadow: 0 0 20px rgba(0, 243, 255, 0.2); transform: translateX(5px); }
.mixed-mode:hover { border-color: var(--accent-purple); background: rgba(188, 19, 254, 0.1); box-shadow: 0 0 20px rgba(188, 19, 254, 0.2); transform: translateX(5px); }

/* --- 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-pink); 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: #1a1a20; 
}
.idol-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; 
}
.idol-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); }
.idol-group { font-size: 1.2rem; color: var(--text-dim); font-weight: 700; }

.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-pink); color: white; box-shadow: 0 0 15px rgba(249, 25, 107, 0.4); }
.smash-btn:hover { transform: scale(1.05); box-shadow: 0 0 25px rgba(249, 25, 107, 0.7); }

/* =========================================
   4. RESPONSIVE DESIGN (Mobile)
========================================= */

/* --- Header Polish --- */
.dashboard-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.logo-container {
    background: rgba(255, 255, 255, 0.03);
    padding: 10px 30px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.subtitle-badge {
    background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple));
    color: white;
    font-size: 0.85rem;
    font-weight: 900;
    letter-spacing: 3px;
    padding: 6px 16px;
    border-radius: 20px;
    text-transform: uppercase;
    box-shadow: 0 4px 10px rgba(249, 25, 107, 0.3);
}

/* --- View More Button Polish --- */
.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);
}
/* =========================================
   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-pink);
    box-shadow: 0 0 15px rgba(249, 25, 107, 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;
}

/* --- PREMIUM GALLERY CARDS --- */
.gallery-card {
    background: rgba(20, 20, 25, 0.8);
    /* 🔥 Adds a sleek, slightly visible border to frame the "card" */
    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);
}

/* The Glow & Bounce Hover Effect */
.gallery-card:hover {
    transform: translateY(-10px) scale(1.03);
    border-color: var(--accent-pink);
    box-shadow: 0 15px 30px rgba(249, 25, 107, 0.3), 
                0 0 15px rgba(188, 19, 254, 0.2);
    z-index: 2; 
}

/* Image Zoom Effect */
.gallery-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease; /* Smooth image scaling */
}

.gallery-card:hover img {
    transform: scale(1.08); /* Zooms the face in slightly on hover */
}

/* The Info Text Box */
.gallery-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    /* Taller, darker gradient so text is always 100% readable */
    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;
}

/* Text floats up slightly when you hover */
.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;
}
/* --- HOLOGRAPHIC SHINE EFFECT --- */
.gallery-card::after {
    content: '';
    position: absolute;
    top: 0; left: -150%;
    width: 50%; height: 100%;
    /* Creates a glossy white diagonal glare */
    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; /* So it doesn't block clicks */
}

.gallery-card:hover::after {
    left: 200%; /* Sweeps the shine across the card */
    transition: all 0.6s ease;
}

/* --- STATS MODAL CSS --- */
.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: #1a1a20; border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px; padding: 20px; max-width: 400px; width: 90%;
    position: relative; box-shadow: 0 0 40px rgba(249, 25, 107, 0.3);
    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-pink); 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-pink); }
.smash-stat h3 { color: var(--accent-pink); 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; }
/* --- NEW TOP NAV HEADER --- */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.top-nav .logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-tourney-btn {
    background: linear-gradient(45deg, #ffbc00, #ff0055);
    border: none;
    padding: 10px 20px;
    border-radius: 30px;
    color: white;
    font-size: 0.95rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 0, 85, 0.3);
}

.nav-tourney-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 0, 85, 0.6);
}

/* Tiny leaderboard items for the modal */
.mini-lb-item {
    display: flex; justify-content: space-between; align-items: center;
    background: rgba(0,0,0,0.4); padding: 8px 12px; border-radius: 8px;
}
.mini-lb-name { color: white; font-weight: bold; font-size: 0.9rem; }
.mini-lb-score { color: var(--text-light); font-size: 0.8rem; }



.logo-text .accent {
    color: #f9196b;
}

.lang-switcher {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s ease;
}
.lang-switcher:hover {
    background: rgba(255, 255, 255, 0.2);
}


.live-badge {
    background: #ffeb3b;
    color: #000;
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: bold;
}
.pulse {
    animation: pulse-animation 2s infinite;
}
@keyframes pulse-animation {
    0% { box-shadow: 0 0 0 0 rgba(255, 235, 59, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(255, 235, 59, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 235, 59, 0); }
}

/* Mobile Fix for Banners */
/* --- TRUE FULL-WIDTH HEADER --- */

.special-mode-card {
    border-color: rgba(255, 204, 0, 0.5) !important;
    background: linear-gradient(45deg, rgba(255,204,0,0.05), rgba(255,0,85,0.05)) !important;
}
.special-mode-card:hover {
    box-shadow: 0 0 20px rgba(255,204,0,0.3) !important;
    transform: translateX(5px);
}
.special-mode-card h3 { color: #ffcc00; }

.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; /* Added for scroll effect */
}

/* Add this class right below .navbar */
.navbar-hidden {
    transform: translateY(-100%);
}

.center-nav {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}



.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: #f9196b;
}

.kpop-badge {
    background: rgba(249, 25, 107, 0.2);
    color: #f9196b;
    border: 1px solid rgba(249, 25, 107, 0.5);
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: bold;
    letter-spacing: 1px;
}

.center-nav .nav-links {
    display: flex;
    gap: 40px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.center-nav a {
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: color 0.2s;
}

.center-nav a:hover {
    color: #f9196b;
}

.nav-right {
    display: flex;
    align-items: center;
}

.lang-switcher {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s ease;
}

.lang-switcher:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Dynamic Active Link Color */
.active-nav {
    color: var(--accent-pink) !important;
}

/* =========================================
   ULTIMATE MOBILE FIXES
========================================= */
/* =========================================
   ULTIMATE MOBILE FIXES

/* =========================================
   ⚔️ 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; }

/* TOURNAMENT & SPECIAL MODE ARENA */
.battle-wrapper { display: flex; gap: 30px; justify-content: center; margin-top: 20px; flex-wrap: nowrap; } /* Changed to 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-pink); color: white; border: none; box-shadow: 0 0 15px rgba(249, 25, 107, 0.4); }

/* Fixed the blue button to be solid! */
.vote-btn.blue { background: var(--accent-blue); color: #000; border: none; box-shadow: 0 0 15px rgba(0, 243, 255, 0.4); }
.vote-btn:hover { transform: scale(1.05); }
.vote-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* Mobile Side-by-Side Tournament Fix */


.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; }

/* Special Mode Grid */
.special-card { background: rgba(255,255,255,0.02); padding: 15px; border-radius: 16px; border: 1px solid rgba(255,204,0,0.3); width: 180px; transition: 0.3s; box-shadow: 0 8px 15px rgba(0,0,0,0.5); }
.special-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(255,204,0,0.2); }
.special-card img { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 10px; margin-bottom: 10px; }
.special-card h3 { font-size: 1.1rem; margin-bottom: 10px; color: white; text-transform: uppercase; }
/* Rankings page styles (add to style.css) */
#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);
}

.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; }

/* crown + medal styles */
.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; }

/* frames for top3 */
.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); }

/* titles */
.rank-first .rank-name::after { content:"  👑 Ultimate"; margin-left:6px; font-size:0.85rem; color:#ffd700; }

/* small responsive */
@media (max-width:900px) {
  .rankings-grid { grid-template-columns: 1fr; }
  .rank-avatar { width: 68px; height: 88px; }
}
/* Leaderboard Hover Effects */
.rank-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.rank-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(249, 25, 107, 0.2);
    border-color: rgba(255, 255, 255, 0.1);
}


/* Responsive Global Top 5 Title */
.rankings-title {
    font-size: clamp(1.5rem, 5vw, 2rem) !important;
    margin: 0;
    color: white;
    text-align: center;
    white-space: nowrap;
}
/* Header Social & Support Buttons */
.header-actions { display: flex; align-items: center; gap: 15px; }
.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: #29abe0; 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: #228ebc; transform: translateY(-2px); }
.kofi-icon { width: 22px; height: 22px; }

/* --- 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-pink); 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-pink); }
.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-pink); font-weight: 900; letter-spacing: 1px; }

@media (max-width: 900px) {
    .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; }
}
/* Promo Buttons Hover Effects */
.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-pink); background: rgba(249, 25, 107, 0.1); border: 1px solid rgba(249, 25, 107, 0.3); }
.discord-promo:hover { background: rgba(249, 25, 107, 0.2); transform: translateY(-2px); box-shadow: 0 4px 15px rgba(249, 25, 107, 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); }
/* =========================================
   SPECIAL MODE PREMIUM UI (CINEMATIC)
========================================= */
.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; 
    
    /* 🔥 The New Color Upgrade 🔥 */
    background: linear-gradient(to right, var(--accent-pink), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block; /* Required for the gradient clip to work perfectly */
}
.cinematic-timer { color: #aaa; font-size: 1.1rem; margin-top: 10px; }

/* The Grid for Special Characters */
/* The Grid for Special Characters */
.special-chars-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(300px, 350px)); 
    gap: 40px; /* Increased gap so the buttons don't feel clustered */
    justify-content: center; 
}
/* The Special Card V3 */
.special-card-v3 { background: rgba(20, 20, 25, 0.8); border: 1px solid rgba(255, 204, 0, 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: #ffcc00; box-shadow: 0 15px 35px rgba(255, 204, 0, 0.2); }
.special-idol-img { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-bottom: 1px solid rgba(255,204,0,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: #ffcc00; 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 Mode Empty Card */
.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: #ffcc00; 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; }
/* =========================================
   🔥 FAQ ACCORDION OVERHAUL (Matches Home Page)
========================================= */
.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-pink);
    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;
}

/* Hides the default ugly browser arrow */
.faq-details summary::-webkit-details-marker { display: none; }

/* Custom Plus/Minus Icon */
.faq-details summary::after {
    content: '+';
    position: absolute;
    right: 20px;
    font-size: 1.5rem;
    color: var(--accent-pink);
    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; }
/* =========================================
   CLEAN MASTER MOBILE FIX (768px)
========================================= */
@media (max-width: 1100px) {
    .navbar {
        height: auto; 
        padding: 15px 30px;
        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: 15px; 
        order: 3; 
    }
    .center-nav .nav-links {
        gap: 25px; 
    }
}
@media (max-width: 768px) {
    /* Base Variables & UI */
    :root { --card-radius: 12px; }
    h2 { font-size: 1.8rem !important; } /* Global shrink for titles on mobile */

    /* The Header / Navbar Fix */
    .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; /* Reset back to 20px */
        font-size: 0.95rem; /* Reset back to 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; } /* Standard support text hide on mobile */

    /* Layout Fixes (Dashboard) */
    .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; }
   /* Specifically targets ONLY the main white title */
#faqArea h2:first-of-type { font-size: 1.6rem !important; margin-bottom: 20px !important; line-height: 1.2; }

/* Shrinks the pink subheadings so they fit perfectly */
#faqArea div h2 { font-size: 1.3rem !important; line-height: 1.3; }

/* 🔥 Upgraded Gallery Fixes (2 per row for better UX) */
    .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; } /* Slightly bigger text */
    .gallery-group { font-size: 0.8rem; }

    /* 🔥 Fix: Shrinks the Special Event empty text on mobile */
    .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; }

    /* Mobile FAQ Card Padding adjustment */
    #faqArea .dashboard-container > div > div {
        padding: 20px !important;
    }

    /* Special Mode Mobile Overhaul */
    .special-mode-wrapper { padding: 20px 10px; }
   .cinematic-title { 
        font-size: 1.5rem !important; /* Shrunk down from 2rem */
        line-height: 1.2 !important; /* Gives the stacked text breathing room */
        padding: 0 10px; /* Stops it from hitting the edges of the screen */
    }
    .special-chars-grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; } /* Force side-by-side on mobile */
    .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; }

    /* Tournament Fixes */
    .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 Fixes */
    .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; }
    .winner-img {
        max-width: 260px !important; /* Shrunk from 340px */
        max-height: 50vh !important; /* Prevents it from taking up more than half the screen */
        margin-bottom: 10px !important; /* Tighter spacing */
    }
#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; }
}
/* Styling for Inline Special Mode Messages */
.voted-msg {
    font-size: 0.9rem;
    color: var(--accent-blue); /* Themed blue message */
    font-weight: bold;
    margin-bottom: 15px;
    opacity: 0; /* Hidden by default */
    transform: translateY(-5px);
    transition: all 0.3s ease;
    display: none; /* Takes up no space until needed */
}

/* This class will be added by JS to make the message pop in */
.show-voted {
    display: block;
    opacity: 1;
    transform: translateY(0);
}
@media (hover: none) and (pointer: coarse) {
    body {
        
        min-height: 100dvh !important; /* Stops URL bar jumping */
    }
}

/* =========================================
   🌐 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 */
@media (hover: hover) {
    .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-pink) !important; /* 🔥 Fixed: Back to K-Pop Pink! 🔥 */
}

/* 🔥 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 */
    }
}
