/* Utility classes */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.text-gradient {
    background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.glass-panel {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-radius: 16px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 32px;
    background: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition-medium);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: var(--color-primary);
    transition: var(--transition-medium);
    z-index: -1;
}

.btn-primary:hover::before {
    width: 100%;
}

.btn-primary:hover {
    color: var(--color-bg);
    box-shadow: var(--glow-primary-intense);
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    font-weight: 700;
}

/* Background Canvas */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
}

/* === Header === */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
    transition: var(--transition-medium);
}

header.scrolled {
    background: rgba(5, 5, 15, 0.85);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--glass-border);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: #fff;
    text-shadow: var(--glow-primary);
}

.logo span {
    color: var(--color-primary);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-weight: 500;
    font-size: 1.1rem;
    position: relative;
    transition: var(--transition-fast);
}

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

.mobile-menu-btn {
    display: none;
    color: #fff;
    font-size: 1.5rem;
}

/* === Hero Section === */
.hero {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 800px;
    z-index: 2;
    padding: 2rem;
}

.hero-title {
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--color-text-muted);
    margin-bottom: 2.5rem;
}

.floating-words {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0.2;
}

/* === Game Grid Section === */
.games-section {
    padding: 6rem 0;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.game-card {
    padding: 2rem;
    text-align: center;
    transition: var(--transition-medium);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    cursor: pointer;
}

.game-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    padding: 2px;
    background: linear-gradient(135deg, transparent, transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    transition: var(--transition-medium);
}

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
}

.game-card:hover::after {
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
}

.game-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--color-primary);
    filter: drop-shadow(0 0 8px var(--color-primary-glow));
    transition: var(--transition-fast);
}

.game-card:hover .game-icon {
    transform: scale(1.1);
}

.game-title {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: #fff;
}

.game-desc {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.game-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 1.5rem;
}

.difficulty {
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
    text-transform: uppercase;
}

.diff-easy { background: rgba(0, 255, 0, 0.1); color: var(--color-success); border: 1px solid var(--color-success); }
.diff-medium { background: rgba(255, 165, 0, 0.1); color: orange; border: 1px solid orange; }
.diff-hard { background: rgba(255, 0, 0, 0.1); color: var(--color-danger); border: 1px solid var(--color-danger); }

.play-btn {
    width: 100%;
    padding: 10px 0;
    border-radius: 8px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff;
    font-weight: 600;
    transition: var(--transition-fast);
    text-transform: uppercase;
    font-size: 0.9rem;
}

.game-card:hover .play-btn {
    background: var(--color-primary);
    color: var(--color-bg);
    border-color: var(--color-primary);
    box-shadow: var(--glow-primary);
}

/* === Features Section === */
.features-section {
    padding: 6rem 0;
    background: linear-gradient(180deg, var(--color-bg) 0%, #0a0a1a 50%, var(--color-bg) 100%);
    position: relative;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.feature-card {
    padding: 2rem;
    text-align: center;
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--color-accent);
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 10px var(--color-accent-glow));
}

.feature-card h3 {
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

/* === Leaderboard Section === */
.leaderboard-section {
    padding: 6rem 0;
}

.leaderboard-container {
    max-width: 600px;
    margin: 0 auto;
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.leaderboard-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    transition: var(--transition-fast);
}

.leaderboard-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.02);
}

.lb-rank {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-primary);
    width: 30px;
}

.lb-player {
    flex-grow: 1;
    font-weight: 600;
}

.lb-score {
    font-family: monospace;
    font-size: 1.2rem;
    color: var(--color-accent);
}

.lb-1 { background: rgba(212, 175, 55, 0.15); border: 1px solid rgba(212, 175, 55, 0.4); }
.lb-1 .lb-rank { color: #d4af37; text-shadow: 0 0 10px #d4af37; }
.lb-2 { background: rgba(192, 192, 192, 0.1); border: 1px solid rgba(192, 192, 192, 0.3); }
.lb-2 .lb-rank { color: #c0c0c0; }
.lb-3 { background: rgba(205, 127, 50, 0.1); border: 1px solid rgba(205, 127, 50, 0.3); }
.lb-3 .lb-rank { color: #cd7f32; }

/* === CTA Section === */
.cta-section {
    padding: 8rem 0;
    text-align: center;
    position: relative;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    background: var(--color-accent);
    filter: blur(150px);
    opacity: 0.3;
    z-index: -1;
    pointer-events: none;
}

.cta-section h2 {
    font-size: 3rem;
    margin-bottom: 2rem;
}

/* === Footer === */
footer {
    background: #020205;
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--glass-border);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-col {
    max-width: 300px;
}

.footer-col h3 {
    margin-bottom: 1rem;
    color: var(--color-primary);
}

.footer-col p {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.footer-col ul {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-col a {
    color: var(--color-text-muted);
    transition: var(--transition-fast);
}

.footer-col a:hover {
    color: var(--color-accent);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    font-size: 1.5rem;
    color: white;
}

.footer-bottom {
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.9rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.05);
}

/* === Responsive === */
@media (max-width: 900px) {
    .hero-title {
        font-size: 3.5rem;
    }
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 250px;
        background: rgba(5, 5, 15, 0.95);
        backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: 0.4s ease;
        border-left: 1px solid var(--glass-border);
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .mobile-menu-btn {
        display: block;
        z-index: 1001;
    }

    .hero-title {
        font-size: 2.8rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

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

    .footer-content {
        flex-direction: column;
    }
}
