/* Account pages; palette and type follow the reader's styles.css. */
:root {
    --font-mono: 'Courier New', Courier, monospace;
    --primary-color: #336699;
    --text-color: #1f2937;
    --text-muted: #6b7280;
    --accent-color: #f59e0b;
    --bg-color: #ffffff;
    --card-color: #ffffff;
    --border-color: #e5e7eb;
    --hover-color: #f3f4f6;
    --red: rgb(158, 73, 69);
    --green: rgb(107, 208, 132);
}

@media (prefers-color-scheme: dark) {
    :root {
        --primary-color: #a0a0a0;
        --text-color: #e5e5e5;
        --text-muted: #9ca3af;
        --accent-color: #fbbf24;
        --bg-color: #1a1a1a;
        --card-color: #1f1f1f;
        --border-color: #333333;
        --hover-color: #2a2a2a;
    }
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: sans-serif;
    line-height: 1.6;
    background-color: var(--bg-color);
    color: var(--text-color);
    background-image: radial-gradient(rgba(255, 255, 255, 0.2) 1px, transparent 0);
    background-size: 10px 10px;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 4rem 1rem;
}

.auth-card {
    width: 100%;
    max-width: 24rem;
    background: var(--card-color);
    border: 1px solid var(--border-color);
    padding: 2rem;
}
.auth-card.wide { max-width: 36rem; }

h1, h2, legend {
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
h1 { font-size: 1.4rem; margin-bottom: 1.25rem; }
h2 { font-size: 1rem; margin-bottom: 0.75rem; color: var(--text-muted); }
legend { font-size: 0.85rem; margin-bottom: 0.25rem; }

section { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--border-color); }
section.danger h2 { color: var(--red); }

form { display: flex; flex-direction: column; gap: 1rem; }
fieldset { border: none; display: flex; flex-direction: column; gap: 0.25rem; }

label { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.9rem; }
label.choice { flex-direction: row; align-items: center; gap: 0.5rem; }

input[type="email"], input[type="password"], input[type="text"] {
    font: inherit;
    padding: 0.5rem 0.6rem;
    border: 1px solid var(--border-color);
    background: var(--bg-color);
    color: var(--text-color);
    border-radius: 0;
    width: 100%;
}
input:focus-visible { outline: 2px solid var(--accent-color); outline-offset: 1px; }

