:root {
    --bg-deep: #090d16;
    --surface: #131c31;
    --surface-hover: #1b2642;
    --accent-cyan: #38bdf8;
    --accent-purple: #c084fc;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: rgba(56, 189, 248, 0.15);
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-deep);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Background Ambient Glow */
.ambient-glow {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 300px;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.15), rgba(192, 132, 252, 0.15));
    filter: blur(100px);
    z-index: 0;
    pointer-events: none;
}

header {
    text-align: center;
    padding: 3.5rem 1rem 2rem;
    position: relative;
    z-index: 1;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.arcade-icon {
    font-size: 2.5rem;
    animation: bounce 2s infinite ease-in-out;
}

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

header h1 {
    margin: 0;
    font-family: 'Press Start 2P', monospace;
    font-size: 1.8rem;
    background: linear-gradient(90deg, #38bdf8, #818cf8, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 1px;
}

header p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 500px;
    margin: 0.75rem auto 1.5rem;
}

.badge-row {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.tag {
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid var(--border-color);
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--accent-cyan);
    font-weight: 600;
}

.game-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2.5rem;
    padding: 2rem 1.5rem 4rem;
    flex: 1;
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.game-card {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    width: 320px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s, box-shadow 0.3s;
}

.game-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-cyan);
    box-shadow: 0 20px 35px -10px rgba(56, 189, 248, 0.2);
}

.card-banner {
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.snake-banner {
    background: linear-gradient(135deg, #065f46, #047857);
}

.ttt-banner {
    background: linear-gradient(135deg, #1e3a8a, #3b82f6);
}

.game-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    padding: 0.25rem 0.7rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.emoji-art {
    font-size: 3.5rem;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
    transition: transform 0.3s;
}

.game-card:hover .emoji-art {
    transform: scale(1.1) rotate(5deg);
}

.card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
}

.card-content h2 {
    margin: 0 0 0.5rem 0;
    font-size: 1.4rem;
    color: var(--text-main);
}

.card-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0 0 1.5rem 0;
}

.play-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    color: white;
    text-align: center;
    padding: 0.85rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: filter 0.2s, transform 0.1s;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.play-btn:hover {
    filter: brightness(1.1);
}

.play-btn:active {
    transform: scale(0.98);
}

footer {
    text-align: center;
    padding: 1.5rem;
    background: rgba(15, 23, 42, 0.8);
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.85rem;
    position: relative;
    z-index: 1;
}

/* Mobile Responsiveness */
@media (max-width: 650px) {
    header h1 {
        font-size: 1.3rem;
    }
    .game-grid {
        padding: 1rem;
    }
    .game-card {
        width: 100%;
        max-width: 350px;
    }
    }
