/* === Reset & Base === */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --purple-darkest: #1a0a2e;
    --purple-dark: #2d1b4e;
    --purple-mid: #5b2d8e;
    --purple-light: #8b5cc2;
    --purple-lightest: #c9a6f0;
    --amethyst: #9b59b6;
    --amethyst-glow: #bb77d6;
    --text-primary: #f0e6ff;
    --text-secondary: #b8a0d4;
    --surface: #251540;
    --surface-hover: #3a2260;
    --border: #4a2d6e;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--purple-darkest) 0%, var(--purple-dark) 50%, #1e0e35 100%);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* === Header === */
header {
    text-align: center;
    padding: 2.5rem 1rem 1.5rem;
    background: linear-gradient(180deg, rgba(91, 45, 142, 0.3) 0%, transparent 100%);
    border-bottom: 1px solid var(--border);
}

.site-brand {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
}

.site-crest {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
}

.site-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 2rem;
    font-weight: 400;
    background: linear-gradient(135deg, var(--purple-lightest), var(--amethyst-glow), var(--purple-light));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 0.02em;
    text-shadow: none;
    line-height: 1.4;
}

.site-tagline {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-top: 0.4rem;
}

/* === Main Layout === */
main {
    flex: 1;
    max-width: 960px;
    margin: 0 auto;
    padding: 2rem 1rem;
    width: 100%;
}

/* === Game Grid === */
.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    align-content: start;
}

/* === Game Cards === */
.game-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.game-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(155, 89, 182, 0.3);
    border-color: var(--purple-light);
}

.game-card.coming-soon {
    opacity: 0.5;
    pointer-events: none;
}

.game-thumbnail {
    width: 100%;
    aspect-ratio: 16 / 10;
    background: var(--purple-darkest);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.game-thumbnail canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.coming-soon-overlay {
    color: var(--text-secondary);
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.game-info {
    padding: 1rem 1.2rem;
}

.game-info h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--purple-lightest);
    margin-bottom: 0.3rem;
}

.game-info p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* === About Page === */
.about-main {
    flex: 1;
    max-width: 640px;
    margin: 0 auto;
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.back-link {
    color: var(--purple-light);
    text-decoration: none;
    font-size: 0.95rem;
}

.back-link:hover {
    text-decoration: underline;
}

.about-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
}

.about-card h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--purple-lightest);
    margin-bottom: 1rem;
}

.about-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.about-card p:last-child {
    margin-bottom: 0;
}

/* === Nav Link === */
.nav-link {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-decoration: none;
}

.nav-link:hover {
    color: var(--purple-lightest);
    text-decoration: underline;
}

/* === Footer === */
footer {
    text-align: center;
    padding: 1.5rem 1rem;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.85rem;
    background: rgba(26, 10, 46, 0.5);
}

/* === Responsive === */
@media (max-width: 600px) {
    .site-title {
        font-size: 1.4rem;
    }

    .site-crest {
        width: 40px;
        height: 40px;
    }

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