/* Ultra-Lightweight Mobile Hype Client Styles */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;700;800;900&family=Space+Grotesk:wght@600;700;800&display=swap');

:root {
  --bg-primary: #04070e;
  --bg-card: rgba(12, 18, 36, 0.85);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --doom-emerald: #10b981;
  --gold-accent: #ffd166;
  --text-white: #f8fafc;
  --text-muted: #94a3b8;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-white);
  font-family: 'Outfit', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  justify-content: center;
}

.vote-container {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 16px;
  position: relative;
}

/* Header */
.vote-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 10px;
}

.brand-text h1 {
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  background: linear-gradient(90deg, #fff, var(--doom-emerald));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-sub {
  font-family: 'Space Grotesk', monospace;
  font-size: 0.65rem;
  color: var(--doom-emerald);
  letter-spacing: 0.12em;
}

.header-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-family: 'Space Grotesk', monospace;
  font-size: 0.72rem;
  font-weight: 800;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid var(--doom-emerald);
  color: var(--doom-emerald);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--doom-emerald);
}

/* Find My House Helper Accordion */
.find-house-helper {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
  transition: all 0.2s ease;
}

.find-house-summary {
  padding: 10px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gold-accent);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  list-style: none;
}
.find-house-summary::-webkit-details-marker {
  display: none;
}

.find-house-body {
  padding: 10px 14px 14px 14px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.helper-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.helper-select {
  flex: 1;
  background: #0d1424;
  border: 1px solid var(--border-subtle);
  color: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  outline: none;
}

.matched-badge {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid var(--doom-emerald);
  color: var(--doom-emerald);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
}

/* House Selector Tabs */
.house-selector-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 10px;
  margin-bottom: 10px;
  scrollbar-width: none;
}
.house-selector-scroll::-webkit-scrollbar {
  display: none;
}

.house-chip {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.house-chip.active {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 15px var(--chip-glow, rgba(255, 255, 255, 0.2));
  transform: scale(1.03);
}

.chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.chip-name {
  font-weight: 800;
}

.chip-score {
  font-family: 'Space Grotesk', monospace;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffd166;
  margin-left: 2px;
}

.house-chip.active .chip-score {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

/* Active Faction Hero Card */
.active-faction-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  position: relative;
  overflow: hidden;
}

.active-faction-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--active-grad);
  opacity: 0.15;
  z-index: 0;
}

.faction-symbol-emblem {
  font-size: 2.5rem;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 0 10px var(--active-glow));
}

.faction-info-box {
  flex: 1;
  margin-left: 14px;
  position: relative;
  z-index: 1;
}

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

.faction-name {
  font-size: 1.3rem;
  font-weight: 900;
  color: #fff;
  line-height: 1.1;
}

.faction-year-badge {
  font-family: 'Space Grotesk', monospace;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--gold-accent);
}

.faction-tagline {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.faction-depts-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.dept-pill {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  color: #e2e8f0;
}

.faction-score-box {
  text-align: right;
  position: relative;
  z-index: 1;
}

.score-digits {
  font-family: 'Space Grotesk', monospace;
  font-size: 1.4rem;
  font-weight: 900;
  color: #fff;
}

.score-label {
  font-size: 0.62rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.user-hyped-tag {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  font-size: 0.72rem;
  color: var(--gold-accent);
  margin-top: 4px;
  background: rgba(255, 209, 102, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(255, 209, 102, 0.15);
}

.user-hyped-tag strong {
  font-family: 'Space Grotesk', monospace;
  font-weight: 800;
  color: #fff;
}

.sync-status-dot {
  font-size: 0.62rem;
  cursor: help;
}

/* Combo Streak Banner */
.combo-banner-box {
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}

.combo-text {
  font-family: 'Space Grotesk', monospace;
  font-size: 0.92rem;
  font-weight: 900;
  color: var(--gold-accent);
  letter-spacing: 0.1em;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.2s ease;
}

.combo-text.active {
  opacity: 1;
  transform: scale(1.1);
  text-shadow: 0 0 15px var(--gold-accent);
}

/* Giant Hype Button */
.hype-arena-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 270px;
}

.hype-button {
  width: 215px;
  height: 215px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.4);
  background: var(--active-grad);
  box-shadow: 0 0 40px var(--active-glow), inset 0 0 30px rgba(255, 255, 255, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: transform 0.06s cubic-bezier(0, 0, 0.2, 1);
  touch-action: manipulation;
}

.hype-button:active, .hype-button.pressed {
  transform: scale(0.91);
  box-shadow: 0 0 60px var(--active-glow), inset 0 0 40px rgba(255, 255, 255, 0.6);
}

.btn-icon {
  font-size: 3.2rem;
  pointer-events: none;
}

.btn-label {
  font-family: 'Space Grotesk', monospace;
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
  pointer-events: none;
}

.btn-pulse-ring {
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  border: 2px solid var(--active-glow);
  opacity: 0.6;
  animation: ring-pulse 1.8s infinite cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: none;
}

@keyframes ring-pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  100% { transform: scale(1.25); opacity: 0; }
}

/* Floating Particles (ALWAYS +1 ONLY) */
.click-burst-num {
  position: absolute;
  font-family: 'Space Grotesk', monospace;
  font-size: 1.6rem;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 0 12px var(--active-glow);
  pointer-events: none;
  animation: float-burst 0.75s forwards cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 100;
}

@keyframes float-burst {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(0.8); }
  50% { opacity: 1; transform: translate(-50%, -120%) scale(1.3); }
  100% { opacity: 0; transform: translate(-50%, -180%) scale(1); }
}

