/* =========================================
   VARIABLES & DESIGN SYSTEM
========================================== */
:root {
    --bg-main: #0f0f0f;
    --bg-card: #1a1a1a;
    --bg-card-alt: #141414;
    --primary: #00e5ff;
    --secondary: #6a5cff;
    --accent: #ffd54f;
    --text: #ffffff;
    --text-muted: #a0a0a0;
    
    --font-heading: 'Orbitron', sans-serif;
    --font-body: 'Rajdhani', sans-serif;
    
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    
    --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.4);
    --glow-primary: 0 0 15px rgba(0, 229, 255, 0.3);
    --glow-secondary: 0 0 15px rgba(106, 92, 255, 0.3);
    
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* =========================================
   BASE RESET & UTILITIES
========================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-main);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 1.05rem;
    line-height: 1.5;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; object-fit: cover; }

/* Typography Helpers */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.text-accent { color: var(--accent); }
.text-primary { color: var(--primary); }

.badge {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(0, 229, 255, 0.1);
    border: 1px solid var(--primary);
    color: var(--primary);
    font-family: var(--font-heading);
    font-size: 0.75rem;
    border-radius: 50px;
    margin-bottom: 12px;
}

.badge-accent {
    background: rgba(255, 213, 79, 0.1);
    border-color: var(--accent);
    color: var(--accent);
}

/* Layout Containers */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-sm { max-width: 800px; }
.section { padding: 80px 0; }
.bg-card-alt { background-color: var(--bg-card-alt); }

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 2rem;
    color: var(--text);
    text-shadow: var(--glow-primary);
}

.section-header p { color: var(--text-muted); }

.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(1, 1fr); }
.grid-4 { grid-template-columns: repeat(1, 1fr); }
.gap-lg { gap: 30px; }

@media (min-width: 600px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) {
    .grid-3 { grid-template-columns: repeat(3, 1fr); }
    .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
}

.btn-sm { padding: 8px 16px; font-size: 0.8rem; }

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #000;
    font-weight: 800;
}

.btn-primary:hover {
    box-shadow: var(--glow-primary);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--bg-card);
    border-color: var(--secondary);
    color: var(--text);
}

.btn-secondary:hover {
    background: var(--secondary);
    box-shadow: var(--glow-secondary);
}

.btn-outline {
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-accent { background: var(--accent); color: #000; font-weight: 800; }

.btn-glow { animation: neonPulse 2s infinite alternate; }

@keyframes neonPulse {
    0% { box-shadow: 0 0 5px var(--primary); }
    100% { box-shadow: 0 0 20px var(--primary); }
}

/* =========================================
   MODAL / POPUP
========================================== */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

.modal-overlay.active { opacity: 1; pointer-events: all; }

.modal-card {
    background: var(--bg-card);
    border: 1px solid rgba(0, 229, 255, 0.2);
    border-radius: var(--radius-lg);
    padding: 40px;
    max-width: 450px;
    width: 90%;
    text-align: center;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8), var(--glow-primary);
}

.modal-logo { color: var(--primary); margin-bottom: 15px; }
.modal-card h2 { margin-bottom: 10px; font-size: 1.6rem; }
.modal-card p { color: var(--text-muted); margin-bottom: 25px; }
.modal-actions { display: flex; flex-direction: column; gap: 12px; }

/* =========================================
   NAVBAR
========================================== */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    padding: 20px 0;
    background: rgba(15, 15, 15, 0.8);
    backdrop-filter: blur(8px);
    transition: var(--transition);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.navbar.scrolled {
    padding: 10px 0;
    background: rgba(15, 15, 15, 0.95);
    border-bottom-color: rgba(0, 229, 255, 0.2);
}

.nav-container { display: flex; align-items: center; justify-content: space-between; }

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text);
}

.logo svg { color: var(--primary); }
.nav-toggle { background: none; border: none; color: var(--text); cursor: pointer; display: block; }

