:root {
    --bg: #0c0e12;
    --bg-elevated: #151922;
    --bg-hero: #10141c;
    --text: #e8ecf2;
    --text-muted: #9aa3b2;
    --accent: #e8a23a;
    --accent-hover: #f0b85a;
    --border: #2a3140;
    --shadow: rgba(0, 0, 0, 0.45);
    --radius: 6px;
    --font-display: "Orbitron", sans-serif;
    --font-body: "Source Sans 3", sans-serif;
    --header-h: 4.25rem;
    --transition: 0.22s ease;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-body);
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--text);
    background:
        radial-gradient(ellipse 80% 50% at 50% -10%, #1a2233 0%, transparent 55%),
        radial-gradient(ellipse 60% 40% at 100% 100%, #1a1520 0%, transparent 45%),
        var(--bg);
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--accent-hover);
}

.container {
    width: min(1120px, 100% - 2rem);
    margin-inline: auto;
}

.container.narrow {
    width: min(720px, 100% - 2rem);
}

/* Header */
.site-header {
    position: relative;
    z-index: 100;
    height: var(--header-h);
    overflow: hidden;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.logo img,
.footer-brand img {
    display: block;
    width: auto;
    max-height: 2.5rem;
    height: auto;
}

.social-nav {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.social-nav a {
    color: var(--text-muted);
    display: flex;
    transition: color var(--transition), transform var(--transition);
}

.social-nav a:hover {
    color: var(--accent);
    transform: translateY(-2px);
}

/* Hero */
.hero {
    position: relative;
    min-height: calc(100vh - var(--header-h));
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    background: var(--bg-hero);
}

.hero-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-content {
    position: relative;
    z-index: 1;
    width: min(1120px, 100% - 2rem);
    margin: 0 auto 3.5rem;
    display: flex;
    justify-content: center;
    animation: hero-in 0.7s ease both;
}

.hero-title {
    margin: 0 0 0.4rem;
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 6vw, 4rem);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text);
    text-shadow: 0 2px 24px var(--shadow);
}

.hero-subtitle {
    margin: 0 0 1.5rem;
    max-width: 28rem;
    font-size: clamp(1.05rem, 2.2vw, 1.25rem);
    color: var(--text-muted);
}

@keyframes hero-in {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1.4rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background-color var(--transition), color var(--transition), transform var(--transition);
}

.btn-primary {
    background: var(--accent);
    color: #1a1208;
}

.btn-primary:hover {
    background: var(--accent-hover);
    color: #1a1208;
    transform: translateY(-1px);
}

.btn-disabled {
    background: #2a3140;
    color: var(--text-muted);
    cursor: not-allowed;
}

.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-1px);
}

.pinball-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

/* About */
.about {
    padding: 4rem 0;
}

.about-grid {
    display: grid;
    gap: 2rem;
    align-items: start;
}

.about-media {
    order: -1;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--bg-elevated);
}

.about-media img {
    width: 100%;
    height: auto;
    display: block;
}

.about-text p {
    margin: 0 0 1rem;
    color: var(--text-muted);
}

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

@media (min-width: 768px) {
    .about-grid {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }

    .about-media {
        order: 0;
    }
}

/* Pinball overview */
.pinball-overview {
    padding: 4rem 0 5rem;
}

.section-title {
    margin: 0 0 2.5rem;
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    width: 100%;
}

@media (min-width: 768px) {
    .section-title {
        white-space: nowrap;
    }
}

.pinball-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem 0.85rem;
    margin-bottom: 3.5rem;
    padding-bottom: 3.5rem;
    border-bottom: 1px solid var(--border);
    animation: row-in 0.55s ease both;
    align-items: start;
}

.pinball-row:nth-child(2) {
    animation-delay: 0.08s;
}

.pinball-row:nth-child(3) {
    animation-delay: 0.16s;
}

.pinball-row:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

@keyframes row-in {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pinball-cover {
    grid-column: 1 / -1;
    grid-row: 1;
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--bg-elevated);
    transition: transform var(--transition), box-shadow var(--transition);
}

.pinball-cover--disabled {
    cursor: default;
    pointer-events: none;
}

.pinball-cover img {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
}

.pinball-cover-title {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 1.25rem 1rem 0.9rem;
    font-family: var(--font-display);
    font-size: clamp(1.1rem, 2.5vw, 1.45rem);
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #fff;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
}

.pinball-screenshots {
    grid-column: 1 / -1;
    grid-row: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.screenshot-btn {
    padding: 0;
    border: none;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-elevated);
    cursor: zoom-in;
    transition: transform var(--transition);
}

.screenshot-btn img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.pinball-info {
    grid-column: 1 / -1;
    grid-row: 3;
    margin-top: 0.35rem;
}