/* Auth Modal Overlay */
.auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 14, 0.95);
  backdrop-filter: blur(14px);
  z-index: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
}

.auth-overlay.hidden {
  display: none;
}

.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 32px 24px;
  max-width: 360px;
  width: 100%;
}

.auth-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.auth-card h2 {
  font-size: 1.5rem;
  font-weight: 900;
  margin-bottom: 6px;
}

.auth-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 24px;
}

.google-signin-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 48px;
  margin: 12px 0 16px 0;
}

.auth-error-msg {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.8rem;
  line-height: 1.4;
  margin: 10px 0 14px 0;
  text-align: center;
}

.auth-config-hint {
  background: rgba(234, 179, 8, 0.12);
  border: 1px solid rgba(234, 179, 8, 0.35);
  color: #fef08a;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.76rem;
  line-height: 1.4;
  margin: 10px 0 14px 0;
  text-align: center;
}

.header-right-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-user-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 3px 8px;
  font-size: 0.72rem;
}

.user-avatar-icon {
  font-size: 0.8rem;
}

.user-email-text {
  max-width: 110px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #cbd5e1;
  font-weight: 600;
}

.btn-signout {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 0.75rem;
  cursor: pointer;
  padding: 0 3px;
  line-height: 1;
  transition: color 0.2s;
}

.btn-signout:hover {
  color: #ef4444;
}

.auth-footnote {
  font-size: 0.72rem !important;
  color: var(--text-muted) !important;
  line-height: 1.4 !important;
  margin-bottom: 0 !important;
}

/* State Overlay (Standby / Paused / Ended) */
.state-banner-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 14, 0.92);
  backdrop-filter: blur(12px);
  z-index: 400;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
}

.state-banner-overlay.hidden {
  display: none;
}

.state-icon {
  font-size: 3.5rem;
  margin-bottom: 12px;
}

.state-title {
  font-size: 1.6rem;
  font-weight: 900;
  margin-bottom: 8px;
}

.state-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 300px;
}

/* Pre-Arena Entry Gate (Zero Polling Lobby) */
.arena-gate-stage {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 16px 0 24px 0;
}

.gate-card {
  background: linear-gradient(145deg, rgba(16, 24, 40, 0.92), rgba(8, 12, 22, 0.97));
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65), 0 0 35px var(--active-glow, rgba(230, 36, 41, 0.25));
  border-radius: 24px;
  padding: 28px 20px;
  text-align: center;
  max-width: 360px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.gate-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--active-grad, linear-gradient(90deg, #e62429, #f59e0b));
}

.gate-symbol-glow {
  font-size: 3.2rem;
  margin-bottom: 8px;
  filter: drop-shadow(0 0 16px var(--active-glow, rgba(230, 36, 41, 0.6)));
  animation: gate-pulse 2.2s infinite ease-in-out;
}

@keyframes gate-pulse {
  0% { transform: scale(1); filter: drop-shadow(0 0 12px var(--active-glow, rgba(230, 36, 41, 0.4))); }
  50% { transform: scale(1.08); filter: drop-shadow(0 0 24px var(--active-glow, rgba(230, 36, 41, 0.8))); }
  100% { transform: scale(1); filter: drop-shadow(0 0 12px var(--active-glow, rgba(230, 36, 41, 0.4))); }
}

.gate-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 14px;
  border-radius: 999px;
  font-family: 'Space Grotesk', monospace;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
  background: rgba(234, 179, 8, 0.16);
  border: 1px solid rgba(234, 179, 8, 0.4);
  color: #fde047;
}

.gate-status-pill.active {
  background: rgba(34, 197, 94, 0.18);
  border-color: rgba(34, 197, 94, 0.5);
  color: #86efac;
}

.gate-status-pill.ended {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.5);
  color: #fca5a5;
}

.gate-status-pill.paused {
  background: rgba(249, 115, 22, 0.18);
  border-color: rgba(249, 115, 22, 0.5);
  color: #fdba74;
}

.gate-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
  animation: pulse-dot 1.5s infinite;
}

.gate-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 6px;
}

.gate-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted, #94a3b8);
  margin-bottom: 22px;
  line-height: 1.45;
  max-width: 290px;
}

.btn-enter-arena {
  width: 100%;
  min-height: 54px;
  padding: 14px 20px;
  border-radius: 16px;
  border: none;
  cursor: pointer;
  background: var(--active-grad, linear-gradient(135deg, #e62429 0%, #8b0000 100%));
  color: #fff;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.08rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 8px 24px var(--active-glow, rgba(230, 36, 41, 0.45)), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: transform 0.12s ease, filter 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.btn-enter-arena:hover {
  filter: brightness(1.1);
  box-shadow: 0 10px 28px var(--active-glow, rgba(230, 36, 41, 0.6)), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.btn-enter-arena:active {
  transform: scale(0.96);
}

.btn-enter-arena.loading {
  opacity: 0.85;
  pointer-events: none;
  background: #334155;
  box-shadow: none;
}

.bea-icon {
  font-size: 1.35rem;
}

.gate-error-banner {
  margin-top: 16px;
  padding: 11px 14px;
  border-radius: 12px;
  font-size: 0.82rem;
  line-height: 1.4;
  text-align: center;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  width: 100%;
  animation: banner-pop 0.25s ease-out;
}

@keyframes banner-pop {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