.nav-menu {
    position: fixed;
    top: 100%; left: 0; right: 0;
    background: var(--bg-card);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    transform: translateY(-150%);
    transition: var(--transition);
    border-bottom: 1px solid var(--secondary);
}

.nav-menu.open { transform: translateY(0); }
.nav-link { font-weight: 600; color: var(--text-muted); transition: var(--transition); }
.nav-link:hover, .nav-link.active { color: var(--primary); }
.nav-auth { display: flex; gap: 10px; margin-top: 10px; }

@media (min-width: 900px) {
    .nav-toggle { display: none; }
    .nav-menu {
        position: static;
        transform: none;
        background: none;
        padding: 0;
        flex-direction: row;
        align-items: center;
        gap: 20px;
        border: none;
    }
    .nav-auth { margin-top: 0; }
}

/* =========================================
   HERO SECTION
========================================== */
.hero-section {
    padding: 140px 0 80px;
    background: radial-gradient(circle at 50% 30%, rgba(106, 92, 255, 0.15), transparent 70%);
}

.hero-container { display: grid; grid-template-columns: 1fr; gap: 40px; align-items: center; }

.hero-title {
    font-size: 2.2rem;
    line-height: 1.15;
    margin-bottom: 15px;
    background: linear-gradient(180deg, #fff, var(--text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 30px; }
.hero-buttons { display: flex; gap: 15px; flex-wrap: wrap; }
.hero-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }

.mini-game-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: var(--shadow-soft);
}

.mini-card-info { padding: 10px; display: flex; justify-content: space-between; font-size: 0.85rem; font-weight: 700; }

@media (min-width: 900px) {
    .hero-container { grid-template-columns: 1.2fr 0.8fr; }
    .hero-title { font-size: 3.2rem; }
}

/* =========================================
   FEATURE CARD & GAME CARDS
========================================== */
.feature-card, .why-card {
    background: var(--bg-card);
    padding: 25px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

.feature-card:hover { transform: translateY(-5px); border-color: var(--primary); box-shadow: var(--glow-primary); }
.icon-wrapper, .why-card svg { color: var(--primary); margin-bottom: 15px; }
.feature-card h3, .why-card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.feature-card p, .why-card p { font-size: 0.9rem; color: var(--text-muted); }

.game-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

.game-card:hover { transform: scale(1.03); border-color: var(--secondary); box-shadow: var(--glow-secondary); }
.thumb-container { position: relative; aspect-ratio: 16/10; overflow: hidden; }

.game-tag {
    position: absolute;
    top: 10px; right: 10px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    padding: 4px 8px;
    font-size: 0.7rem;
    border-radius: 4px;
    font-family: var(--font-heading);
}

.game-info { padding: 15px; }
.game-info h3 { font-size: 1rem; margin-bottom: 10px; }
.game-meta { display: flex; justify-content: space-between; align-items: center; }
.rating { color: var(--accent); font-weight: 700; }

/* =========================================
   LIVE EVENT & LEADERBOARD
========================================== */
.event-banner {
    background: linear-gradient(135deg, rgba(106, 92, 255, 0.2), rgba(0, 229, 255, 0.1)), var(--bg-card);
    border: 1px solid var(--secondary);
    border-radius: var(--radius-lg);
    padding: 40px 20px;
    text-align: center;
    box-shadow: var(--shadow-soft);
}

.event-content h2 { font-size: 1.8rem; margin-bottom: 10px; }
.event-content p { color: var(--text-muted); margin-bottom: 25px; }

.countdown-container { display: flex; justify-content: center; gap: 15px; margin-bottom: 30px; }

.time-box {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    padding: 10px 15px;
    min-width: 70px;
}

.time-box span { display: block; font-family: var(--font-heading); font-size: 1.8rem; color: var(--accent); line-height: 1; }
.time-box small { font-size: 0.75rem; color: var(--text-muted); }

.leaderboard-table { background: var(--bg-card); border-radius: var(--radius-md); overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.05); }

