/* ── Variables ─────────────────────────────────────── */
:root {
  --bg:       #0f0f0f;
  --bg2:      #181818;
  --bg3:      #222;
  --lime:     #c8ff57;
  --lime-dim: #9dd43a;
  --coral:    #ff6b47;
  --text:     #f0efe8;
  --text-dim: #888;
  --text-muted: #555;
  --border:   #2a2a2a;
  --radius:   14px;
  --radius-lg: 20px;
  --shadow:   0 4px 24px rgba(0,0,0,0.5);
  --font-body: 'DM Sans', sans-serif;
  --font-display: 'DM Serif Text', serif;
}

/* ── Reset ─────────────────────────────────────────── */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── Screens ───────────────────────────────────────── */
.screen {
  display: none;
  min-height: 100vh;
  animation: fadeUp 0.35s ease-out;
}
.screen.active { display: flex; flex-direction: column; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Brand ─────────────────────────────────────────── */
.brand-dot {
  display: inline-block;
  width: 10px; height: 10px;
  background: var(--lime);
  border-radius: 50%;
  margin-right: 6px;
  animation: pulse 2s infinite;
}
.brand-dot.sm { width: 7px; height: 7px; }
.brand-name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

@keyframes pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

/* ── Buttons ───────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none; border-radius: 50px;
  font-family: var(--font-body);
  font-size: 0.95rem; font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  outline: none; text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--lime);
  color: #0f0f0f;
}
.btn-primary:hover { background: var(--lime-dim); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(200,255,87,0.25); }
.btn-primary:active { transform: translateY(0); }

.btn-outline {
  background: transparent;
  border: 2px solid var(--border);
  color: var(--text);
}
.btn-outline:hover { border-color: var(--lime); color: var(--lime); }

.btn-ghost {
  background: transparent;
  color: var(--text-dim);
}
.btn-ghost:hover { color: var(--text); background: var(--bg3); }

.btn-xl { padding: 16px 36px; font-size: 1.05rem; }
.btn-full { width: 100%; }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }

.btn-arrow { font-size: 1.1rem; transition: transform 0.2s; }
.btn:hover .btn-arrow { transform: translateX(4px); }

.btn-back {
  background: none; border: none;
  color: var(--text-dim); font-family: var(--font-body);
  font-size: 0.9rem; cursor: pointer;
  padding: 8px 0; transition: color 0.2s;
}
.btn-back:hover { color: var(--text); }

.btn-link {
  background: none; border: none;
  color: var(--text-dim); font-family: var(--font-body);
  font-size: 0.9rem; cursor: pointer; margin-top: 16px;
  text-decoration: underline; text-underline-offset: 3px;
  transition: color 0.2s;
}
.btn-link:hover { color: var(--text); }

/* ── Inputs ────────────────────────────────────────── */
.input-field {
  width: 100%;
  padding: 14px 18px;
  background: var(--bg2);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem; color: var(--text);
  outline: none; transition: border-color 0.2s;
}
.input-field:focus { border-color: var(--lime); }
.input-field::placeholder { color: var(--text-muted); }

.input-code-inline {
  flex: 1;
  padding: 12px 18px;
  background: var(--bg2);
  border: 2px solid var(--border);
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 1rem; color: var(--text);
  outline: none; transition: border-color 0.2s;
  letter-spacing: 4px; text-align: center;
}
.input-code-inline:focus { border-color: var(--lime); }
.input-code-inline::placeholder { letter-spacing: 0; color: var(--text-muted); }

.input-code-big {
  width: 100%;
  padding: 20px;
  background: var(--bg2);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: var(--text);
  letter-spacing: 12px;
  text-align: center;
  outline: none;
  transition: border-color 0.2s;
  margin-bottom: 16px;
}
.input-code-big:focus { border-color: var(--lime); }

/* ── Error ─────────────────────────────────────────── */
.error-msg {
  background: rgba(255,107,71,0.12);
  border: 1px solid var(--coral);
  color: var(--coral);
  border-radius: var(--radius);
  padding: 10px 16px;
  font-size: 0.88rem;
  margin-bottom: 14px;
  text-align: center;
}

/* ══════════════════════════════════════════════
   HOME SCREEN
══════════════════════════════════════════════ */
#screen-home {
  flex-direction: row;
  min-height: 100vh;
}

.home-layout {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 40px 48px;
  max-width: 560px;
  justify-content: space-between;
}