.pinball-description {
    margin: 0 0 0.5rem;
    color: var(--text);
}

.pinball-meta {
    margin: 0 0 0.35rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.pinball-downloadsize {
    margin: 0 0 1.1rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

@media (hover: hover) and (min-width: 768px) {
    a.pinball-cover:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 28px var(--shadow);
    }

    .screenshot-btn:hover {
        transform: scale(1.03);
    }
}

@media (min-width: 768px) {
    .pinball-row {
        grid-template-columns: 1fr 1fr;
        column-gap: 0.85rem;
        row-gap: 1.1rem;
    }

    .pinball-cover {
        grid-column: 1;
        grid-row: 1;
    }

    .pinball-screenshots {
        grid-column: 2;
        grid-row: 1 / 3;
        gap: 0.85rem;
        align-self: start;
    }

    .pinball-info {
        grid-column: 1;
        grid-row: 2;
        margin-top: 0;
    }
}

/* Legal pages */
.legal-page {
    padding: 3rem 0 5rem;
}

.legal-page h1 {
    margin: 0 0 1.5rem;
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    letter-spacing: 0.03em;
}

.legal-page h2 {
    margin: 2rem 0 0.75rem;
    font-size: 1.15rem;
    color: var(--text);
}

.legal-page h3 {
    margin: 1.5rem 0 0.65rem;
    font-size: 1.05rem;
    color: var(--text);
}

.legal-page p,
.legal-page ul,
.legal-page td,
.legal-page th {
    color: var(--text-muted);
}

.legal-page ul {
    padding-left: 1.25rem;
}

.legal-table-wrap {
    margin: 1rem 0 1.5rem;
    overflow-x: auto;
}

.legal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.legal-table th,
.legal-table td {
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

.legal-table th {
    width: 40%;
    background: var(--bg-elevated);
    color: var(--text);
    font-weight: 600;
}

.legal-note {
    margin-top: 2rem;
    padding: 0.85rem 1rem;
    border-left: 3px solid var(--accent);
    background: var(--bg-elevated);
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--border);
    background: rgba(8, 10, 14, 0.9);
    padding: 2.5rem 0;
}

.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    text-align: center;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--accent);
}

.copyright {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.88);
    cursor: zoom-out;
}

.lightbox[hidden] {
    display: none;
}

.lightbox img {
    max-width: min(1100px, 100%);
    max-height: 90vh;
    object-fit: contain;
    border-radius: var(--radius);
    box-shadow: 0 16px 48px var(--shadow);
    cursor: default;
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    width: 2.75rem;
    height: 2.75rem;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    transition: background-color var(--transition);
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.22);
}

body.lightbox-open {
    overflow: hidden;
}

/* Feedback modal */
.feedback-modal {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
    background: rgba(0, 0, 0, 0.75);
}

.feedback-modal[hidden] {
    display: none;
}

.feedback-dialog {
    position: relative;
    width: 100%;
    max-height: min(92vh, 720px);
    overflow: auto;
    padding: 1.5rem 1.25rem 1.75rem;
    border-radius: var(--radius) var(--radius) 0 0;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-bottom: none;
    box-shadow: 0 -12px 40px var(--shadow);
}

.feedback-dialog h2 {
    margin: 0 2.5rem 0.75rem 0;
    font-family: var(--font-display);
    font-size: 1.35rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.feedback-game-label {
    margin: 0 0 1.25rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.feedback-game-label strong {
    color: var(--text);
}

.feedback-close {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    width: 2.5rem;
    height: 2.5rem;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    transition: background-color var(--transition);
}

.feedback-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.feedback-form {
    display: grid;
    gap: 1rem;
}

.feedback-field {
    display: grid;
    gap: 0.4rem;
}

.feedback-field label {
    font-size: 0.9rem;
    color: var(--text);
}

.feedback-field .optional {
    color: var(--text-muted);
    font-weight: 400;
}

.feedback-field input,
.feedback-field textarea {
    width: 100%;
    padding: 0.75rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.4;
}

.feedback-field textarea {
    min-height: 8rem;
    resize: vertical;
}

.feedback-field input:focus,
.feedback-field textarea:focus {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

.feedback-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.feedback-status {
    margin: 0;
    font-size: 0.95rem;
}

.feedback-status--error {
    color: #f0a0a0;
}

.feedback-status--success {
    color: #9fd4a5;
}

.feedback-form .btn {
    justify-self: start;
}

body.feedback-open {
    overflow: hidden;
}

@media (min-width: 640px) {
    .feedback-modal {
        align-items: center;
        padding: 1.5rem;
    }

    .feedback-dialog {
        width: min(520px, 100%);
        max-height: 90vh;
        border-radius: var(--radius);
        border-bottom: 1px solid var(--border);
        box-shadow: 0 16px 48px var(--shadow);
    }
}
