/* Audience / voting page — mobile-first */
.vote-page {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; min-height: 100vh; padding: 1.5rem;
  text-align: center;
}
.vote-page h1 { font-size: 1.6rem; margin-bottom: 0.5rem; color: var(--primary); }
.vote-question {
  font-size: 1.3rem; font-weight: 600; margin-bottom: 2rem;
  max-width: 600px; line-height: 1.4;
}
.vote-area { width: 100%; max-width: 500px; }

/* Scale buttons */
.scale-buttons { display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: center; }
.scale-btn {
  width: 56px; height: 56px; border-radius: 50%;
  border: 2px solid var(--border); background: var(--bg-card);
  color: var(--text); font-size: 1.2rem; font-weight: 700;
  cursor: pointer; transition: all 0.2s;
}
.scale-btn:hover, .scale-btn.selected {
  border-color: var(--primary); background: var(--primary); color: #111;
  transform: scale(1.1);
}
.scale-labels { display: flex; justify-content: space-between; margin-top: 0.5rem; font-size: 0.85rem; color: var(--text-muted); }

/* Word cloud input */
.word-input-area { display: flex; flex-direction: column; gap: 0.75rem; }
.word-input-row { display: flex; gap: 0.5rem; }
.word-input-row input { flex: 1; }

/* Multiple choice */
.mc-options { display: flex; flex-direction: column; gap: 0.75rem; }
.mc-option {
  padding: 1rem 1.5rem; border: 2px solid var(--border);
  border-radius: var(--radius); background: var(--bg-card);
  cursor: pointer; font-size: 1.1rem; text-align: left;
  transition: all 0.2s;
}
.mc-option:hover { border-color: var(--primary); }
.mc-option.selected { border-color: var(--primary); background: rgba(11,141,131,0.15); }

/* Status messages */
.vote-status {
  margin-top: 1.5rem; padding: 0.75rem 1.5rem;
  border-radius: var(--radius); font-weight: 500;
}
.vote-status.confirmed { background: rgba(11,141,131,0.15); color: var(--primary); }
.vote-status.ended { background: rgba(146,150,149,0.15); color: var(--accent); }

/* Thank you screen */
.thank-you-screen {
  display: flex; flex-direction: column; align-items: center;
  gap: 1rem; padding: 2rem 1rem;
}
.thank-you-icon {
  width: 64px; height: 64px; border-radius: 50%;
  background: rgba(11,141,131,0.2); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; font-weight: 700;
}
.thank-you-text { font-size: 1.3rem; font-weight: 600; color: var(--primary); }
.thank-you-wait { font-size: 0.95rem; color: var(--text-muted); animation: pulse 2s ease-in-out infinite; }

/* Disabled vote controls */
.scale-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.mc-option[style*="pointer-events: none"] { opacity: 0.7; cursor: not-allowed; }

