/* BASE STYLES & VARIABLES */
:root {
    --bg-main: #050505;
    --bg-card: rgba(255, 255, 255, 0.07);
    --border-card: rgba(255, 255, 255, 0.15);
    --color-primary: #22c55e;
    --color-secondary: #3b82f6;
    --color-highlight: #9333ea;
    --color-text: #ffffff;
    --font-main: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

/* ANIMATED DARK GRADIENT BACKGROUND */
@keyframes backgroundMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

body {
    background: linear-gradient(120deg, #050505, #0f172a, #050505);
    background-size: 300% 300%;
    animation: backgroundMove 12s infinite ease-in-out;
    color: var(--color-text);
    font-family: var(--font-main);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 20px;
}

/* TYPOGRAPHY & GLOWS */
h1, h2, h3 {
    margin-bottom: 15px;
    font-weight: 700;
}

p {
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
}

.glow-text {
    font-size: 3.5rem;
    background: linear-gradient(to right, var(--color-primary), var(--color-secondary), var(--color-highlight));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(59, 130, 246, 0.3);
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.5rem;
    text-shadow: 0 0 10px rgba(147, 51, 234, 0.5);
}

/* GLASSMORPHISM UI RULES */
.glass-panel {
    background: rgba(5, 5, 5, 0.6);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border-card);
}

.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 14px;
    border: 1px solid var(--border-card);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
    transition: 0.3s ease;
    overflow: hidden;
}

.glass-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 0 25px rgba(147, 51, 234, 0.5);
}

/* BUTTONS */
.btn {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: var(--color-text);
    border-radius: 25px;
    padding: 10px 24px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    display: inline-block;
    transition: all 0.3s ease;
    text-align: center;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
}

.btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.6);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--color-secondary);
    box-shadow: none;
}

.btn-outline:hover {
    background: rgba(59, 130, 246, 0.1);
}

/* HEADER & NAVIGATION */
.sticky-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-text);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 0 10px var(--color-primary);
}

.nav-links {
    display: flex;
    gap: 25px;
}

.nav-links a {
    color: var(--color-text);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    position: relative;
    padding-bottom: 5px;
    transition: color 0.3s;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background: var(--color-secondary);
    box-shadow: 0 0 10px var(--color-secondary);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--color-primary);
}

.nav-links a:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.hamburger .bar {
    width: 25px;
    height: 3px;
    background-color: var(--color-text);
    border-radius: 3px;
    transition: 0.3s;
}

/* HERO SECTION */
.hero-section {
    padding-top: 150px;
    padding-bottom: 80px;
    text-align: center;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: radial-gradient(circle at 50% 50%, rgba(147, 51, 234, 0.1) 0%, transparent 60%);
}

.hero-content {
    max-width: 800px;
    padding: 20px;
}

.hero-content p {
    font-size: 1.2rem;
    margin: 20px 0 40px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* FEATURES SECTION */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    padding: 30px;
    text-align: center;
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    filter: drop-shadow(0 0 10px var(--color-secondary));
}

/* GAMES SECTION */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.game-card {
    display: flex;
    flex-direction: column;
}

.game-image-wrapper {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
    background: #111;
}

.game-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    opacity: 0.8;
}

.game-card:hover .game-img {
    transform: scale(1.1);
    opacity: 1;
}

.game-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.game-info h3 {
    color: var(--color-secondary);
}

.game-info p {
    margin-bottom: 20px;
    flex-grow: 1;
    font-size: 0.95rem;
}

.game-info .btn {
    width: 100%;
}

/* LEADERBOARD SECTION */
.leaderboard-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.leaderboard-header {
    display: flex;
    justify-content: space-between;
    padding: 15px 20px;
    font-weight: 700;
    color: var(--color-secondary);
    border-bottom: 1px solid var(--border-card);
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
}

.leaderboard-row {
    display: flex;
    justify-content: space-between;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: background 0.3s;
    opacity: 0; /* For JS animation */
    transform: translateX(-20px);
}

.leaderboard-row.visible {
    opacity: 1;
    transform: translateX(0);
    transition: all 0.6s ease-out;
}

.leaderboard-row:hover {
    background: rgba(255,255,255,0.05);
}

.leaderboard-row:last-child {
    border-bottom: none;
}

.highlight-text {
    color: var(--color-primary);
    font-weight: 800;
    text-shadow: 0 0 10px var(--color-primary);
}

/* NEWSLETTER SECTION */
.newsletter-card {
    max-width: 600px;
    margin: 0 auto;
    padding: 40px;
    text-align: center;
}

.newsletter-form {
    display: flex;
    margin-top: 25px;
    gap: 10px;
}

.newsletter-form input {
    flex-grow: 1;
    padding: 12px 20px;
    border-radius: 25px;
    border: 1px solid var(--border-card);
    background: rgba(0,0,0,0.5);
    color: var(--color-text);
    outline: none;
    font-family: inherit;
}

.newsletter-form input:focus {
    border-color: var(--color-secondary);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

/* LEGAL SECTION (Privacy / Terms) */
.legal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.legal-card {
    padding: 30px;
}

.legal-card h3 {
    color: var(--color-highlight);
    border-bottom: 1px solid var(--border-card);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.legal-card p {
    font-size: 0.9rem;
    color: #ccc;
}

.legal-card strong {
    color: var(--color-text);
}

/* FOOTER */
.site-footer {
    padding: 60px 20px 20px;
    margin-top: 40px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
    padding: 0 0 40px 0;
    border-bottom: 1px solid var(--border-card);
}

.footer-brand h2 {
    color: var(--color-primary);
    margin-bottom: 5px;
}

.footer-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--color-secondary);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    color: #888;
    font-size: 0.9rem;
}

/* RESPONSIVE DESIGN */
@media (max-width: 768px) {
    .glow-text {
        font-size: 2.5rem;
    }
    
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(5, 5, 5, 0.95);
        backdrop-filter: blur(15px);
        padding: 20px 0;
        text-align: center;
        border-bottom: 1px solid var(--border-card);
    }

    .nav-links.active {
        display: flex;
    }

    .hamburger {
        display: flex;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .legal-grid {
        grid-template-columns: 1fr;
    }

    .hero-buttons {
        flex-direction: column;
    }
}