:root {
    --bg-dark: #0a0a0c;
    --bg-card: #16161a;
    --neon-accent: #ff0055;
    --text-main: #f0f0f0;
    --text-muted: #888;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }

body { background-color: var(--bg-dark); color: var(--text-main); overflow-x: hidden; }

/* Navigation */
.navbar { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 15px 40px; 
    background: rgba(10, 10, 12, 0.95); 
    backdrop-filter: blur(10px); 
    position: sticky; 
    top: 0; 
    z-index: 100; 
    border-bottom: 1px solid rgba(255,0,85,0.2); 
    transition: transform 0.3s ease-in-out; 
}
.navbar.hidden { transform: translateY(-100%); }

/* 3-Column Layout guarantees perfectly centered links */
.logo { font-size: 22px; font-weight: bold; flex: 1; display: flex; align-items: center; }
.logo span { color: var(--neon-accent); }
.center-nav { flex: 1; display: flex; justify-content: center; } 
.nav-right { flex: 1; display: flex; justify-content: flex-end; align-items: center; gap: 15px; }

.nav-links { display: flex; list-style: none; gap: 30px; align-items: center; }
.nav-links a { color: var(--text-main); text-decoration: none; font-weight: 500; cursor: pointer; transition: color 0.3s; }
.nav-links a:hover { color: var(--neon-accent); }
.lang-toggle { font-size: 13px; color: var(--text-muted); cursor: pointer; }
.lang-toggle:hover { color: var(--text-main); }

/* Ensure the Support text shows up on Desktop */
.kofi-text { display: inline-block !important; }
#hero { 
    height: 70vh; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    text-align: center; 
    /* The gradient darkens the image so the text is readable. Update the url to your actual hero image */
    background: linear-gradient(rgba(10, 10, 12, 0.7), rgba(10, 10, 12, 0.95)), url('images/hero-bg.webp');
    background-size: cover;
    background-position: center;
}
.hero-content h1 { font-size: 3rem; margin-bottom: 15px; text-transform: uppercase; letter-spacing: 2px; }
.hero-content p { font-size: 1.2rem; color: var(--text-muted); margin-bottom: 30px; }
.btn-glow { display: inline-block; padding: 15px 30px; font-size: 1.1rem; color: #fff; background: var(--neon-accent); text-decoration: none; border-radius: 5px; box-shadow: 0 0 15px var(--neon-accent); transition: 0.3s; text-transform: uppercase; font-weight: bold; }
.btn-glow:hover { box-shadow: 0 0 30px var(--neon-accent); transform: scale(1.05); }

/* Game Lobby (Netflix-Style Horizontal Scroll) */
#game-lobby { padding: 50px; }
#game-lobby h2 { margin-bottom: 20px; font-size: 2rem; border-left: 4px solid var(--neon-accent); padding-left: 10px; }

.horizontal-scroll-container { 
    display: flex; 
    gap: 20px; 
    overflow-x: auto; 
    padding-bottom: 20px; 
    scrollbar-width: none; /* Firefox */
    cursor: grab;
}
.horizontal-scroll-container::-webkit-scrollbar { display: none; } /* Chrome/Safari */

/* Restoring the big cinematic cards */
.game-card { 
    min-width: 300px; 
    background: var(--bg-card); 
    border-radius: 10px; 
    overflow: hidden; 
    text-decoration: none; 
    color: white; 
    transition: 0.3s; 
    position: relative; 
    border: 1px solid transparent; 
}
.game-card:hover { 
    transform: translateY(-10px); 
    border-color: var(--neon-accent); 
    box-shadow: 0 10px 20px rgba(255,0,85,0.2); 
}
.card-image { 
    height: 400px; /* Restoring the tall height */
    width: 100%; 
    background-color: #222; 
    background-size: cover; 
    background-position: center; 
    transition: 0.5s; 
}
.game-card:hover .card-image { transform: scale(1.05); } 

.game-card h3 { 
    padding: 15px; 
    text-align: center; 
    font-size: 1.2rem; 
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent); 
    position: absolute; 
    bottom: 0; 
    width: 100%; 
    margin: 0; 
}
/* Add your background image URLs here later */
.bg-anime { background-image: url('images/anime.webp'); }
.bg-genshin { background-image: url('images/genshin.webp'); }
.bg-hsr { background-image: url('images/hsr.webp'); }
.bg-zzz { background-image: url('images/zzz.webp'); }
.bg-kpop { background-image: url('images/kpop.webp'); }
.bg-valorant { background-image: url('images/valorant.webp'); }



