@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
    --ink: #0B0F17;
    --panel: #141B29;
    --panel-hover: #1B2436;
    --line: #232C3D;
    --paper: #EDEFF3;
    --mute: #8792A6;
    --gold: #E7B24A;
    --gold-dim: #4A3E24;
    --teal: #3FBFA0;
    --red: #E2604F;
    --radius: 10px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--ink);
    color: var(--paper);
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .display, .price {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    line-height: 1.15;
    margin: 0;
}

a { color: inherit; }

.wrap {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    border-bottom: 1px solid var(--line);
    padding: 18px 0;
}
.site-header .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.logo {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 20px;
    text-decoration: none;
    color: var(--paper);
    letter-spacing: -0.02em;
}
.logo span { color: var(--gold); }

/* Hero */
.hero {
    padding: 48px 0 36px;
}
.hero h1 {
    font-size: 34px;
    max-width: 11ch;
    letter-spacing: -0.01em;
}
.hero p {
    color: var(--mute);
    font-size: 16px;
    max-width: 42ch;
    margin-top: 12px;
}

/* Game grid */
.section-title {
    font-size: 15px;
    color: var(--mute);
    margin-bottom: 14px;
}
.game-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding-bottom: 40px;
}
@media (min-width: 480px) {
    .game-grid { grid-template-columns: repeat(3, 1fr); }
}
.game-card {
    display: block;
    text-decoration: none;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px 14px;
    transition: border-color .15s ease, transform .15s ease;
}
.game-card:hover { border-color: var(--gold); transform: translateY(-1px); }
.game-card .name {
    color: var(--paper);
    font-weight: 600;
    font-size: 15px;
}
.game-card .from {
    color: var(--mute);
    font-size: 13px;
    margin-top: 6px;
}
.game-card .from strong {
    color: var(--gold);
    font-weight: 600;
    font-family: 'Space Grotesk', sans-serif;
}

/* Checkout page */
.back-link {
    display: inline-block;
    color: var(--mute);
    text-decoration: none;
    font-size: 14px;
    margin: 20px 0 8px;
}
.back-link:hover { color: var(--paper); }

.game-heading { padding: 8px 0 24px; }
.game-heading h1 { font-size: 26px; }
.game-heading p { color: var(--mute); font-size: 14px; margin-top: 4px; }

fieldset { border: 0; padding: 0; margin: 0 0 28px; }
legend {
    font-size: 15px;
    font-weight: 600;
    padding: 0 0 12px;
    width: 100%;
}

.nominal-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}
.nominal-chip { position: relative; }
.nominal-chip input {
    position: absolute;
    opacity: 0;
    inset: 0;
    cursor: pointer;
    margin: 0;
}
.nominal-chip label {
    display: block;
    background: var(--panel);
    border: 1px solid var(--line);
    border-bottom: 3px solid var(--line);
    border-radius: 8px;
    padding: 12px 14px;
    cursor: pointer;
    transition: border-color .12s ease, background .12s ease;
}
.nominal-chip input:checked + label {
    border-color: var(--line);
    border-bottom-color: var(--gold);
    background: var(--panel-hover);
}
.nominal-chip .n-name { font-size: 14px; color: var(--paper); }
.nominal-chip .n-price {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    color: var(--gold);
    font-size: 15px;
    margin-top: 4px;
}

.field { margin-bottom: 16px; }
.field label {
    display: block;
    font-size: 13px;
    color: var(--mute);
    margin-bottom: 6px;
}
.field input {
    width: 100%;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px 14px;
    color: var(--paper);
    font-size: 15px;
    font-family: inherit;
}
.field input:focus {
    outline: none;
    border-color: var(--gold);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 420px) {
    .field-row { grid-template-columns: 1fr; }
}

.errors {
    background: rgba(226, 96, 79, 0.1);
    border: 1px solid var(--red);
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 20px;
    color: #F3A99E;
    font-size: 14px;
}
.errors ul { margin: 0; padding-left: 18px; }

.pay-bar {
    position: sticky;
    bottom: 0;
    background: var(--ink);
    border-top: 1px solid var(--line);
    padding: 14px 0 20px;
    margin-top: 8px;
}
.pay-bar .row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.pay-bar .total-label { font-size: 12px; color: var(--mute); }
.pay-bar .total-price {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 20px;
    color: var(--paper);
}
.btn-primary {
    background: var(--gold);
    color: #1A1305;
    border: none;
    border-radius: 8px;
    padding: 14px 26px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
}
.btn-primary:hover { filter: brightness(1.06); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }

/* Order status page */
.invoice-block { padding: 32px 0 8px; }
.invoice-label { color: var(--mute); font-size: 13px; }
.invoice-number {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 22px;
    font-weight: 700;
    margin-top: 4px;
    letter-spacing: -0.01em;
}

.timeline { margin: 32px 0; }
.t-step {
    display: flex;
    gap: 14px;
    position: relative;
    padding-bottom: 28px;
}
.t-step:last-child { padding-bottom: 0; }
.t-step::before {
    content: '';
    position: absolute;
    left: 13px;
    top: 28px;
    bottom: 0;
    width: 1px;
    background: var(--line);
}
.t-step:last-child::before { display: none; }
.t-dot {
    flex-shrink: 0;
    width: 27px;
    height: 27px;
    border-radius: 50%;
    background: var(--panel);
    border: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--mute);
    font-family: 'Space Grotesk', sans-serif;
}
.t-step.done .t-dot { background: var(--teal); border-color: var(--teal); color: #06231C; }
.t-step.current .t-dot { background: var(--gold); border-color: var(--gold); color: #1A1305; }
.t-step.failed .t-dot { background: var(--red); border-color: var(--red); color: #2B0906; }
.t-title { font-size: 15px; font-weight: 600; padding-top: 3px; }
.t-step.upcoming .t-title { color: var(--mute); font-weight: 500; }
.t-desc { color: var(--mute); font-size: 13px; margin-top: 3px; }

.detail-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px 20px;
    margin-bottom: 24px;
}
.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 9px 0;
    border-bottom: 1px solid var(--line);
    font-size: 14px;
}
.detail-row:last-child { border-bottom: none; }
.detail-row .k { color: var(--mute); }
.detail-row .v { text-align: right; }
.detail-row .v.price { font-family: 'Space Grotesk', sans-serif; color: var(--gold); font-weight: 600; }

.notice {
    font-size: 13px;
    color: var(--mute);
    text-align: center;
    padding: 8px 0 32px;
}

.site-footer {
    border-top: 1px solid var(--line);
    padding: 24px 0 40px;
    margin-top: 20px;
}
.site-footer p { color: var(--mute); font-size: 13px; }