.home-brand {
  display: flex; align-items: center;
  font-size: 1.1rem; font-weight: 600;
}

.home-hero { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 40px 0 32px; }

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  color: var(--text);
}
.hero-title em {
  font-style: italic;
  color: var(--lime);
}

.hero-sub {
  color: var(--text-dim);
  font-size: 1.05rem;
  font-weight: 300;
}

.home-actions { display: flex; flex-direction: column; gap: 14px; }

.join-inline { display: flex; gap: 10px; align-items: center; }

.home-scroll-hint { padding-top: 40px; }
.scroll-bar {
  width: 40px; height: 3px;
  background: var(--border);
  border-radius: 2px;
}

.home-visual {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg2);
  border-left: 1px solid var(--border);
  padding: 48px;
}

.demo-poll {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  width: 100%; max-width: 400px;
  box-shadow: var(--shadow);
}

.demo-q {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin-bottom: 28px;
  line-height: 1.4;
}

.demo-bars { display: flex; flex-direction: column; gap: 14px; }

.demo-bar-row {
  display: flex; flex-direction: column; gap: 5px;
}
.demo-bar-row > span {
  font-size: 0.82rem;
  color: var(--text-dim);
  font-weight: 500;
}

.demo-bar {
  height: 36px;
  width: var(--w);
  background: linear-gradient(90deg, var(--lime), var(--lime-dim));
  border-radius: 6px;
  display: flex; align-items: center;
  padding-right: 10px;
  justify-content: flex-end;
  animation: barGrow 1.2s ease-out both;
  position: relative;
  min-width: 50px;
}
.demo-bar span { font-size: 0.8rem; font-weight: 700; color: #0f0f0f; }

@keyframes barGrow {
  from { width: 0; opacity: 0; }
  to   { width: var(--w); opacity: 1; }
}

.demo-bar-row:nth-child(1) .demo-bar { animation-delay: 0.1s; }
.demo-bar-row:nth-child(2) .demo-bar { animation-delay: 0.25s; }
.demo-bar-row:nth-child(3) .demo-bar { animation-delay: 0.4s; }
.demo-bar-row:nth-child(4) .demo-bar { animation-delay: 0.55s; }

.demo-badge {
  margin-top: 20px;
  font-size: 0.8rem;
  color: var(--text-dim);
  display: flex; align-items: center; gap: 6px;
}

/* ══════════════════════════════════════════════
   CREATE SCREEN
══════════════════════════════════════════════ */
#screen-create {
  max-width: 700px;
  margin: 0 auto;
  width: 100%;
  padding: 32px 24px;
}

.screen-header {
  display: flex; align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.screen-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
}

.create-body { display: flex; flex-direction: column; gap: 28px; }

.form-section { display: flex; flex-direction: column; gap: 8px; }

.form-label {
  font-size: 0.8rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.8px;
  color: var(--text-dim);
}

/* Question Cards */
.question-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex; flex-direction: column; gap: 16px;
  animation: fadeUp 0.25s ease-out;
}

.question-card-header {
  display: flex; justify-content: space-between; align-items: center;
}
.question-number {
  font-size: 0.78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.8px;
  color: var(--lime);
}
.btn-remove-q {
  background: none; border: none;
  color: var(--text-muted); font-size: 1.2rem;
  cursor: pointer; padding: 4px 8px; border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}
.btn-remove-q:hover { color: var(--coral); background: rgba(255,107,71,0.1); }

.options-list { display: flex; flex-direction: column; gap: 8px; }

.option-row { display: flex; gap: 8px; align-items: center; }

.option-input {
  flex: 1;
  padding: 10px 14px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.9rem; color: var(--text);
  outline: none; transition: border-color 0.2s;
}
.option-input:focus { border-color: var(--lime); }
.option-input::placeholder { color: var(--text-muted); }

.btn-remove-opt {
  background: none; border: none;
  color: var(--text-muted); cursor: pointer;
  font-size: 1rem; padding: 6px;
  border-radius: 6px; transition: color 0.2s;
}
.btn-remove-opt:hover { color: var(--coral); }

.btn-add-option {
  background: none; border: 1px dashed var(--border);
  color: var(--text-dim); font-family: var(--font-body);
  font-size: 0.85rem; cursor: pointer;
  padding: 8px 14px; border-radius: var(--radius);
  transition: all 0.2s; align-self: flex-start;
}
.btn-add-option:hover { border-color: var(--lime); color: var(--lime); }