/* Coming Soon Section */
#coming-soon { padding: 50px; background: #0e0e11; }
.grid-container { display: flex; gap: 20px; }
.locked { opacity: 0.5; filter: grayscale(100%); cursor: not-allowed; min-height: 200px; display: flex; align-items: center; justify-content: center; flex-direction: column; }
.locked:hover { transform: none; border-color: transparent; box-shadow: none; }
.badge { background: #333; padding: 5px 10px; font-size: 0.8rem; margin-top: 10px; border-radius: 3px; }


/* Game Mode Badge */
.game-mode-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 0, 85, 0.85); /* Matches your neon accent */
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    backdrop-filter: blur(4px);
    z-index: 2;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}
/* Gold badge specifically for the Leaderboard section */
.rank-badge {
    background: rgba(255, 215, 0, 0.9); /* Gold Color */
    color: #000; /* Black text for contrast */
    box-shadow: 0 4px 10px rgba(255, 215, 0, 0.3);
}
/* New specific images for the Leaderboard cards */
.bg-anime-rank { background-image: url('images/anime-rank.webp'); }
.bg-genshin-rank { background-image: url('images/genshin-rank.webp'); }
.bg-hsr-rank { background-image: url('images/hsr-rank.webp'); }
.bg-zzz-rank { background-image: url('images/zzz-rank.webp'); }
.bg-kpop-rank { background-image: url('images/kpop-rank.webp'); }
/* Smaller, sleek cards specifically for the Leaderboard Hub */
.leaderboard-card { 
    background: var(--bg-card); 
    border-radius: 10px; 
    overflow: hidden; 
    text-decoration: none; 
    color: white; 
    transition: 0.3s; 
    position: relative; 
    border: 1px solid rgba(255, 215, 0, 0.5); /* Subtle Gold Border */
}
.leaderboard-card:hover { 
    transform: translateY(-5px); 
    border-color: #ffd700; 
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.2); 
}
.leaderboard-image { 
    height: 200px; /* Half the height of the game cards! */
    width: 100%; 
    background-color: #222; 
    background-size: cover; 
    background-position: center 20%; 
    transition: 0.5s; 
}
.leaderboard-card:hover .leaderboard-image { transform: scale(1.05); } 

.leaderboard-card h3 { 
    padding: 12px; 
    text-align: center; 
    font-size: 1.1rem; 
    background: linear-gradient(to top, rgba(0,0,0,0.95), rgba(0,0,0,0.7)); 
    position: absolute; 
    bottom: 0; 
    width: 100%; 
    margin: 0; 
}
/* Gender Toggle Switch */
.gender-toggle { display: flex; justify-content: center; gap: 10px; margin-bottom: 40px; }
.gender-toggle button { background: #222; border: 2px solid #444; color: white; padding: 10px 30px; font-size: 1.1rem; border-radius: 30px; cursor: pointer; transition: 0.3s; font-weight: bold; }
.gender-toggle button.active { background: var(--neon-accent); border-color: var(--neon-accent); box-shadow: 0 0 15px rgba(255,0,85,0.4); }

/* =========================================
   🏆 PREMIUM GACHA PODIUM
   ========================================= */
.podium-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 25px;
    margin-top: 60px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.gacha-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 15px;
    text-align: center;
    position: relative;
    box-shadow: 0 15px 35px rgba(0,0,0,0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 190px;
}

.gacha-card:hover { transform: translateY(-10px); }

/* Rank 1 is the King - Make it bigger and glowing */
.gacha-card.rank-1 {
    width: 230px;
    border: 1px solid rgba(255, 215, 0, 0.4);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.15), 0 15px 35px rgba(0,0,0,0.6);
    z-index: 3;
    margin-bottom: 30px;
}

