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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 100%);
    color: #e0e0e0;
    min-height: 100vh;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

header {
    text-align: center;
    margin-bottom: 3rem;
}

header h1 {
    font-size: 3rem;
    color: #fff;
    margin-bottom: 0.5rem;
    background: linear-gradient(90deg, #4a9eff, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

header p {
    color: #888;
    font-size: 1.1rem;
}

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

.game-card {
    background: linear-gradient(145deg, #1a1a2e, #16162a);
    border: 1px solid #2a2a4a;
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(74, 158, 255, 0.1), rgba(168, 85, 247, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.game-card:hover {
    transform: translateY(-5px);
    border-color: #4a9eff;
    box-shadow: 0 10px 40px rgba(74, 158, 255, 0.2);
}

.game-card:hover::before {
    opacity: 1;
}

.game-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.game-card h2 {
    font-size: 1.3rem;
    color: #fff;
    position: relative;
    z-index: 1;
}

/* Individual card colors */
.game-card[data-game="project-infinity"] .game-icon {
    color: #a855f7;
}

.game-card[data-game="boids"] .game-icon {
    color: #22c55e;
}

.game-card[data-game="chopping-choppers"] .game-icon {
    color: #ef4444;
}

.game-card[data-game="gravity-golf"] .game-icon {
    color: #3b82f6;
}

.game-card[data-game="requests"] .game-icon {
    color: #f59e0b;
}

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

.modal.hidden {
    display: none;
}

.modal-content {
    background: linear-gradient(145deg, #1a1a2e, #16162a);
    border: 1px solid #2a2a4a;
    border-radius: 20px;
    padding: 2.5rem;
    width: 100%;
    max-width: 450px;
    text-align: center;
    position: relative;
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #888;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.modal-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.modal-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.modal-content h2 {
    font-size: 1.8rem;
    color: #fff;
    margin-bottom: 0.75rem;
}

.status-badge {
    display: inline-block;
    background: linear-gradient(90deg, #4a9eff, #a855f7);
    color: #fff;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

#modal-description {
    color: #aaa;
    line-height: 1.7;
    margin-bottom: 2rem;
    font-size: 1rem;
}

.play-btn {
    display: inline-block;
    background: linear-gradient(90deg, #4a9eff, #a855f7);
    color: #fff;
    text-decoration: none;
    padding: 0.9rem 2.5rem;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.play-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 25px rgba(74, 158, 255, 0.4);
}

@media (max-width: 600px) {
    .container {
        padding: 2rem 1rem;
    }

    header h1 {
        font-size: 2rem;
    }

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

    .modal-content {
        margin: 1rem;
        padding: 2rem 1.5rem;
    }
}