.btn-add-q {
  align-self: flex-start;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 12px 20px;
  gap: 8px;
  color: var(--text-dim);
  transition: all 0.2s;
}
.btn-add-q:hover { border-color: var(--lime); color: var(--lime); background: rgba(200,255,87,0.04); }

.plus-icon { font-size: 1.2rem; font-weight: 300; }

/* ══════════════════════════════════════════════
   LOBBY SCREEN
══════════════════════════════════════════════ */
#screen-lobby {
  align-items: center;
  justify-content: center;
  background: var(--bg);
}

.lobby-layout {
  display: flex; flex-direction: column;
  align-items: center; width: 100%;
  max-width: 500px; padding: 40px 24px;
  gap: 32px; min-height: 100vh; justify-content: space-between;
}

.lobby-top {
  width: 100%; display: flex; flex-direction: column; gap: 8px;
}
.lobby-brand { display: flex; align-items: center; font-size: 0.9rem; font-weight: 600; }
.lobby-poll-title { font-family: var(--font-display); font-size: 1.6rem; line-height: 1.2; }

.lobby-center { display: flex; flex-direction: column; align-items: center; gap: 20px; width: 100%; }

.lobby-instruction { color: var(--text-dim); font-size: 0.9rem; }

.room-code-display {
  font-family: var(--font-display);
  font-size: clamp(3rem, 12vw, 5rem);
  letter-spacing: 10px;
  color: var(--lime);
  text-align: center;
}

.qr-wrap {
  background: white;
  padding: 12px;
  border-radius: 12px;
  display: inline-block;
}

.lobby-url {
  font-size: 0.78rem;
  color: var(--text-muted);
  word-break: break-all;
  text-align: center;
}

.lobby-bottom { display: flex; flex-direction: column; align-items: center; gap: 16px; width: 100%; }

.participant-count {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.9rem; color: var(--text-dim);
}

.live-dot {
  width: 8px; height: 8px;
  background: var(--lime); border-radius: 50%;
  animation: pulse 1.5s infinite;
}

.live-badge {
  background: rgba(255,50,50,0.15);
  color: #ff5555;
  border: 1px solid rgba(255,50,50,0.3);
  border-radius: 50px;
  padding: 4px 12px;
  font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.5px;
}

/* ══════════════════════════════════════════════
   HOST ACTIVE SCREEN
══════════════════════════════════════════════ */
#screen-host-active { background: var(--bg); }

.host-layout { display: flex; flex-direction: column; height: 100vh; }

.host-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 28px;
  border-bottom: 1px solid var(--border);
  background: var(--bg2);
  gap: 16px; flex-wrap: wrap;
}

.host-meta { display: flex; align-items: center; gap: 12px; }
.host-code { font-size: 0.85rem; color: var(--text-dim); font-weight: 600; }
.host-progress { font-size: 0.9rem; color: var(--text-dim); font-weight: 500; flex: 1; text-align: center; }
.host-controls { display: flex; gap: 10px; }

.host-question-body {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 40px 24px;
  gap: 24px;
}

.host-question-text {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3.5vw, 2.4rem);
  text-align: center; max-width: 800px;
  line-height: 1.3;
}

.vote-count-display {
  display: flex; align-items: baseline; gap: 8px;
}
.vote-count-display span:first-child {
  font-family: var(--font-display);
  font-size: 3rem; color: var(--lime);
}
.vote-label { color: var(--text-dim); font-size: 1rem; }

/* ══════════════════════════════════════════════
   CHART
══════════════════════════════════════════════ */
.chart-container {
  width: 100%; max-width: 700px;
  display: flex; flex-direction: column; gap: 14px;
}

.chart-bar-row {
  display: flex; flex-direction: column; gap: 6px;
}
.chart-label {
  display: flex; justify-content: space-between;
  font-size: 0.9rem; font-weight: 500;
  color: var(--text);
}
.chart-label-pct { color: var(--lime); font-weight: 700; }

.chart-track {
  height: 42px;
  background: var(--bg3);
  border-radius: 8px; overflow: hidden;
  border: 1px solid var(--border);
}

.chart-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--lime), var(--lime-dim));
  border-radius: 8px;
  transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  min-width: 0;
  display: flex; align-items: center;
  padding-left: 10px;
}