.handle-input { display: flex; align-items: center; }
.handle-input span {
    padding: 0.5rem 0.6rem;
    border: 1px solid var(--border-color);
    border-right: none;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

button {
    font: inherit;
    font-family: var(--font-mono);
    text-transform: uppercase;
    padding: 0.55rem 1rem;
    border: 1px solid var(--text-color);
    background: var(--text-color);
    color: var(--bg-color);
    cursor: pointer;
}
button:hover { background: var(--accent-color); border-color: var(--accent-color); color: #1a1a1a; }
button:disabled { opacity: 0.5; cursor: wait; }
button.delete-button { background: var(--red); border-color: var(--red); color: #fff; }
button.link-button {
    background: none;
    border: none;
    padding: 0;
    color: var(--primary-color);
    text-transform: none;
    font-family: inherit;
    text-decoration: underline;
}

a { color: var(--primary-color); }

.hint, .muted { color: var(--text-muted); font-size: 0.8rem; }
.field-error, .form-error { color: var(--red); font-size: 0.85rem; }
.field-error:empty { display: none; }
.form-ok { color: var(--green); font-size: 0.85rem; }
.auth-alt { margin-top: 1rem; font-size: 0.9rem; }

.sessions { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1rem; font-size: 0.85rem; }

[hidden] { display: none !important; }

/* Membership passes (signup step 2, and the account page). */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.auth-card.pass-page { max-width: 62rem; }
/* Same space after the heading, the note, and the cards. */
.pass-page h1, .pass-page > p { margin-bottom: 1.5rem; }
.pass-page .passes { margin-bottom: 0.5rem; }
/* Three cards side by side; stacked on narrow screens. */
.passes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
@media (max-width: 44rem) {
    .passes { grid-template-columns: 1fr; max-width: 22rem; }
}
.pass-option { display: flex; flex-direction: column; gap: 0.6rem; cursor: pointer; font-size: 0.85rem; }
.pass-option input { position: absolute; opacity: 0; pointer-events: none; }
.pass-option .perks-title { font-weight: bold; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: -0.4rem; }
.pass-option .perks { list-style: none; color: var(--text-muted); padding-left: 0.2rem; }
.pass-option .perks li::before { content: '✓ '; color: var(--green); }
.pass-option input:checked + .member-card { outline: 3px solid var(--accent-color); outline-offset: 3px; }
.pass-option input:focus-visible + .member-card { outline: 3px dashed var(--accent-color); outline-offset: 3px; }
.pass-option:hover .member-card { transform: translateY(-2px); }

/* The VIP card's border is this thick; the others get it as padding so all three line up. */
.member-card {
    --frame: 10px;
    position: relative;
    aspect-ratio: 1.586;
    border-radius: calc(0.75rem + var(--frame));
    padding: calc(0.9rem + var(--frame)) calc(1rem + var(--frame));
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #f5f3ea;
    font-family: var(--font-mono);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    transition: transform 0.15s ease;
}
.member-card::after {
    /* a sheen across the card */
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 35%, rgba(255, 255, 255, 0.18) 50%, transparent 65%);
    pointer-events: none;
}
.member-card .brand { font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.85; }
.member-card .tier { font-size: 1.15rem; font-weight: bold; letter-spacing: 0.04em; text-transform: uppercase; }
.member-card .holder { font-size: 1.05rem; word-break: break-all; }
.member-card .foot { display: flex; justify-content: space-between; align-items: flex-end; font-size: 0.75rem; opacity: 0.9; }
.member-card .price { font-size: 0.95rem; font-weight: bold; }
.member-card s.price { text-decoration-thickness: 2px; opacity: 0.8; }
.member-card .crown { position: absolute; top: 0.6rem; right: 0.8rem; font-size: 1.4rem; }

.member-card.beta {
    background: repeating-linear-gradient(45deg, #2a2f33 0 10px, #30363a 10px 20px);
    border: 1px dashed rgba(255, 255, 255, 0.35);
}
.member-card.normal { background: linear-gradient(135deg, #1e4d3a, #2f7a57 60%, #6bd084); }
/*
 * VIP: white card in a thick metallic-gold border. Every 10 seconds a white highlight
 * sweeps along the border only (the header's 1.5 s sweep). Three background layers: white
 * clipped to the padding box covers the interior; the moving highlight and the gold
 * gradient show only through the transparent border.
 */
.member-card.vip {
    color: #6b4f00;
    border: var(--frame) solid transparent;
    padding: 0.9rem 1rem;
    background:
        linear-gradient(#fff, #fff) padding-box,
        linear-gradient(-60deg, transparent 42%, rgba(255, 255, 255, 0.95) 50%, transparent 58%) border-box,
        linear-gradient(135deg, #8a6508, #e6c346 25%, #fff3b0 45%, #c9a227 60%, #f5d36b 80%, #8a6508) border-box;
    background-size: 100% 100%, 300% 100%, 100% 100%;
    background-position: 0 0, 100% 0, 0 0;
    background-repeat: no-repeat;
    animation: vip-border-shine 10s infinite;
}
.member-card.vip::after { content: none; }
.member-card.vip .brand, .member-card.vip .foot { opacity: 1; }
@keyframes vip-border-shine {
    0% { background-position: 0 0, 100% 0, 0 0; }
    15% { background-position: 0 0, 0% 0, 0 0; }
    100% { background-position: 0 0, 0% 0, 0 0; }
}
@media (prefers-reduced-motion: reduce) {
    .member-card.vip { animation: none; }
}

.current-pass { max-width: 22rem; margin-bottom: 0.75rem; }
#pass-form button[type="submit"] { align-self: center; min-width: 12rem; }
