:root {
    --bg-color: #050810;
    --accent-color: #00d2ff;
    --accent-secondary: #3a7bd5;
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --card-bg: rgba(255, 255, 255, 0.03);
    --glow-color: rgba(0, 210, 255, 0.2);
}

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

body {
    background-color: var(--bg-color);
    background-image:
        radial-gradient(circle at 50% 50%, rgba(0, 210, 255, 0.05), transparent 80%),
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 100% 100%, 50px 50px, 50px 50px;
    color: var(--text-primary);
    font-family: 'Plus Jakarta Sans', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* --- LOADER --- */
#app-loader {
    position: fixed; inset: 0; background: #050810; z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    transition: opacity 0.8s ease, visibility 0.8s;
}
#app-loader.fade-out { opacity: 0; visibility: hidden; }
.loader-content { text-align: center; width: 200px; }
.progress-bar { width: 100%; height: 2px; background: rgba(255,255,255,0.1); margin-top: 20px; position: relative; overflow: hidden; }
#loader-progress-fill { position: absolute; left: 0; top: 0; height: 100%; width: 0%; background: var(--accent-color); box-shadow: 0 0 10px var(--accent-color); transition: 0.3s; }
.cube-container { width: 40px; height: 40px; background: var(--accent-color); margin: 0 auto; box-shadow: 0 0 30px var(--accent-color); animation: cube-fall 1.5s infinite ease-in-out; }

@keyframes cube-fall {
    0% { transform: translateY(-30px) rotate(0deg) scale(0.8); opacity: 0; }
    50% { transform: translateY(0) rotate(180deg) scale(1.1); opacity: 1; }
    100% { transform: translateY(30px) rotate(360deg) scale(0.8); opacity: 0; }
}

/* --- ANIMATIONS --- */
.reveal { transition: all 1s cubic-bezier(0.4, 0, 0.2, 1); }
.reveal-init { opacity: 0; transform: translateY(40px) scale(0.95); }

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

.animated-header span {
    display: inline-block;
    animation: wave 4s ease-in-out infinite;
    opacity: 0.6;
}

@keyframes wave {
    0%, 100% { opacity: 0.6; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(-5px); text-shadow: 0 0 15px var(--accent-color); }
}

/* --- COMPONENTS --- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
header { height: 100vh; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
#hero-canvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.hero-content { position: relative; z-index: 10; text-align: center; }
.hero-content h1 {
    font-size: clamp(3rem, 12vw, 7rem);
    font-family: 'Michroma', sans-serif;
    background: linear-gradient(to bottom, #fff 50%, #666);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.games-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; margin-top: 50px; }
.game-card {
    background: var(--card-bg);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px;
    transition: 0.4s;
    backdrop-filter: blur(10px);
    overflow: hidden;
    animation: float 6s ease-in-out infinite;
}
.game-card:hover { transform: translateY(-10px); border-color: var(--accent-color); box-shadow: 0 10px 30px rgba(0, 210, 255, 0.1); }

.poster-container { position: relative; aspect-ratio: 16/9; overflow: hidden; }
.game-poster { width: 100%; height: 100%; object-fit: cover; transition: 0.6s; }
.game-card:hover .game-poster { transform: scale(1.1); }
.card-content { padding: 25px; }

.btn {
    display: inline-block; padding: 14px 30px;
    border: 1px solid var(--accent-color);
    background: transparent;
    color: #fff; text-decoration: none;
    font-family: 'Michroma', sans-serif; font-size: 0.65rem;
    letter-spacing: 1px; transition: 0.3s;
    cursor: pointer;
    outline: none;
}
.btn:hover { background: var(--accent-color); color: #000; box-shadow: 0 0 20px var(--accent-color); }

/* --- ACHIEVEMENTS --- */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.achievement-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 40px 30px;
    text-align: center;
    border-radius: 12px;
    transition: 0.3s;
    backdrop-filter: blur(5px);
}

.achievement-card:hover {
    border-color: var(--accent-color);
    background: rgba(0, 210, 255, 0.05);
    transform: translateY(-5px);
}

.achievement-card h4 {
    font-family: 'Michroma', sans-serif;
    font-size: 0.9rem;
    margin-bottom: 10px;
    letter-spacing: 2px;
    color: var(--text-primary);
}