/* Waiting state */
.waiting-msg {
  font-size: 1.2rem; color: var(--text-muted);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* Join page */
.join-page {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; min-height: 100vh; padding: 2rem;
}
.join-page h1 { font-size: 2.5rem; margin-bottom: 0.5rem; }
.join-page .subtitle { color: var(--text-muted); margin-bottom: 2rem; font-size: 1.1rem; }

/* Two-field XXX-XXX code input */
.code-input-group {
  display: flex; align-items: center; gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.code-input-half {
  font-size: 2.5rem !important; text-align: center; letter-spacing: 0.4rem;
  width: 140px; font-weight: 700;
  background: var(--bg-input); border: 2px solid var(--border);
  border-radius: var(--radius); color: var(--text);
  padding: 0.5rem;
}
.code-input-half:focus { border-color: var(--primary); outline: none; }
.code-dash {
  font-size: 2.5rem; font-weight: 700; color: var(--text-muted);
  user-select: none; line-height: 1;
}
.join-btn { margin-top: 1rem; font-size: 1.2rem; padding: 0.8rem 3rem; }

/* MC scrollable for 25 options */
.mc-options { max-height: 70vh; overflow-y: auto; }

/* Open-ended vote */
.oe-vote-area { display: flex; flex-direction: column; gap: 0.5rem; }
.oe-vote-area textarea { resize: vertical; min-height: 60px; }

/* Ranking vote */
.ranking-vote-area { display: flex; flex-direction: column; gap: 0.75rem; }
.ranking-hint { font-size: 0.9rem; color: var(--text-muted); text-align: center; }
.ranking-sortable { display: flex; flex-direction: column; gap: 0.5rem; }
.ranking-item {
  display: flex; align-items: center; gap: 0.75rem;
  background: var(--bg-card); border: 2px solid var(--border);
  padding: 0.9rem 1rem; border-radius: var(--radius);
  cursor: grab; transition: all 0.15s; font-size: 1.05rem;
}
.ranking-item:active { cursor: grabbing; }
.ranking-handle { font-size: 1.5rem; color: var(--text-muted); cursor: grab; user-select: none; }
.ranking-text { flex: 1; }
.ranking-ghost { opacity: 0.4; background: rgba(11,141,131,0.1); border-color: var(--primary); }

/* Q&A audience */
.qa-input-area { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
.qa-input-area textarea { flex: 1; resize: none; min-height: 40px; }
.qa-audience-list { display: flex; flex-direction: column; gap: 0.5rem; max-height: 50vh; overflow-y: auto; }
.qa-audience-item {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--bg-card); border: 1px solid var(--border);
  padding: 0.75rem; border-radius: 8px; text-align: left;
}
.qa-audience-item.answered { opacity: 0.5; }
.qa-text { flex: 1; font-size: 0.95rem; word-break: break-word; }
.qa-reacts { display: flex; gap: 0.5rem; flex-shrink: 0; }
.qa-react-btn {
  background: var(--bg-input); border: 1px solid var(--border);
  padding: 0.3rem 0.6rem; border-radius: 4px; cursor: pointer;
  font-size: 0.85rem; transition: all 0.15s;
}
.qa-react-btn.up:hover { color: var(--primary); border-color: var(--primary); }
.qa-react-btn.down:hover { color: #FF6B6B; border-color: #FF6B6B; }

/* Sponsor card overlay */
.sponsor-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.6); display: flex;
  align-items: center; justify-content: center;
  padding: 1rem; animation: fadeIn 0.3s ease;
}
.sponsor-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 16px; padding: 1.5rem; max-width: 360px;
  width: 100%; position: relative; text-align: center;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.sponsor-dismiss {
  position: absolute; top: 8px; right: 12px;
  background: none; border: none; color: var(--text-muted);
  font-size: 1.5rem; cursor: pointer; line-height: 1;
}
.sponsor-card-logo { max-height: 40px; max-width: 160px; object-fit: contain; margin-bottom: 0.75rem; }
.sponsor-card-img { width: 100%; max-height: 160px; object-fit: cover; border-radius: 8px; margin-bottom: 0.75rem; }
.sponsor-card-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.5rem; }
.sponsor-card-body { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 1rem; line-height: 1.4; }
.sponsor-cta-btn { display: inline-block; margin-bottom: 0.75rem; }
.sponsor-card-label { font-size: 0.75rem; color: var(--text-muted); opacity: 0.6; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Slide progress indicator */
.slide-progress {
  font-size: 0.85rem; color: var(--text-muted);
  font-weight: 600; white-space: nowrap;
}

/* Character counter */
.char-counter {
  font-size: 0.8rem; color: var(--text-muted);
  text-align: right; margin-top: 2px;
}
.char-counter.near-limit { color: #f59e0b; }

/* Connection status dot */
.connection-status {
  display: inline-block; width: 10px; height: 10px;
  border-radius: 50%; flex-shrink: 0;
}
.connection-status.connected { background: #22c55e; }
.connection-status.disconnected { background: #ef4444; }
.connection-status.reconnecting { background: #f59e0b; animation: pulse 1s infinite; }

/* Answer reveal celebration */
.answer-reveal {
  margin-top: 1.5rem; padding: 1.5rem; text-align: center;
  background: rgba(11,141,131,0.1); border-radius: 12px;
  animation: fadeIn 0.5s ease;
}
.answer-reveal-icon { font-size: 2.5rem; margin-bottom: 0.5rem; }
.answer-reveal-label { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 0.3rem; }
.answer-reveal-value { font-size: 2rem; font-weight: 700; color: var(--primary); }

/* Submitted word tags */
.submitted-words { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; margin-bottom: 0.5rem; }
.submitted-word-tag {
  display: inline-block; padding: 4px 12px; border-radius: 16px;
  background: rgba(11,141,131,0.15); color: var(--primary);
  font-size: 0.9rem; font-weight: 500;
}

/* WCAG AA: Focus & reduced motion */
.scale-btn:focus-visible, .mc-option:focus-visible, .ranking-item:focus-visible, .qa-react-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  .scale-btn, .mc-option, .vote-status, .ranking-item {
    transition: none !important;
  }
}