.chart-fill.is-answer { background: linear-gradient(90deg, var(--coral), #ff9347); }

/* ══════════════════════════════════════════════
   JOIN SCREEN
══════════════════════════════════════════════ */
#screen-join { justify-content: center; align-items: center; }

.join-layout {
  display: flex; flex-direction: column;
  width: 100%; max-width: 440px;
  padding: 40px 24px;
  gap: 40px; min-height: 100vh; justify-content: center;
}

.join-brand { display: flex; align-items: center; font-size: 1rem; font-weight: 600; }

.join-body { display: flex; flex-direction: column; gap: 16px; }

.join-title {
  font-family: var(--font-display);
  font-size: 2.2rem; margin-bottom: 4px;
}
.join-sub { color: var(--text-dim); font-size: 0.95rem; margin-bottom: 8px; }

/* ══════════════════════════════════════════════
   WAITING SCREEN
══════════════════════════════════════════════ */
.centered-screen {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; padding: 40px 24px; gap: 16px;
}

.waiting-anim { display: flex; gap: 10px; margin-bottom: 8px; }
.waiting-dot {
  width: 12px; height: 12px;
  background: var(--lime); border-radius: 50%;
  animation: waitBounce 1.4s ease-in-out infinite;
}
.waiting-dot:nth-child(2) { animation-delay: 0.2s; }
.waiting-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes waitBounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

.waiting-title { font-family: var(--font-display); font-size: 2rem; }
.waiting-sub { color: var(--text-dim); }
.waiting-room-code { font-size: 0.9rem; color: var(--text-muted); margin-top: 8px; }

/* ══════════════════════════════════════════════
   VOTE SCREEN
══════════════════════════════════════════════ */
#screen-vote { background: var(--bg); }

.vote-layout { display: flex; flex-direction: column; min-height: 100vh; }

.vote-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
}
.vote-progress { font-size: 0.85rem; color: var(--text-dim); font-weight: 500; }
.vote-room { font-size: 0.85rem; color: var(--text-muted); }

.vote-body {
  flex: 1; display: flex; flex-direction: column;
  padding: 32px 24px;
  max-width: 600px; width: 100%; margin: 0 auto;
  gap: 32px;
}

.vote-question {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 4vw, 2rem);
  line-height: 1.3;
}

.vote-options { display: flex; flex-direction: column; gap: 12px; }

.vote-option {
  padding: 18px 24px;
  background: var(--bg2);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem; font-weight: 500;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
}
.vote-option:hover { border-color: var(--lime); background: rgba(200,255,87,0.05); transform: translateX(4px); }
.vote-option.selected { border-color: var(--lime); background: rgba(200,255,87,0.12); color: var(--lime); }
.vote-option:disabled { cursor: default; transform: none; }

