:root {
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary: #21262d;
    --text-primary: #ffffff;
    --text-secondary: #8b949e;
    --accent: #58a6ff;
    --accent-hover: #1f6feb;
    --border: #30363d;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
}

header {
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

header h1 {
    font-size: 1.5rem;
    background: linear-gradient(135deg, var(--accent), #bb6bd9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

select {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
}

select:hover {
    border-color: var(--accent);
}

main {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.loading, .empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.empty-state h2 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.empty-state code {
    background-color: var(--bg-tertiary);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.game-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.game-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 8px 24px rgba(88, 166, 255, 0.2);
}

.game-card.coming-soon {
    cursor: default;
}

.game-card.coming-soon:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--border);
}

.game-card.coming-soon .game-thumbnail {
    height: auto;
    object-fit: contain;
    filter: grayscale(0.6);
    transition: filter 0.3s ease;
}

.game-card.coming-soon:hover .game-thumbnail {
    filter: grayscale(0);
}

.game-thumbnail {
    width: 100%;
    height: auto;
    object-fit: contain;
    background-color: var(--bg-tertiary);
}

.game-info {
    padding: 1rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.game-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.game-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 0.75rem;
    flex-grow: 1;
}

.game-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.game-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.tag {
    background-color: var(--bg-tertiary);
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
}

@media (max-width: 768px) {
    .game-grid {
        grid-template-columns: 1fr;
    }

    header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
}
