/* ------------------------------------------------------------------ *
 * wininfo.saphir.one — prize claim mini-site
 * Simple, responsive styling. Light + dark via prefers-color-scheme.
 * ------------------------------------------------------------------ */

:root {
    --bg-1: #eef1ff;
    --bg-2: #f7f5ff;
    --card: #ffffff;
    --text: #1d1f29;
    --muted: #6b7280;
    --border: #e3e6ef;
    --field-bg: #fbfbfe;
    --accent: #5865f2;
    --accent-hover: #4752c4;
    --accent-contrast: #ffffff;
    --danger: #d83b48;
    --danger-bg: #fdecee;
    --warn: #9a6700;
    --warn-bg: #fff6e0;
    --success: #1a7f55;
    --success-bg: #e7f6ee;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 10px 40px rgba(40, 44, 92, 0.12);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-1: #0f1117;
        --bg-2: #161a24;
        --card: #1c2030;
        --text: #eceef4;
        --muted: #9aa3b2;
        --border: #2c3142;
        --field-bg: #232838;
        --accent: #6f7bf7;
        --accent-hover: #828dff;
        --danger: #ff7b86;
        --danger-bg: #3a2026;
        --warn: #ffce6b;
        --warn-bg: #38301a;
        --success: #6cd9a6;
        --success-bg: #14302440;
        --shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
    }
}

* { box-sizing: border-box; }

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

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text);
    line-height: 1.55;
    background:
        radial-gradient(1200px 600px at 50% -10%, var(--bg-2), transparent),
        linear-gradient(160deg, var(--bg-1), var(--bg-2));
}

.page { width: 100%; max-width: 560px; }

/* Header ------------------------------------------------------------ */
.site-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    padding: 0 4px;
}
.brand { font-weight: 700; font-size: 1.05rem; letter-spacing: 0.2px; }
.brand-mark { margin-right: 4px; }
.event-name { color: var(--muted); font-size: 0.9rem; text-align: right; }

/* Card -------------------------------------------------------------- */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px;
}
@media (max-width: 480px) {
    .card { padding: 20px 16px; border-radius: 14px; }
    body { padding: 12px; }
}

h1 { font-size: 1.5rem; margin: 0 0 10px; line-height: 1.25; }
.lead { color: var(--muted); margin: 0 0 22px; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }

/* Progress stepper -------------------------------------------------- */
.progress {
    list-style: none;
    display: flex;
    justify-content: space-between;
    gap: 6px;
    margin: 0 0 24px;
    padding: 0;
    counter-reset: step;
}
.progress .step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    position: relative;
    font-size: 0.72rem;
    color: var(--muted);
    text-align: center;
}
.progress .step::before {
    content: "";
    position: absolute;
    top: 13px;
    right: 50%;
    width: 100%;
    height: 2px;
    background: var(--border);
    z-index: 0;
}
.progress .step:first-child::before { display: none; }
.progress .dot {
    position: relative;
    z-index: 1;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--field-bg);
    border: 2px solid var(--border);
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--muted);
}
.progress .step.current .dot { border-color: var(--accent); color: var(--accent); }
.progress .step.current { color: var(--text); font-weight: 600; }
.progress .step.done .dot { background: var(--accent); border-color: var(--accent); color: var(--accent-contrast); }
.progress .step.done::before { background: var(--accent); }
@media (max-width: 420px) {
    .progress .plabel { display: none; }
}

/* Discord profile card --------------------------------------------- */
.profile {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    margin-bottom: 22px;
    background: var(--field-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}
.avatar { border-radius: 50%; flex: none; background: var(--border); }
.profile-info { min-width: 0; flex: 1; }
.display-name { font-weight: 700; }
.handle { color: var(--muted); font-size: 0.88rem; }
.discord-id { color: var(--muted); font-size: 0.76rem; font-variant-numeric: tabular-nums; word-break: break-all; }
.logout-link { font-size: 0.82rem; color: var(--accent); text-decoration: none; white-space: nowrap; }
.logout-link:hover { text-decoration: underline; }

/* Forms ------------------------------------------------------------- */
.field { display: block; margin-bottom: 18px; }
.label-text { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.95rem; }
input[type="text"], input[type="email"], select {
    width: 100%;
    padding: 12px 13px;
    font-size: 1rem;
    color: var(--text);
    background: var(--field-bg);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    transition: border-color 0.15s, box-shadow 0.15s;
    font-family: inherit;
}
select { appearance: none; -webkit-appearance: none; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center; padding-right: 38px;
}
input:focus, select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
input[aria-invalid="true"] { border-color: var(--danger); }
.hint { display: block; color: var(--muted); font-size: 0.82rem; margin-top: 6px; }
.error-msg { display: block; color: var(--danger); font-size: 0.85rem; margin-top: 6px; font-weight: 600; }

/* Prize choice cards ----------------------------------------------- */
.choice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    margin-bottom: 12px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}
.choice:hover { border-color: var(--accent); }
.choice.selected { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.choice input[type="radio"] { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.choice-body { display: flex; flex-direction: column; gap: 3px; }
.choice-title { font-weight: 700; }
.choice-sub { color: var(--muted); font-size: 0.85rem; }
.paypal-field { margin-top: 4px; }

/* Notices / alerts -------------------------------------------------- */
.notice, .alert {
    border-radius: var(--radius-sm);
    padding: 13px 15px;
    margin-bottom: 18px;
    font-size: 0.92rem;
    border: 1px solid transparent;
}
.notice { background: var(--field-bg); border-color: var(--border); color: var(--text); }
.alert-error { background: var(--danger-bg); border-color: color-mix(in srgb, var(--danger) 40%, transparent); color: var(--danger); }
.alert-warn { background: var(--warn-bg); border-color: color-mix(in srgb, var(--warn) 40%, transparent); color: var(--warn); }
.alert-success { background: var(--success-bg); border-color: color-mix(in srgb, var(--success) 40%, transparent); color: var(--success); }

/* Buttons ----------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    border: 1.5px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s, transform 0.05s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-contrast); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-discord { background: #5865f2; color: #fff; }
.btn-discord:hover { background: #4752c4; }
.btn-block { width: 100%; }
.btn-confirm { flex: 1; }
.icon { width: 20px; height: 20px; }

.actions { display: flex; gap: 12px; justify-content: flex-end; align-items: center; margin-top: 8px; }
.actions .btn-primary { min-width: 140px; }
.actions-confirm { justify-content: stretch; }
@media (max-width: 420px) {
    .actions { flex-direction: column-reverse; }
    .actions .btn { width: 100%; }
}

/* Review / confirmation list --------------------------------------- */
.review { margin: 0 0 22px; padding: 0; }
.review-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}
.review-row:first-child { padding-top: 4px; }
.review dt { color: var(--muted); font-size: 0.85rem; flex: none; width: 40%; }
.review dd { margin: 0; text-align: right; flex: 1; word-break: break-word; }
.review dd > span:first-child { font-weight: 600; }
.edit-link { display: inline-block; margin-top: 4px; font-size: 0.82rem; color: var(--accent); text-decoration: none; }
.edit-link:hover { text-decoration: underline; }

/* Footer ------------------------------------------------------------ */
.site-footer {
    text-align: center;
    margin-top: 18px;
    color: var(--muted);
    font-size: 0.85rem;
}
.site-footer p { margin: 4px 0; }
.site-footer a { color: var(--accent); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