.gacha-card.rank-2 { border: 1px solid rgba(192, 192, 192, 0.3); z-index: 2; }
.gacha-card.rank-3 { border: 1px solid rgba(205, 127, 50, 0.3); z-index: 1; }

.gacha-img-wrapper {
    width: 100%;
    height: 220px; 
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
}

.rank-1 .gacha-img-wrapper { height: 280px; }

.gacha-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top; 
}

.gacha-badge {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    background: #111;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 1.3rem;
    border: 2px solid;
    z-index: 5;
}

.rank-1 .gacha-badge { border-color: #FFD700; color: #FFD700; text-shadow: 0 0 10px rgba(255,215,0,0.5); }
.rank-2 .gacha-badge { border-color: #C0C0C0; color: #C0C0C0; }
.rank-3 .gacha-badge { border-color: #CD7F32; color: #CD7F32; }

.gacha-name {
    font-size: 1.15rem;
    font-weight: bold;
    color: #fff;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gacha-score {
    font-size: 0.95rem;
    color: var(--neon-accent);
    font-weight: bold;
}
/* 💎 Premium Gacha Inventory List (#4 - #10) */
.podium-list-wrapper { 
    max-width: 700px; 
    margin: 0 auto; 
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative; 
    z-index: 10; 
    padding: 0 15px;
}

.list-item { 
    display: flex; 
    align-items: center; 
    background: rgba(255, 255, 255, 0.03); 
    backdrop-filter: blur(12px); 
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05); 
    padding: 12px 20px; 
    gap: 20px; 
    transition: all 0.2s ease; 
    border-radius: 12px; 
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

/* Interactive Hover Effect */
.list-item:hover { 
    background: rgba(255, 255, 255, 0.08); 
    transform: translateX(5px); 
    border-color: rgba(255, 215, 0, 0.3); /* Subtle gold glow on hover */
}

.list-rank { 
    font-size: 1.4rem; 
    font-weight: 900; 
    color: rgba(255, 255, 255, 0.4); 
    width: 35px; 
    text-align: center; 
}

.list-img { 
    width: 60px; 
    height: 60px; 
    border-radius: 10px; /* Square with rounded corners like in-game icons */
    object-fit: cover; 
    border: 1px solid rgba(255, 255, 255, 0.1); 
}

.list-info { 
    flex: 1; 
    display: flex; 
    justify-content: space-between; /* Pushes the score to the far right */
    align-items: center; 
}

.list-name { 
    font-weight: bold; 
    font-size: 1.15rem; 
    color: var(--text-main); 
}

.list-score { 
    color: var(--neon-accent); 
    font-size: 1rem; 
    font-weight: bold; 
    background: rgba(255, 0, 85, 0.1); /* Nice glowing pill background */
    padding: 6px 14px;
    border-radius: 20px;
}
/* Ambient Spotlight Glow for the Podium View */

/* Optional: Add a subtle animation to make the podium elements "pop" when they load */
@keyframes popIn {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

.podium-slot {
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
.rank-1 { animation-delay: 0.1s; }
.rank-2 { animation-delay: 0.2s; }
.rank-3 { animation-delay: 0.3s; }
/* Updated Ambient Spotlight with subtle texture depth */
/* Updated Ambient Spotlight */
/* Updated Ambient Spotlight (REMOVED RED GLOW) */

/* Optional: Make the podium visual animation better */
@keyframes podiumPop {
    0% { opacity: 0; transform: scale(0.9) translateY(40px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

.podium-slot {
    animation: podiumPop 0.6s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}
.rank-1 { animation-delay: 0.1s; z-index: 5;}
.rank-2 { animation-delay: 0.3s; z-index: 4;}
.rank-3 { animation-delay: 0.5s; z-index: 3;}
/* =========================================
   PODIUM VIEW (CLEAN & FIXED)
   ========================================= */

#podium-view {
    background-color: var(--bg-dark) !important; /* Forces the red glow to disappear completely */
    background-image: none !important;
    position: relative;
    /* Removed overflow: hidden so the fixed background works properly */
}

/* Ensure all text/buttons stay ABOVE the background image */
#podium-view > * {
    position: relative;
    z-index: 10;
}

/* The dynamic background image logic */
/* 🔥 The fixed background image logic (Optimized for Speed) */

/* =========================================
   MEGA FOOTER
   ========================================= */
.mega-footer {
    background-color: #050506;
    border-top: 1px solid rgba(255, 0, 85, 0.2);
    padding: 60px 20px 20px 20px;
    color: var(--text-muted);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    position: relative;
    z-index: 20; /* Keeps it above the background images */
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid #1a1a1e;
}

.footer-brand h2 {
    font-size: 1.8rem;
    color: var(--text-main);
    margin-bottom: 15px;
}

.footer-brand span {
    color: var(--neon-accent);
}

.footer-brand p {
    line-height: 1.6;
    font-size: 0.95rem;
    max-width: 300px;
}

.footer-column h3 {
    color: var(--text-main);
    font-size: 1.2rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

/* Cool underline effect for footer headings */
.footer-column h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 30px;
    height: 2px;
    background-color: var(--neon-accent);
}

.footer-column ul {
    list-style: none;
    padding: 0;
}

.footer-column ul li {
    margin-bottom: 12px;
}

.footer-column ul a {
    color: var(--text-muted);
    text-decoration: none;
    transition: 0.3s;
    font-size: 0.95rem;
}

.footer-column ul a:hover {
    color: var(--neon-accent);
    padding-left: 5px; /* Creates a slick slide-right animation on hover */
}

.footer-bottom {
    max-width: 1200px;
    margin: 20px auto 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

/* Mobile Responsiveness */
@media (max-width: 900px) {
    .footer-container {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-brand p {
        margin: 0 auto;
    }
    .footer-column h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
    .footer-column ul a:hover {
        padding-left: 0;
        color: var(--neon-accent);
    }
    .footer-bottom {
        flex-direction: column;
        gap: 10px;
    }
}
/* =========================================
   📱 MOBILE OPTIMIZATIONS (The Fix!)
   ========================================= */

/* FAQ Section */
.faq-container { display: flex; flex-direction: column; gap: 20px; }
.faq-item { background: var(--bg-card); padding: 20px; border-radius: 10px; border-left: 4px solid var(--neon-accent); }
.faq-question { font-size: 1.2rem; color: var(--text-main); margin-bottom: 10px; }
.faq-answer { color: var(--text-muted); line-height: 1.6; font-size: 0.95rem; }
/* =========================================
   📱 MOBILE OPTIMIZATIONS (The Flawless Fix)
   ========================================= */
/* =========================================
   📱 MOBILE OPTIMIZATIONS (Clean & Final)
   ========================================= */

/* =========================================
   ABOUT SMASH SENPAI
   ========================================= */

#about-smash-senpai {
    padding: 60px 20px 80px 20px;
    max-width: 900px;
    margin: 0 auto;
}

.about-container {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    backdrop-filter: blur(10px);
}

#about-smash-senpai h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    border-left: 4px solid var(--neon-accent);
    padding-left: 15px;
}

#about-smash-senpai p {
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 18px;
    font-size: 1.05rem;
}
/* Ko-fi Header Button Styles */
.kofi-nav-btn {
  display: flex;
  align-items: center;
  background-color: #29abe0; /* Ko-fi Blue */
  color: #ffffff;
  padding: 6px 12px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.kofi-nav-btn img {
  width: 18px;
  height: auto;
  margin-right: 6px;
}

.kofi-nav-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(41, 171, 224, 0.4);
  color: #ffffff;
}
/* =========================================
   📱 MOBILE OPTIMIZATIONS (Consolidated)
   ========================================= */
@media (max-width: 768px) {
    /* 1. Section Padding */
    #games-view, #leaderboards-view, #podium-view { padding-top: 20px !important; }
    #game-lobby, #newly-released, #all-games, #seo-content, #faq-section, #leaderboards { padding: 30px 15px !important; }
    #seo-content > div { padding: 20px !important; } 
    #about-smash-senpai { padding: 20px 15px !important; }

    /* 2. Typography Adjustments */
    #seo-content h2 { font-size: 1.4rem !important; }
    #seo-content h3 { font-size: 1.2rem !important; }
    #seo-content p { font-size: 0.95rem !important; }
    h2#podium-title { font-size: 1.5rem !important; margin-bottom: 15px !important; }

    /* 3. Hero Adjustments */
   #hero {
        /* ... existing mobile styles ... */
        background: linear-gradient(rgba(10, 10, 12, 0.7), rgba(10, 10, 12, 0.95)), url('images/hero-bg-mobile.webp') !important;
        background-size: cover !important;
        background-position: center !important;
    }
    .hero-content h1 { font-size: 1.8rem !important; line-height: 1.3 !important; padding: 0 10px; margin-bottom: 15px; }
    .hero-content p { font-size: 0.95rem; padding: 0 15px; margin-bottom: 20px;}

    /* 4. Navbar (Strict 2-Row) */
    .navbar { display: flex; flex-wrap: wrap; align-items: center; padding: 10px 12px; gap: 8px; }
    .logo { order: 1; flex: 0 1 auto; min-width: 0; font-size: 1.05rem; display: flex; align-items: center; gap: 8px; }
    .nav-right { order: 2; flex: 0 1 auto; margin-left: auto; display: flex; align-items: center; gap: 8px; }
    .center-nav { order: 3; width: 100%; display: flex !important; justify-content: center; margin-top: 6px; padding: 0; }
    .nav-links { width: auto; justify-content: center; gap: 18px; display: flex; flex-wrap: nowrap; overflow: hidden; }
    .nav-links a { font-size: 0.95rem; padding: 6px 4px; white-space: nowrap; }
    .lang-toggle { font-size: 12px; opacity: 0.95; }

    /* 5. Ko-Fi & Buttons */
    .kofi-text { display: none !important; }
    .kofi-nav-btn { padding: 6px 8px !important; }
    .kofi-nav-btn img { margin-right: 0; }
    .gender-toggle button { padding: 8px 15px !important; font-size: 0.9rem !important;}
    #play-current-game-btn { font-size: 0.9rem !important; padding: 10px 20px !important;}

    /* 6. Game Cards */
    .game-card { min-width: 140px; } 
    .card-image { height: 200px; }
    .game-card h3 { font-size: 0.9rem; padding: 8px; }
    .game-mode-badge { font-size: 0.6rem !important; padding: 4px 8px !important; }
    .all-games-grid { grid-template-columns: 1fr; }
    .leaderboard-image { height: 200px; } 
    .leaderboard-card h3 { font-size: 1rem; padding: 12px; }

    /* 7. Podium Layout */
    .podium-wrapper { gap: 5px !important; margin-top: 40px !important; align-items: flex-end !important; flex-wrap: nowrap !important; }
    .gacha-card { width: 32% !important; padding: 5px !important; }
    .gacha-card.rank-1 { width: 36% !important; margin-bottom: 15px !important; }
    .gacha-img-wrapper { height: 100px !important; margin-bottom: 8px !important; }
    .rank-1 .gacha-img-wrapper { height: 130px !important; }
    .gacha-badge { font-size: 0.75rem !important; padding: 3px 8px !important; top: -12px !important; }
    .gacha-name { font-size: 0.7rem !important; white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; line-height: 1.2 !important; margin-bottom: 3px !important; }
    .gacha-score { font-size: 0.65rem !important; }

    /* 8. Gacha List */
    .list-item { padding: 10px; gap: 12px; }
    .list-img { width: 50px; height: 50px; }
    .list-rank { font-size: 1.2rem; width: 25px; }
    .list-info { flex-direction: column; align-items: flex-start; gap: 6px; }
    .list-name { font-size: 0.95rem; }
    .list-score { font-size: 0.85rem; padding: 4px 10px; }
}

/* Safety boundary for ultra-small screens */
@media (max-width: 360px) {
    .nav-links { gap: 10px; }
    .nav-links a { font-size: 0.88rem; padding: 6px 3px; }
    .logo { font-size: 1rem; }
}