/* ===================================================================
 * The Scrying Pool: shared styles
 * Aligned to the PyConDE 2026 visual identity
 * (palette + IBM Plex Sans extracted from 2026.pycon.de)
 * =================================================================== */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=IBM+Plex+Mono:wght@400;500;700&display=swap');

:root {
  /* ---------- PyConDE26 brand palette (verbatim from main.css) ---------- */
  --blue:          #3778be;   /* primary brand accent, headings, tags */
  --blue-light:    #00c8e1;   /* cyan accent */
  --blue-lighter:  #a2d9ef;
  --green:         #00aa41;   /* CTA / success */
  --green-light:   #96dc00;
  --yellow:        #fac800;   /* highlight / winner */
  --orange:        #ff9b00;
  --orange-dark:   #d96b06;
  --red:           #c41011;   /* danger */
  --red-light:     #e54f53;
  --pink:          #d14190;

  /* ---------- PyConDE26 neutrals ---------- */
  --white:         #ffffff;
  --off-white:     #fafafa;
  --neutral-50:    #f5f5f5;
  --neutral-100:   #eeeeee;
  --neutral-200:   #e0e0e0;
  --neutral-300:   #d4d4d4;

  --text-primary:   #111111;
  --text-secondary: #555555;
  --text-muted:     #888888;

  /* ---------- Semantic aliases used across the Scrying Pool ---------- */
  --bg:         var(--white);
  --bg-panel:   var(--off-white);
  --bg-sunken:  var(--neutral-50);

  --ink:        var(--text-primary);
  --ink-dim:    var(--text-secondary);
  --ink-muted:  var(--text-muted);

  --accent:     var(--blue);       /* primary */
  --accent-2:   var(--yellow);     /* highlight / winner */
  --teal:       var(--blue-light); /* secondary cyan */
  --danger:     var(--red);
  --good:       var(--green);

  --border:     var(--neutral-200);
  --border-strong: var(--neutral-300);

  /* ---------- Fonts (verbatim from main.css) ---------- */
  --sans: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --serif: var(--sans); /* PyConDE uses sans throughout; alias preserved */

  /* ---------- Flat, square, PyConDE-native tokens ---------- */
  --radius: 0px;           /* PyConDE uses sharp corners */
  --radius-sm: 2px;
  --shadow: none;          /* PyConDE uses box-shadow: none !important */
  --shadow-card: 0 1px 0 var(--neutral-200);  /* hairline instead of drop shadow */
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--orange-dark); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--sans);
  font-weight: 700;
  color: var(--blue);
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.2;
}
h1 { margin: 0 0 0.3em; font-size: 2rem; }

.mono { font-family: var(--mono); }

/* =================== Card =================== */
.card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.25rem 1.5rem;
  box-shadow: none;
}

/* =================== Option button (audience vote) =================== */
.option-btn {
  display: flex;
  width: 100%;
  min-height: 56px;
  padding: 0.95rem 1.1rem;
  margin-bottom: 0.6rem;
  border-radius: var(--radius);
  border: 2px solid var(--neutral-200);
  background: var(--white);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease, transform 0.08s ease;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.option-btn:hover { border-color: var(--blue); background: var(--neutral-50); }
.option-btn.selected {
  background: var(--blue);
  color: var(--white);
  border-color: var(--blue);
}
.option-btn.selected:hover { background: var(--blue); }
.option-btn:disabled,
.option-btn.disabled {
  cursor: not-allowed;
  opacity: 0.5;
  background: var(--neutral-50);
  color: var(--ink-muted);
  border-color: var(--neutral-200);
}
.option-btn:disabled:hover,
.option-btn.disabled:hover {
  background: var(--neutral-50);
  border-color: var(--neutral-200);
}
.option-btn.selected:disabled,
.option-btn.selected.disabled {
  /* Preserve the "this was your pick" hint even after the round closes */
  background: var(--blue);
  color: var(--white);
  border-color: var(--blue);
  opacity: 0.7;
}

/* =================== Live bar chart =================== */
.bars { display: flex; flex-direction: column; gap: 0.55rem; }
.bar-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.bar-label {
  flex: 0 0 40%;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bar-track {
  flex: 1;
  position: relative;
  background: var(--neutral-100);
  border-radius: var(--radius);
  height: 26px;
  overflow: hidden;
  border: 1px solid var(--neutral-200);
}
.bar-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  background: var(--blue);
  border-radius: 0;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.bar-fill.winner {
  background: var(--yellow);
}
.bar-count {
  flex: 0 0 3rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--ink-dim);
  font-family: var(--mono);
  font-weight: 500;
}

/* =================== Countdown =================== */
.countdown {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 2.4rem;
  color: var(--blue);
  text-align: center;
  letter-spacing: 1px;
  line-height: 1;
}
.countdown.urgent { color: var(--red); animation: pulse 0.8s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.05); } }

/* =================== Header =================== */
.head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}
.head .title { font-family: var(--sans); font-size: 0.85rem; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.head .round { font-family: var(--mono); color: var(--blue); font-size: 0.9rem; font-weight: 500; }

/* =================== Reveal =================== */
.reveal-word {
  font-family: var(--sans);
  font-size: 3.2rem;
  font-weight: 700;
  color: var(--ink);
  text-align: center;
  padding: 0.4rem 0.8rem;
  display: inline-block;
  background:
    linear-gradient(transparent 55%, var(--yellow) 55%, var(--yellow) 92%, transparent 92%);
  animation: revealIn 0.7s ease-out;
  line-height: 1.1;
}
.reveal-strategy {
  text-align: center;
  color: var(--blue);
  font-style: italic;
  font-weight: 500;
  margin-top: 0.9rem;
}
@keyframes revealIn {
  0%   { opacity: 0; transform: scale(0.6); letter-spacing: 20px; }
  100% { opacity: 1; transform: scale(1);   letter-spacing: 0; }
}

/* =================== Buttons (PyConDE style) =================== */
.btn {
  display: inline-block;
  border: 2px solid var(--blue);
  background: var(--white);
  color: var(--blue);
  padding: 0.65rem 1.1rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
  box-shadow: none;
}
.btn:hover   { background: var(--blue); color: var(--white); }
.btn.primary { background: var(--blue); color: var(--white); border-color: var(--blue); }
.btn.primary:hover { background: var(--ink); border-color: var(--ink); }
.btn.success { background: var(--green); color: var(--white); border-color: var(--green); }
.btn.success:hover { background: #008f37; border-color: #008f37; }
.btn.danger  { border-color: var(--red); color: var(--red); background: var(--white); }
.btn.danger:hover { background: var(--red); color: var(--white); }
.btn.ghost   { border-color: var(--border-strong); color: var(--ink-muted); background: transparent; }
.btn.ghost:hover { background: var(--neutral-100); color: var(--ink); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn:disabled:hover { background: inherit; color: inherit; }

.err { color: var(--red); font-weight: 500; }

/* =================== Tag / chip =================== */
.tag {
  display: inline-block;
  padding: 0.28rem 0.7rem;
  border-radius: var(--radius);
  background: var(--yellow);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.tag.blue { background: var(--blue); color: var(--white); }
.tag.cyan { background: var(--blue-light); color: var(--ink); }

/* =================== Utility =================== */
hr { border: 0; border-top: 1px solid var(--border); margin: 1rem 0; }
input, select, textarea {
  font-family: var(--sans);
  font-size: 1rem;
  padding: 0.7rem 0.9rem;
  background: var(--white);
  color: var(--ink);
  border: 2px solid var(--border-strong);
  border-radius: var(--radius);
  transition: border-color 0.12s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--blue);
}
