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

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: #0a0a1a;
    color: #e0e0e0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    text-align: center;
    padding: 3rem 1rem 2rem;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    border-bottom: 2px solid #6c5ce722;
}

header h1 {
    font-size: 3rem;
    background: linear-gradient(90deg, #6c5ce7, #a29bfe, #fd79a8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.2rem;
    color: #a29bfe;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.description {
    font-size: 1rem;
    color: #888;
    max-width: 600px;
    margin: 0 auto;
}

main {
    flex: 1;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

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

.game-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 1.5rem 1.25rem;
    border-radius: 16px;
    border: 2px solid #6c5ce744;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    cursor: pointer;
}

.game-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(108, 92, 231, 0.2);
    border-color: #6c5ce7;
}

.game-emoji {
    font-size: 3rem;
    margin-bottom: 0.75rem;
}

.game-title {
    font-size: 1.4rem;
    color: #fff;
    margin-bottom: 0.25rem;
    text-align: center;
}

.game-creator {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 0.75rem;
}

.game-genre {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.game-description {
    font-size: 0.85rem;
    color: #aaa;
    text-align: center;
    line-height: 1.4;
    margin-bottom: 1rem;
    padding: 0 0.25rem;
}

.play-button {
    display: inline-block;
    padding: 0.5rem 2rem;
    border-radius: 8px;
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    transition: opacity 0.2s;
}

.game-card:hover .play-button {
    opacity: 0.9;
}

.card-footer {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
    width: 100%;
    justify-content: center;
}

.code-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.4rem 0.9rem;
    border-radius: 8px;
    border: 1px solid #6c5ce766;
    font-size: 0.8rem;
    color: #a29bfe;
    text-decoration: none;
    background: rgba(108, 92, 231, 0.08);
    transition: background 0.2s, border-color 0.2s;
    white-space: nowrap;
}

.code-link:hover {
    background: rgba(108, 92, 231, 0.22);
    border-color: #a29bfe;
    color: #fff;
}

.loading {
    text-align: center;
    color: #666;
    font-size: 1.1rem;
    grid-column: 1 / -1;
    padding: 4rem;
}

.no-games {
    text-align: center;
    padding: 4rem 1rem;
    color: #888;
    font-size: 1.2rem;
}

.no-games p:first-child {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

footer {
    text-align: center;
    padding: 2rem;
    color: #555;
    font-size: 0.9rem;
    border-top: 1px solid #ffffff11;
}

@media (max-width: 600px) {
    header h1 {
        font-size: 2rem;
    }
    .games-grid {
        grid-template-columns: 1fr;
    }
}
