/* Wheel of Denial — Styles v2.0 — 2026-02-13 */

@import url("https://fonts.googleapis.com/css?family=Roboto:100,400,700");
@import url("https://fonts.googleapis.com/css?family=Lato:100,300,400,700");

/* ── Reset & Variables ──────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --red: #CC0000; --red-dark: #991b1b; --red-glow: rgba(185,28,28,0.25);
  --bg: #0a0a0a; --surface: #141414; --surface-light: #333333; --surface-hover: #1f1f1f;
  --border: #222; --border-light: #333;
  --text: #fff; --text-mid: #ccc; --text-dim: #888; --text-faint: #F7F8F9; --text-ghost: #444;
  --input-bg: #0d0d0d;
  --font: system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  --font-family-sans-serif: "Lato", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}
body {
  font-family: var(--font); background: var(--bg); color: var(--text);
  font-family: "Lato", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh; min-height: 100dvh; -webkit-font-smoothing: antialiased;
}
button { cursor: pointer; border: none; font-family: var(--font); }
input, textarea { font-family: var(--font); outline: none; }
.brand { font-size: 18px; text-transform: uppercase; letter-spacing: 0.2em; color: var(--red); }

/* ── Landing page (index.html) ──────────── */
.landing-body {
  display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px;
}
.landing-hero {
  display: flex; flex-direction: column; align-items: center; text-align: center; width: 100%;
}
.landing-brand {
  letter-spacing: 0.1em; margin-bottom: 6px; font-weight: 800;
  text-align: center; width: 100%;
}
.landing-logo { margin: 12px 0 16px; line-height: 0; }
.landing-logo img { display: block; width: 140px; height: 140px; }
.landing-tagline {
  font-size: 17px; color: var(--text-faint); margin-bottom: 32px; text-align: center;
}
.landing-buttons { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 280px; }
.landing-btn {
  padding: 16px; border-radius: 12px; font-size: 16px; font-weight: 600; text-align: center;
  text-decoration: none; transition: background 0.15s;
}
.landing-btn-primary { color: var(--text); background: var(--red); }
.landing-btn-secondary { color: var(--text-mid); background: var(--surface-light); border: 1px solid var(--border-light); }
.landing-btn-keyholder { color: var(--text); background: #1D3557; }
.landing-btn-locked { color: var(--text); background: var(--red); }
.landing-btn-selflock { color: var(--text); background: #5B2D8E; }

/* ── Landing housekeeping ─────────────── */
.landing-housekeeping { margin-top: 32px; text-align: center; font-size: 12px; }
.landing-housekeeping a,
.landing-housekeeping a:visited { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.landing-housekeeping .landing-copyright,
.landing-housekeeping .landing-copyright:visited { color: #F7F8F9; }

/* ── Landing: wide/landscape ──────────── */
@media screen and (min-width: 568px) {
  .landing-body {
    display: grid;
    grid-template-columns: auto auto;
    grid-template-rows: auto auto;
    align-items: center; justify-items: center;
    gap: 16px 24px; padding: 16px 32px;
  }
  .landing-hero { grid-column: 1; grid-row: 1; width: auto; }
  .landing-brand { width: auto; font-size: 14px; }
  .landing-logo img { width: 80px; height: 80px; }
  .landing-tagline { margin-bottom: 0; font-size: 14px; }
  .landing-buttons { grid-column: 2; grid-row: 1; max-width: 260px; }
  .landing-buttons .landing-btn { padding: 12px; font-size: 15px; }
  .landing-housekeeping { grid-column: 1 / -1; grid-row: 2; margin-top: 0; }
}

/* ── About page (about.html) ───────────── */
.about-body {
  display: flex; justify-content: center; padding: 24px 16px;
}
.about-container {
  width: 100%; max-width: 520px;
}
.about-container .landing-brand { display: block; text-align: center; margin-bottom: 32px; text-decoration: none; }
.about-section { margin-bottom: 28px; }
.about-section h2 { font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--red); margin-bottom: 10px; }
.about-section p { font-size: 14px; color: var(--text-mid); line-height: 1.7; margin-bottom: 8px; }
.about-section a { color: var(--red); text-decoration: none; }
.about-section ul { list-style: none; padding: 0; }
.about-section li { font-size: 14px; color: var(--text-mid); line-height: 1.7; padding: 4px 0 4px 16px; position: relative; }
.about-section li::before { content: ''; position: absolute; left: 0; top: 12px; width: 6px; height: 6px; border-radius: 50%; background: var(--red); opacity: 0.5; }
.about-section li strong { color: var(--text); }
.about-footer { text-align: center; padding-top: 16px; border-top: 1px solid var(--border); }
.about-footer a { font-size: 13px; color: var(--text-dim); text-decoration: none; }

/* ── Shared: Wheel ──────────────────────── */
.wheel-wrap { display: flex; justify-content: center; padding: 16px 0; }

/* ── Shared: Buttons ────────────────────── */
.btn-small { font-size: 12px; padding: 6px 12px; border-radius: 6px; font-weight: 500; color: var(--text-mid); background: #262626; border: 1px solid var(--border-light); }
.btn-save { flex: 1; padding: 10px; border-radius: 6px; font-size: 13px; font-weight: 500; color: var(--text); background: var(--red); }
.btn-cancel { padding: 10px 16px; border-radius: 6px; font-size: 13px; color: var(--text-dim); background: #262626; }
.btn-copy { font-size: 12px; padding: 8px 16px; border-radius: 6px; background: #262626; color: var(--text-mid); white-space: nowrap; }

/* ── Shared: Form inputs ────────────────── */
.form-input { width: 100%; padding: 8px 12px; border-radius: 6px; font-size: 13px; color: var(--text); background: var(--input-bg); border: 1px solid var(--border-light); margin-bottom: 8px; }
.form-textarea { width: 100%; padding: 8px 12px; border-radius: 6px; font-size: 13px; color: var(--text); background: var(--input-bg); border: 1px solid var(--border-light); margin-bottom: 8px; resize: none; min-height: 52px; }

/* ── Shared: Spin result overlay ────────── */
.result-overlay {
  position: fixed; inset: 0; z-index: 100; display: none;
  align-items: center; justify-content: center; padding: 24px;
  background: rgba(0,0,0,0.85); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.result-overlay.visible { display: flex; }
.result-card {
  width: 100%; max-width: 360px; padding: 24px; border-radius: 16px;
  text-align: center; background: var(--surface-light); border: 1px solid var(--border-light);
}
.result-tag { font-size: 14px; text-transform: uppercase; letter-spacing: 0.2em; color: var(--red); margin-bottom: 12px; font-weight: 800; }
.result-title { font-size: 22px; font-weight: 700; margin-bottom: 16px; }
.result-instr { font-size: 15px; color: var(--text-mid); line-height: 1.6; margin-bottom: 24px; }
.btn-understood { padding: 12px 24px; border-radius: 8px; font-size: 13px; font-weight: 500; color: var(--text); background: var(--red); }

/* ── Shared: Spin result card (inline) ──── */
.sr-card {
  display: none; margin: 16px 0 8px; padding: 16px; border-radius: 10px;
  background: var(--surface-light); border: 1px solid rgba(185,28,28,0.3); text-align: left;
}
.sr-card.active { display: block; }
.sr-tag { font-size: 10px; text-transform: uppercase; letter-spacing: 0.2em; color: var(--red); margin-bottom: 6px; }
.sr-title { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.sr-instr { font-size: 13px; color: var(--text-mid); line-height: 1.4; }
.sr-time { font-size: 10px; color: var(--text-ghost); margin-top: 8px; }


/* ═══════════════════════════════════════════
   SPIN PAGE (spin.html)
   ═══════════════════════════════════════════ */

.spin-body {
  display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px;
}
.spin-brand { letter-spacing: 0.3em; margin-bottom: 16px; }

/* Code entry */
.code-entry { text-align: center; width: 100%; max-width: 320px; }
.code-entry h2 { font-size: 20px; font-weight: 600; margin-bottom: 6px; }
.code-entry p { font-size: 12px; color: var(--text-faint); margin-bottom: 20px; }
.code-row { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.code-input {
  width: 100%; padding: 12px; border-radius: 8px; text-align: center;
  font-size: 20px; font-family: var(--mono); letter-spacing: 0.25em;
  color: var(--text); background: var(--input-bg); border: 1px solid var(--border-light);
  text-transform: uppercase;
}
.btn-go {
  padding: 12px 20px; border-radius: 8px; font-size: 14px; font-weight: 600;
  color: var(--text); background: var(--red);
}
.code-error { font-size: 12px; color: var(--red); margin-top: 8px; }

/* Loading */
.loading { text-align: center; }
.loading p { font-size: 13px; color: var(--text-dim); }

/* Wheel area */
.wheel-area { display: none; flex-direction: column; align-items: center; }
.wheel-area.active { display: flex; }
.spin-wheel-wrap { margin-bottom: 24px; }

.btn-spin-main {
  padding: 16px 48px; border-radius: 12px; font-size: 18px; font-weight: 700;
  color: var(--text); background: var(--red); border: 1px solid var(--red-dark);
  box-shadow: 0 0 30px var(--red-glow); transition: all 0.2s;
}
.btn-spin-main:disabled { opacity: 0.4; background: var(--border-light); border-color: var(--text-ghost); box-shadow: none; cursor: default; }

/* Already spun */
.already-spun { display: none; flex-direction: column; align-items: center; text-align: center; width: 100%; max-width: 360px; }
.already-spun.active { display: flex; }
.already-spun-tag { font-size: 12px; text-transform: uppercase; letter-spacing: 0.2em; color: var(--red); margin-bottom: 12px; }
.already-spun-title { font-size: 22px; font-weight: 700; margin-bottom: 12px; }
.already-spun-instr { font-size: 16px; color: var(--text-mid); line-height: 1.6; margin-bottom: 8px; }
.already-spun-note { font-size: 12px; color: var(--text-mid); margin-top: 16px; }


/* ═══════════════════════════════════════════
   KEYHOLDER PAGE (keyholder.html)
   ═══════════════════════════════════════════ */

/* Header */
.keyholder-body { max-width: 800px; margin: 0 auto; }
.header { display: block; text-align: center; padding: 12px 16px; }
.header a { text-decoration: none; }
.preset-label { display:block; font-size: 12px; color: var(--text-mid); }
.btn-exit { font-size: 12px; color: var(--text-faint); background: none; text-decoration: none; }
.keyholder-brand   { letter-spacing: 0.1em; font-weight:800;}

/* Keyholder wheel */
.kh-wheel-inner { position: relative; }
.btn-spin-kh {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: -8px;
  padding: 12px 32px; border-radius: 12px; font-size: 13px; font-weight: 700;
  color: var(--text); background: var(--red); border: 1px solid var(--red-dark);
  box-shadow: 0 0 20px var(--red-glow); transition: all 0.2s;
}
.btn-spin-kh:disabled { opacity: 0.4; background: var(--border-light); border-color: var(--text-ghost); box-shadow: none; }

/* Tabs */
.tabs { display: flex; margin: 16px 16px 0; border-bottom: 1px solid var(--border); }
.tab-btn {
  flex: 1; padding: 10px; font-size: 12px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--text-faint); background: none;
  border-bottom: 2px solid transparent; transition: all 0.15s;
}
.tab-btn.active { color: var(--text); border-bottom-color: var(--red); }
.tab-content { padding: 12px 16px 32px; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Section heads */
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.section-title { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-dim); }

/* Outcome list */
.outcome-list { display: flex; flex-direction: column; gap: 6px; max-height: 300px; overflow-y: auto; }
.outcome-item { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 8px; background: var(--surface); border: 1px solid var(--border); }
.outcome-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.outcome-info { flex: 1; min-width: 0; }
.outcome-title { font-size: 13px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.outcome-instr { font-size: 12px; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.outcome-pct { font-size: 12px; font-family: var(--mono); color: var(--text-faint); flex-shrink: 0; }
.outcome-actions { display: flex; gap: 4px; flex-shrink: 0; }
.outcome-actions button { font-size: 12px; padding: 2px 6px; border-radius: 4px; color: var(--text-dim); background: none; }
.outcome-list::-webkit-scrollbar { width: 4px; }
.outcome-list::-webkit-scrollbar-track { background: transparent; }
.outcome-list::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 2px; }

/* Outcome form */
.outcome-form { margin-bottom: 16px; padding: 12px; border-radius: 8px; background: var(--surface-light); border: 1px solid var(--border-light); display: none; }
.outcome-form.open { display: block; }
.weight-row { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.weight-label { font-size: 12px; color: var(--text-dim); }
.weight-slider { flex: 1; accent-color: var(--red); }
.weight-val { font-size: 12px; font-family: var(--mono); color: var(--text); width: 16px; text-align: center; }
.form-buttons { display: flex; gap: 8px; }

/* Presets */
.preset-list { display: flex; flex-direction: column; gap: 6px; }
.preset-item { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 8px; background: var(--surface); border: 1px solid var(--border); cursor: pointer; transition: background 0.1s; }
.preset-item:hover { background: var(--surface-hover); }
.preset-item.current { border-color: rgba(185,28,28,0.2); background: var(--surface-hover); }
.preset-name { flex: 1; font-size: 13px; }
.preset-count { font-size: 12px; color: var(--text-faint); }
.preset-del { font-size: 12px; padding: 2px 6px; color: var(--text-faint); background: none; }
.preset-save-row { display: none; gap: 8px; margin-bottom: 12px; }
.preset-save-row.open { display: flex; }
.preset-empty { font-size: 12px; color: var(--text-faint); text-align: center; padding: 12px; }

/* Share */
.share-desc { font-size: 12px; color: var(--text-faint); margin-bottom: 12px; line-height: 1.5; }
.btn-generate { width: 100%; padding: 14px; border-radius: 8px; font-size: 13px; font-weight: 500; color: var(--text); background: var(--red); }
.btn-generate:disabled { opacity: 0.4; }
.share-result { text-align: center; }
.share-code-display { font-size: 32px; font-family: var(--mono); font-weight: 700; letter-spacing: 0.3em; padding: 16px; border-radius: 8px; background: var(--input-bg); border: 1px solid var(--border-light); margin-bottom: 12px; user-select: all; }
.share-link-row { display: flex; gap: 8px; margin-bottom: 12px; }
.share-link-input { flex: 1; padding: 8px 12px; border-radius: 6px; font-size: 12px; font-family: var(--mono); color: var(--text-mid); background: var(--input-bg); border: 1px solid var(--border-light); }
.share-hint { font-size: 12px; color: var(--text-faint); line-height: 1.5; }
.btn-regen { font-size: 12px; color: var(--text-faint); background: none; margin-top: 8px; }

/* Listening badge */
.listening-badge { display: none; align-items: center; gap: 8px; margin: 16px 0 8px; padding: 10px 14px; border-radius: 8px; background: #111; border: 1px solid #1a1a1a; }
.listening-badge.active { display: flex; }
.listening-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1;} 50%{opacity:0.3;} }
.listening-text { font-size: 12px; color: var(--text-dim); }

/* Check code */
.check-section { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--border); }
.check-row { display: flex; gap: 8px; }
.check-input {
  flex: 1; padding: 8px 12px; border-radius: 6px; font-size: 14px; font-family: var(--mono);
  color: var(--text); background: var(--input-bg); border: 1px solid var(--border-light);
  text-transform: uppercase; letter-spacing: 0.15em; text-align: center;
}
.btn-check { font-size: 12px; padding: 8px 16px; border-radius: 6px; background: #262626; color: var(--text-mid); }
.check-status { margin-top: 8px; font-size: 12px; color: var(--text-dim); }
.check-card { display: none; margin-top: 12px; padding: 14px; border-radius: 8px; background: var(--surface); border: 1px solid var(--border); text-align: left; }
.check-card.active { display: block; }

/* Toast notifications */
.toast-container { position: fixed; top: 0; left: 0; right: 0; z-index: 200; display: flex; flex-direction: column; align-items: center; padding: 16px; pointer-events: none; gap: 8px; }
.toast { width: 100%; max-width: 380px; position: relative; padding: 16px 20px; border-radius: 12px; background: #1a1a1a; border: 1px solid var(--red); box-shadow: 0 4px 24px rgba(185,28,28,0.3); pointer-events: auto; transform: translateY(-120%); opacity: 0; transition: transform 0.4s cubic-bezier(0.16,1,0.3,1), opacity 0.4s ease; }
.toast.visible { transform: translateY(0); opacity: 1; }
.toast-tag { font-size: 10px; text-transform: uppercase; letter-spacing: 0.2em; color: var(--red); margin-bottom: 6px; }
.toast-title { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.toast-instr { font-size: 13px; color: var(--text-mid); line-height: 1.4; }
.toast-time { font-size: 10px; color: var(--text-ghost); margin-top: 8px; }
.toast-dismiss { position: absolute; top: 12px; right: 14px; font-size: 12px; color: var(--text-ghost); background: none; pointer-events: auto; }
/* Feedback link & form */
.feedback-link { display: block; text-align: center; margin-top: 24px; font-size: 11px; color: var(--text-ghost); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.feedback-link:hover { color: var(--text-dim); }
.feedback-form { display: none; max-width: 320px; margin: 12px auto 0; text-align: center; }
.feedback-form.active { display: block; }
.feedback-form textarea { width: 100%; min-height: 80px; padding: 10px; border-radius: 8px; font-size: 13px; color: var(--text); background: var(--input-bg); border: 1px solid var(--border-light); resize: vertical; font-family: inherit; }
.feedback-form textarea::placeholder { color: var(--text-ghost); }
.feedback-form button { margin-top: 8px; padding: 8px 20px; border-radius: 6px; font-size: 12px; font-weight: 600; color: var(--text); background: var(--surface-hover); border: 1px solid var(--border-light); cursor: pointer; }
.feedback-form button:hover { background: var(--surface); }
.feedback-form .feedback-thanks { font-size: 12px; color: var(--text-dim); margin-top: 8px; }