.lb-row {
    display: grid;
    grid-template-columns: 60px 1fr 100px;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.lb-header { background: rgba(0, 0, 0, 0.3); font-family: var(--font-heading); font-size: 0.85rem; color: var(--text-muted); }
.lb-rank { font-family: var(--font-heading); font-weight: 800; }
.rank-1 .lb-rank { color: var(--accent); }
.rank-2 .lb-rank { color: #c0c0c0; }
.rank-3 .lb-rank { color: #cd7f32; }
.lb-player { display: flex; align-items: center; gap: 12px; }
.avatar { border-radius: 50%; border: 2px solid var(--primary); }
.nickname { font-weight: 700; }
.lb-score { text-align: right; font-family: var(--font-heading); color: var(--primary); }

/* =========================================
   PROMOTION SLIDER
========================================== */
.slider-wrapper { overflow: hidden; border-radius: var(--radius-md); }
.slider-track { display: flex; transition: transform 0.5s ease-in-out; }
.slide { min-width: 100%; }

.promo-card {
    background: linear-gradient(135deg, var(--secondary), #241442);
    padding: 40px 30px;
    border-radius: var(--radius-md);
    text-align: center;
}

.promo-card.alt-1 { background: linear-gradient(135deg, #00838f, var(--bg-card)); }
.promo-card.alt-2 { background: linear-gradient(135deg, #d81b60, var(--bg-card)); }
.promo-card h3 { font-size: 1.8rem; margin-bottom: 10px; }

/* =========================================
   SEO TEXT ARTICLE BLOCK
========================================== */
.seo-text-block {
    background: var(--bg-card);
    padding: 40px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.seo-text-block h2 { font-size: 1.6rem; color: var(--primary); margin-bottom: 15px; }
.seo-text-block h3 { font-size: 1.2rem; color: var(--text); margin: 20px 0 10px; }
.seo-text-block p { color: var(--text-muted); margin-bottom: 15px; font-size: 0.95rem; line-height: 1.7; }
.seo-text-block strong { color: var(--text); }

/* =========================================
   FAQ ACCORDION
========================================== */
.accordion { display: flex; flex-direction: column; gap: 15px; }
.faq-item { background: var(--bg-card); border-radius: var(--radius-sm); border: 1px solid rgba(255, 255, 255, 0.05); overflow: hidden; }

.faq-toggle {
    width: 100%;
    padding: 20px;
    background: none;
    border: none;
    color: var(--text);
    font-family: var(--font-heading);
    font-size: 0.95rem;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.faq-toggle svg { transition: var(--transition); }
.faq-item.active .faq-toggle svg { transform: rotate(180deg); }

.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0 20px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.faq-item.active .faq-content { padding-bottom: 20px; }

/* =========================================
   FOOTER
========================================== */
.footer {
    background: #080808;
    padding: 60px 0 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-grid { display: grid; grid-template-columns: 1fr; gap: 30px; margin-bottom: 40px; }
.footer-brand p { color: var(--text-muted); margin-top: 15px; font-size: 0.9rem; }
.footer-links h4, .footer-social h4 { font-size: 1rem; margin-bottom: 15px; color: var(--primary); }
.footer-links ul { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { color: var(--text-muted); font-size: 0.9rem; transition: var(--transition); }
.footer-links a:hover { color: var(--text); }
.social-icons { display: flex; gap: 15px; }

.social-icons a {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px;
    background: var(--bg-card);
    border-radius: 50%;
    color: var(--text);
    transition: var(--transition);
}

.social-icons a:hover { background: var(--primary); color: #000; }
.footer-bottom { text-align: center; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, 0.05); color: var(--text-muted); font-size: 0.85rem; }

@media (min-width: 768px) {
    .footer-grid { grid-template-columns: 2fr 1fr 1fr 1.5fr; }
}