/* ══════════════════════════════════════════════
   VOTED SCREEN
══════════════════════════════════════════════ */
.voted-icon {
  width: 80px; height: 80px;
  background: var(--lime);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; color: #0f0f0f; font-weight: 900;
  animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.voted-title { font-family: var(--font-display); font-size: 2rem; }
.voted-sub { color: var(--text-dim); }

@keyframes popIn {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

/* ══════════════════════════════════════════════
   PARTICIPANT RESULTS
══════════════════════════════════════════════ */
#screen-p-results { background: var(--bg); }

.p-results-layout {
  flex: 1; display: flex; flex-direction: column;
  padding: 32px 24px;
  max-width: 600px; width: 100%; margin: 0 auto;
  gap: 20px;
}

.p-results-header {
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.8px;
  color: var(--lime); font-weight: 700;
}
.p-results-question { font-family: var(--font-display); font-size: 1.5rem; line-height: 1.3; }
.p-results-waiting { font-size: 0.85rem; color: var(--text-muted); text-align: center; margin-top: 8px; }

/* ══════════════════════════════════════════════
   ENDED
══════════════════════════════════════════════ */
.ended-icon { font-size: 4rem; animation: popIn 0.5s ease-out; }
.ended-title { font-family: var(--font-display); font-size: 2.4rem; }
.ended-sub { color: var(--text-dim); margin-bottom: 8px; }

/* ══════════════════════════════════════════════
   AUTH & USER PROFILE
══════════════════════════════════════════════ */
.home-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.auth-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-auth {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 50px;
  color: var(--text-dim);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-auth:hover {
  border-color: var(--text-dim);
  color: var(--text);
}

.google-icon { width: 16px; height: 16px; flex-shrink: 0; }

.user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar-wrap {
  width: 32px; height: 32px;
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid var(--border);
  transition: border-color 0.2s;
}
.user-avatar-wrap:hover { border-color: var(--lime); }

.user-avatar { width: 100%; height: 100%; object-fit: cover; }

/* User dropdown */
.user-dropdown {
  position: fixed;
  z-index: 1000;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  min-width: 240px;
  box-shadow: var(--shadow);
  animation: fadeUp 0.2s ease-out;
}

.dropdown-user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.user-avatar-lg {
  width: 40px; height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.dropdown-name { font-weight: 600; font-size: 0.9rem; color: var(--text); }
.dropdown-email { font-size: 0.78rem; color: var(--text-muted); }

.dropdown-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 8px 0;
}

.dropdown-item {
  display: block; width: 100%;
  padding: 10px 12px;
  background: none; border: none;
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.88rem;
  cursor: pointer; text-align: left;
  transition: background 0.15s;
}
.dropdown-item:hover { background: var(--bg3); }

.dropdown-signout { color: var(--coral); }
.dropdown-signout:hover { background: rgba(255,107,71,0.08); }

/* ══════════════════════════════════════════════
   DASHBOARD (MY POLLS)
══════════════════════════════════════════════ */
.dashboard-layout {
  max-width: 700px;
  margin: 0 auto;
  width: 100%;
  padding: 32px 24px;
}

.dashboard-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dashboard-loading {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 60px 0;
}

.dashboard-empty {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 24px;
  gap: 12px;
  display: none;
}

.empty-icon { font-size: 3rem; margin-bottom: 4px; }
.empty-title { font-family: var(--font-display); font-size: 1.5rem; }
.empty-sub { color: var(--text-dim); font-size: 0.95rem; margin-bottom: 8px; }

/* Poll cards */
.poll-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  cursor: pointer;
  transition: all 0.2s;
  animation: fadeUp 0.25s ease-out;
}
.poll-card:hover {
  border-color: var(--lime);
  transform: translateX(4px);
  background: rgba(200,255,87,0.03);
}

.poll-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.poll-card-title {
  font-family: var(--font-display);
  font-size: 1.1rem; line-height: 1.3;
  flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.poll-card-status {
  font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
  padding: 3px 10px; border-radius: 50px; flex-shrink: 0;
}

.status-ended { background: var(--bg3); color: var(--text-dim); }
.status-active { background: rgba(200,255,87,0.12); color: var(--lime); }
.status-lobby { background: rgba(255,200,87,0.12); color: #ffc857; }

.poll-card-meta {
  display: flex; align-items: center;
  gap: 6px; font-size: 0.82rem; color: var(--text-muted);
}

.meta-dot { color: var(--text-muted); }

/* ══════════════════════════════════════════════
   POLL DETAIL (PAST RESULTS)
══════════════════════════════════════════════ */
.poll-detail-layout {
  max-width: 700px;
  margin: 0 auto;
  width: 100%;
  padding: 32px 24px;
}

.poll-detail-meta {
  display: flex; align-items: center;
  gap: 6px; font-size: 0.85rem;
  color: var(--text-dim); margin-bottom: 32px;
}

.poll-detail-questions {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.detail-question-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.detail-question-label {
  font-size: 0.75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.8px;
  color: var(--lime);
}

.detail-question-text {
  font-family: var(--font-display);
  font-size: 1.3rem; line-height: 1.3;
}

.detail-vote-count {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ══════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════ */
@media (max-width: 768px) {
  #screen-home { flex-direction: column; }
  .home-visual { display: none; }
  .home-layout { padding: 32px 24px; max-width: 100%; min-height: 100vh; }
  .hero-title { font-size: 2.4rem; }
  .host-header { flex-wrap: wrap; }
  .host-question-text { font-size: 1.5rem; }
  .host-controls { width: 100%; justify-content: flex-end; }
  .poll-card-title { font-size: 1rem; }
  .poll-detail-layout, .dashboard-layout { padding: 24px 16px; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 2rem; }
  .join-inline { flex-direction: column; }
  .input-code-inline { width: 100%; }
  .room-code-display { font-size: 3.5rem; letter-spacing: 6px; }
  .vote-option { padding: 16px 18px; }
  .home-top-bar { gap: 8px; }
  .btn-auth { padding: 6px 12px; font-size: 0.8rem; }
  .user-dropdown { min-width: 200px; left: 16px; right: 16px; }
}
