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

:root {
    --primary: #6c5ce7;
    --primary-dark: #5a4bd1;
    --secondary: #00cec9;
    --accent: #fd79a8;
    --bg: #0f0f1a;
    --bg-card: #1a1a2e;
    --bg-card-hover: #25254a;
    --text: #ffffff;
    --text-muted: #a0a0b8;
    --gradient-1: linear-gradient(135deg, #6c5ce7, #a855f7);
    --gradient-2: linear-gradient(135deg, #00cec9, #0984e3);
    --gradient-3: linear-gradient(135deg, #fd79a8, #e84393);
    --gradient-4: linear-gradient(135deg, #fdcb6e, #e17055);
    --gradient-5: linear-gradient(135deg, #55efc4, #00b894);
    --gradient-6: linear-gradient(135deg, #74b9ff, #0984e3);
    --gradient-7: linear-gradient(135deg, #ff7675, #d63031);
    --gradient-8: linear-gradient(135deg, #ffeaa7, #fdcb6e);
    --radius: 16px;
}

body {
    font-family: 'Nunito', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(15, 15, 26, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(108, 92, 231, 0.2);
    padding: 16px 0;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.logo {
    text-decoration: none;
    font-size: 28px;
    font-weight: 900;
    display: flex;
    align-items: center;
    gap: 2px;
}

.logo-aha {
    color: #fd79a8;
    text-shadow: 0 0 20px rgba(253, 121, 168, 0.5);
}

.logo-game {
    color: #6c5ce7;
    text-shadow: 0 0 20px rgba(108, 92, 231, 0.5);
}

.nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.nav-link {
    text-decoration: none;
    color: var(--text-muted);
    padding: 8px 20px;
    border-radius: 100px;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.nav-link:hover {
    color: var(--text);
    background: rgba(108, 92, 231, 0.15);
}

.nav-link.active {
    color: var(--text);
    background: var(--primary);
    border-color: var(--primary);
}

/* Hero */
.hero {
    text-align: center;
    padding: 60px 0 40px;
}

.hero h1 {
    font-size: 48px;
    font-weight: 900;
    background: linear-gradient(135deg, #fd79a8, #6c5ce7, #00cec9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
}

.hero p {
    color: var(--text-muted);
    font-size: 18px;
    font-weight: 600;
}

/* Games Grid */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 24px;
    padding-bottom: 60px;
}

.game-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
}

.game-card:hover {
    transform: translateY(-8px);
    border-color: rgba(108, 92, 231, 0.5);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4),
                0 0 30px rgba(108, 92, 231, 0.15);
}

.game-card-thumb {
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    position: relative;
    overflow: hidden;
}

.game-card-thumb::after {
    content: '▶';
    position: absolute;
    width: 56px;
    height: 56px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(4px);
}

.game-card:hover .game-card-thumb::after {
    opacity: 1;
}

.game-card-info {
    padding: 16px;
}

.game-card-info h3 {
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 4px;
}

.game-card-info .game-category {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Game Modal */
.game-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    align-items: center;
    justify-content: center;
}

.game-modal.active {
    display: flex;
}

.game-modal-content {
    background: var(--bg-card);
    border-radius: var(--radius);
    width: 95%;
    max-width: 800px;
    max-height: 95vh;
    overflow: hidden;
    border: 2px solid rgba(108, 92, 231, 0.3);
    box-shadow: 0 0 60px rgba(108, 92, 231, 0.2);
}

.game-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.game-modal-header h2 {
    font-size: 20px;
    font-weight: 800;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 32px;
    cursor: pointer;
    padding: 0 8px;
    transition: color 0.3s ease;
    line-height: 1;
}

.modal-close:hover {
    color: var(--accent);
}

.game-modal-body {
    width: 100%;
    aspect-ratio: 4/3;
}

.game-modal-body iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Footer */
.footer {
    background: rgba(10, 10, 20, 0.8);
    border-top: 1px solid rgba(108, 92, 231, 0.15);
    padding: 60px 0 0;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 40px;
}

.footer-brand .logo-aha,
.footer-brand .logo-game {
    font-size: 24px;
}

.footer-desc {
    color: var(--text-muted);
    margin-top: 12px;
    font-size: 14px;
    line-height: 1.6;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links h4 {
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 4px;
    color: var(--text);
}

.footer-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    transition: color 0.3s ease;
}

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 20px 0;
    text-align: center;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 14px;
}

.footer-bottom strong {
    color: var(--accent);
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 32px;
    }

    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 16px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .header .container {
        justify-content: center;
    }

    .nav {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .game-card-info {
        padding: 12px;
    }

    .game-card-info h3 {
        font-size: 14px;
    }
}
