:root {
    color-scheme: light;
    --color-bg: #fff7e8;
    --color-hero: linear-gradient(135deg, #ff9f68 0%, #f76da6 45%, #7f6bff 100%);
    --color-card: #ffffff;
    --color-shadow: rgba(88, 52, 28, 0.18);
    --color-shadow-strong: rgba(88, 52, 28, 0.32);
    --color-primary: #ff7b54;
    --color-primary-dark: #d8613f;
    --color-text: #3b2f4a;
    --color-muted: #5d4f6a;
    --color-badge: #4cc9f0;
    font-family: 'Comic Sans MS', 'Trebuchet MS', sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-family, inherit);
    line-height: 1.6;
}

h1,
h2,
h3 {
    color: var(--color-primary);
    margin-top: 0;
    line-height: 1.2;
}

p {
    margin-top: 0;
}

.hero {
    position: relative;
    overflow: hidden;
    padding: 3.5rem 1.5rem;
    background: var(--color-hero);
    color: #ffffff;
    text-align: center;
}

.hero__content {
    position: relative;
    z-index: 1;
    max-width: 720px;
    margin: 0 auto;
}

.hero__eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.3em;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.hero__title {
    font-size: clamp(2.8rem, 7vw, 4.5rem);
    margin: 0;
    text-shadow: 0 10px 30px rgba(45, 18, 58, 0.45);
}

.hero__subtitle {
    font-size: clamp(1.1rem, 3vw, 1.4rem);
    margin: 1rem auto 0;
    max-width: 32ch;
}

.hero__stars {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.55) 0, transparent 50%),
        radial-gradient(circle at 80% 25%, rgba(255, 255, 255, 0.45) 0, transparent 45%),
        radial-gradient(circle at 50% 70%, rgba(255, 255, 255, 0.4) 0, transparent 55%);
    animation: twinkle 16s ease-in-out infinite alternate;
    opacity: 0.8;
}

@keyframes twinkle {
    from {
        transform: translateY(-3%);
    }
    to {
        transform: translateY(3%);
    }
}

.container {
    width: min(1100px, 100% - 3rem);
    margin: 0 auto;
    padding-block: 2.5rem 4rem;
}

.intro {
    text-align: center;
    margin-bottom: 2.5rem;
}

.intro p {
    max-width: 45ch;
    margin: 0.75rem auto 0;
    color: var(--color-muted);
}

.games {
    margin-bottom: 3.5rem;
}

.games__title {
    margin-bottom: 1.5rem;
}

.games-grid {
    display: grid;
    gap: 1.75rem;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    list-style: none;
    padding: 0;
    margin: 0;
}

.games-grid__card {
    position: relative;
    background: var(--color-card);
    border-radius: 20px;
    box-shadow: 0 12px 28px var(--color-shadow);
    overflow: hidden;
    transition: transform 150ms ease, box-shadow 150ms ease;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.games-grid__card:hover,
.games-grid__card:focus-within {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px var(--color-shadow-strong);
}

.games-grid__figure {
    margin: 0;
    aspect-ratio: 16 / 10;
    background: rgba(255, 138, 101, 0.12);
    display: grid;
    place-items: center;
}

.games-grid__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.games-grid__status {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--color-badge);
    color: #10344b;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    font-size: 0.75rem;
}

.games-grid__card--coming .games-grid__status {
    background: #ffd166;
    color: #5b3a00;
}

.games-grid__body {
    padding: 1.4rem 1.6rem 1.6rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.games-grid__title {
    font-size: 1.4rem;
    margin: 0;
}

.games-grid__description {
    margin: 0;
    color: var(--color-muted);
}

.games-grid__cta {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--color-primary);
    color: #ffffff;
    padding: 0.75rem 1.3rem;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 0.015em;
    transition: background-color 150ms ease, transform 150ms ease;
}

.games-grid__cta svg {
    width: 1.1rem;
    height: 1.1rem;
}

.games-grid__cta:hover,
.games-grid__cta:focus-visible {
    background: var(--color-primary-dark);
    transform: translateY(-1px);
}

.games-grid__card--coming .games-grid__cta {
    background: rgba(93, 79, 106, 0.18);
    color: var(--color-muted);
    cursor: default;
}

.games-grid__card--coming .games-grid__cta:hover {
    transform: none;
}

.builder {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 18px;
    padding: 2rem;
    box-shadow: 0 8px 24px rgba(59, 47, 74, 0.15);
}

.builder__details {
    margin-top: 1rem;
    border: 2px dashed rgba(93, 79, 106, 0.2);
    border-radius: 12px;
    padding: 1rem 1.2rem;
    background: rgba(255, 247, 232, 0.7);
}

.builder__details summary {
    cursor: pointer;
    font-weight: 700;
    color: var(--color-primary);
}

.builder__details ol {
    margin: 1rem 0 0;
    padding-left: 1.4rem;
}

.visitor-counter {
    margin-top: 3rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 18px;
    padding: 1.8rem 1.5rem;
    box-shadow: 0 8px 24px rgba(59, 47, 74, 0.12);
}

.visitor-counter__label {
    margin: 0;
    color: var(--color-muted);
}

.visitor-counter__number {
    margin: 0.6rem 0 0;
    font-size: clamp(2rem, 6vw, 3.2rem);
    font-weight: 700;
    color: var(--color-primary);
}

.footer {
    text-align: center;
    padding: 2rem 1rem;
    background: rgba(59, 47, 74, 0.08);
    color: var(--color-muted);
}

@media (max-width: 760px) {
    .container {
        width: min(100% - 2rem, 680px);
        padding-block: 2rem 3rem;
    }

    .builder {
        padding: 1.5rem;
    }
}