/* --- LEADERBOARD (PODIUM) --- */
.podium-container {
    display: flex; justify-content: center; align-items: flex-end;
    gap: 40px; margin: 60px 0; padding: 20px;
}
.podium-member { text-align: center; display: flex; flex-direction: column; align-items: center; }
.avatar-wrapper { position: relative; margin-bottom: 15px; }
.avatar-circle {
    width: 80px; height: 80px; border-radius: 50%;
    background: linear-gradient(45deg, var(--accent-color), var(--accent-secondary));
    padding: 3px; box-shadow: 0 0 20px rgba(0, 210, 255, 0.2);
}
.avatar-circle img { width: 100%; height: 100%; border-radius: 50%; background: #050810; object-fit: cover; }
.large .avatar-circle { width: 120px; height: 120px; }
.rank-1 .avatar-circle { box-shadow: 0 0 40px rgba(255, 215, 0, 0.3); border: 2px solid #ffd700; }
.medal-badge { position: absolute; bottom: -5px; right: -5px; font-size: 1.5rem; }
.large .medal-badge { font-size: 2.2rem; bottom: 0; right: 0; }
.podium-name { font-family: 'Michroma', sans-serif; font-size: 0.8rem; margin-top: 10px; }
.podium-score { font-family: 'Michroma', sans-serif; font-size: 0.7rem; color: var(--accent-color); }

.leaderboard-table-header {
    display: grid; grid-template-columns: 60px 1.5fr 100px 120px 100px;
    padding: 15px 25px; font-family: 'Michroma', sans-serif;
    font-size: 0.55rem; color: var(--accent-color); border-bottom: 1px solid rgba(0, 210, 255, 0.1);
}
.leaderboard-row {
    display: grid; grid-template-columns: 60px 1.5fr 100px 120px 100px;
    padding: 18px 25px; border-bottom: 1px solid rgba(255,255,255,0.03);
    align-items: center; font-size: 0.85rem; transition: 0.2s;
}
.leaderboard-row:hover { background: rgba(255,255,255,0.02); }

/* --- CURSOR --- */
#cursor-dot {
    position: fixed; width: 6px; height: 6px; background: #fff;
    border-radius: 50%; pointer-events: none; z-index: 10000;
    transform: translate(-50%, -50%); box-shadow: 0 0 10px #fff;
}
#cursor-glow {
    position: fixed; width: 300px; height: 300px;
    background: radial-gradient(circle, var(--glow-color) 0%, transparent 70%);
    pointer-events: none; z-index: 9999; border-radius: 50%; mix-blend-mode: screen;
}

/* --- NEWS STRIP --- */
.news-strip { background: rgba(0, 210, 255, 0.05); border-top: 1px solid rgba(0, 210, 255, 0.1); border-bottom: 1px solid rgba(0, 210, 255, 0.1); padding: 10px 0; overflow: hidden; white-space: nowrap; position: relative; z-index: 5; }
.ticker { display: inline-block; font-family: 'Michroma', sans-serif; font-size: 0.55rem; color: var(--accent-color); animation: ticker 30s linear infinite; }
@keyframes ticker { 0% { transform: translateX(100%); } 100% { transform: translateX(-100%); } }

/* --- COOKIE BANNER --- */
.cookie-banner { position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%); background: rgba(10, 15, 25, 0.95); border: 1px solid var(--accent-color); padding: 20px 40px; z-index: 9000; display: flex; align-items: center; gap: 30px; backdrop-filter: blur(15px); border-radius: 4px; width: 90%; max-width: 800px; opacity: 0; visibility: hidden; transition: 0.5s; }
.cookie-banner.visible { opacity: 1; visibility: visible; }

/* --- MOBILE --- */
@media (max-width: 768px) {
    .container { padding: 0 15px; }
    .hero-content h1 { font-size: 4rem; }

    .podium-container { gap: 10px; transform: scale(0.9); margin: 30px 0; }
    .avatar-circle { width: 60px; height: 60px; }
    .large .avatar-circle { width: 90px; height: 90px; }
    .podium-name { font-size: 0.6rem; }

    .leaderboard-table-header, .leaderboard-row { grid-template-columns: 40px 1fr 80px; padding: 12px 15px; }
    .leaderboard-table-header div:nth-child(3), .leaderboard-table-header div:nth-child(4), .leaderboard-table-header div:nth-child(5),
    .leaderboard-row div:nth-child(3), .leaderboard-row div:nth-child(4), .leaderboard-row div:nth-child(5) { display: none; }

    .cookie-banner {
        flex-direction: column;
        gap: 15px;
        padding: 20px;
        text-align: center;
        bottom: 10px;
    }
    .cookie-banner p { font-size: 0.6rem !important; }
    .cookie-banner .btn { width: 100%; justify-content: center; display: flex; }

    #cursor-dot, #cursor-glow { display: none; }
    body { cursor: auto !important; }
}

@media (max-width: 480px) {
    .hero-content h1 { font-size: 3rem; }
    .podium-container { transform: scale(0.8); gap: 5px; }
    .games-grid { grid-template-columns: 1fr; }
}
