@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700;800&display=swap');

/* Master View Layouts */
:root {
  --app-bg: #0b1118;
  --panel-bg: rgba(22, 33, 49, 0.4);
  --border-color: rgba(255, 255, 255, 0.1);
  --active-blue: #0ed3ff;
  --active-orange: #ff8c61;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --font-mobile: 'Montserrat', sans-serif;
}

html {
  background: var(--app-bg);
  overflow-x: hidden;
}

/* Base Body override if accessing from pure views */
body {
  margin: 0;
  background: transparent;
  font-family: var(--font-mobile);
  overflow-x: hidden;
}

.mobile-app-wrapper {
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: transparent;
  position: relative;
  color: var(--text-main);
  background-image: radial-gradient(circle at center 20%, rgba(14, 211, 255, 0.05) 0%, transparent 50%),
    radial-gradient(circle at center 80%, rgba(255, 140, 97, 0.03) 0%, transparent 50%);
}

/* Header Config */
.mobile-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4.5rem 1.25rem 1rem 1.25rem;
}

.header-logo {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.aletheia-text {
  font-size: 1.4rem;
  background: linear-gradient(90deg, #0ed3ff, #8a7de8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.debate-text {
  font-size: 0.8rem;
  letter-spacing: 0.25em;
  color: var(--active-blue);
  opacity: 0.8;
  text-transform: uppercase;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mic-status-icon {
  width: 20px;
  height: 20px;
  transition: color 0.3s ease;
  cursor: pointer;
}

.status-pending {
  color: #fbbf24;
}

/* Yellow */
.status-granted {
  color: #4ade80;
}

/* Green */
.status-denied {
  color: #f87171;
}

/* Red */

.hardware-switcher {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #f1f5f9;
  border-radius: 8px;
  padding: 4px 8px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  max-width: 140px;
  text-overflow: ellipsis;
  outline: none;
  cursor: pointer;
}

.hardware-switcher.hidden {
  display: none;
}

.hardware-switcher:focus {
  border-color: #0ed3ff;
}

/* Title Pill */
.debate-title-pill {
  margin: 0 0.5rem 1.5rem 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--panel-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 1200px;
  width: 100%;
  box-sizing: border-box;
}

.live-tag {
  color: var(--active-orange);
  font-weight: 800;
  margin-right: 0.25rem;
}

/* Generic Content Container */
.mobile-content-scroll {
  flex: 1;
  padding: 0 0.5rem 2rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

@media (min-width: 900px) {
  .mobile-content-scroll {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
    gap: 2rem;
  }

  .section-block:nth-child(1) {
    grid-column: 1 / -1;
  }
}

.section-block {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.section-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* Debaters Panel */
.debaters-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(22, 33, 49, 0.4) 0%, rgba(30, 20, 20, 0.4) 100%);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.5rem 0.1rem;
  position: relative;
  overflow: hidden;
}

@media (min-width: 900px) {
  .debaters-panel {
    padding: 1.5rem 1rem;
  }
}

/* Subtle background glows inside panel */
.debaters-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  background: radial-gradient(circle at left center, rgba(14, 211, 255, 0.08), transparent 70%);
  z-index: 0;
  pointer-events: none;
}

.debaters-panel::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background: radial-gradient(circle at right center, rgba(255, 140, 97, 0.08), transparent 70%);
  z-index: 0;
  pointer-events: none;
}

.debater-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 1;
  flex: 1;
}

.avatar-container {
  position: relative;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  padding: 3px;
  margin-bottom: 0.75rem;
}

.blue-glow {
  background: linear-gradient(180deg, #0ed3ff, transparent);
  box-shadow: 0 0 15px rgba(14, 211, 255, 0.4);
}

.orange-glow {
  background: linear-gradient(180deg, #ff8c61, transparent);
  box-shadow: 0 0 15px rgba(255, 140, 97, 0.3);
}

.audio-wave {
  position: absolute;
  top: -12px;
  left: -12px;
  right: -12px;
  bottom: -12px;
  border-radius: 50%;
  z-index: -1;
  transform: scale(var(--wave-scale, 1));
  opacity: var(--wave-opacity, 0);
  transition: transform 0.05s linear, opacity 0.1s ease;
}

.debater-blue .audio-wave {
  background: radial-gradient(circle, rgba(14, 211, 255, 0.6) 0%, rgba(14, 211, 255, 0) 70%);
}

.debater-orange .audio-wave {
  background: radial-gradient(circle, rgba(255, 140, 97, 0.6) 0%, rgba(255, 140, 97, 0) 70%);
}

.cursor-pointer {
  cursor: pointer;
}

@keyframes pnyx-avatar-skeleton {
  0% {
    background-color: #0f172a;
  }

  50% {
    background-color: #1e293b;
  }

  100% {
    background-color: #0f172a;
  }
}

.avatar-img-circle {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  background-color: #0f172a;
  animation: pnyx-avatar-skeleton 1.5s ease-in-out infinite;
  color: transparent;
}

.avatar-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #222;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: bold;
}

.mic-icon {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #111;
  border: 2px solid #222;
}

.mic-icon svg {
  width: 14px;
  height: 14px;
}

.p1-mic {
  background: var(--active-blue);
  border-color: #111;
}

.p2-mic {
  background: var(--active-orange);
  border-color: #111;
}

.mic-active {
  background: #10b981 !important;
  color: #ffffff !important;
}

.mic-muted {
  background: #ef4444 !important;
  color: #ffffff !important;
}

.debater-name {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.you-badge {
  font-size: 0.55rem;
  font-weight: 800;
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
  vertical-align: middle;
}

.blue-you-badge {
  background: var(--active-blue);
  color: #000;
}

.orange-you-badge {
  background: var(--active-orange);
  color: #000;
}

.debater-stats {
  font-size: 0.7rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.stat-highlight-blue {
  font-weight: 700;
  color: var(--active-blue);
}

.stat-highlight-orange {
  font-weight: 700;
  color: var(--active-orange);
}


.center-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 1;
  margin-top: -2rem;
  /* Pull up to align perfectly with avatars */
}

/* SVG Audio Spectrum Simulation */
.audio-spectrum {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 20px;
  margin-bottom: 0.5rem;
}

.bar {
  width: 3px;
  border-radius: 2px;
  transform-origin: bottom;
}

.spacer {
  width: 10px;
  background: transparent;
}

.bar-blue {
  background: var(--active-blue);
  opacity: 0.8;
}

.bar-orange {
  background: var(--active-orange);
  opacity: 0.4;
}

.h1 {
  height: 8px;
}

.h2 {
  height: 14px;
}

.h3 {
  height: 20px;
}

.h4 {
  height: 26px;
}

.turn-badge {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  margin-bottom: 4px;
}

.blue-turn-badge {
  background: rgba(14, 213, 255, 0.1);
  color: var(--active-blue);
  border: 1px solid rgba(14, 213, 255, 0.3);
}

.orange-turn-badge {
  background: rgba(255, 140, 97, 0.1);
  color: var(--active-orange);
  border: 1px solid rgba(255, 140, 97, 0.3);
}

.dim {
  opacity: 0.2 !important;
}

@keyframes equalizer-bounce {

  0%,
  100% {
    transform: scaleY(0.6);
    opacity: 0.6;
  }

  50% {
    transform: scaleY(1.4);
    opacity: 1;
  }
}

.active-pulse {
  animation: equalizer-bounce 1s ease-in-out infinite;
}

.p1 {
  animation-delay: 0.1s;
}

.p2 {
  animation-delay: 0.3s;
}

.p3 {
  animation-delay: 0.0s;
}

.p4 {
  animation-delay: 0.4s;
}

.p5 {
  animation-delay: 0.2s;
}

.time-remaining {
  font-weight: 800;
  font-size: 1.2rem;
  margin: 2px 0;
  font-variant-numeric: tabular-nums;
}

.round-subtext {
  font-size: 0.65rem;
  color: var(--text-muted);
}


/* AI Judge Analysis Panel */
.ai-analysis-panel {
  background: rgba(13, 21, 33, 0.6);
  border: 1px solid rgba(14, 211, 255, 0.2);
  border-radius: 16px;
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  box-shadow: inset 0 0 40px rgba(14, 211, 255, 0.05);
}

.ai-logo-container {
  width: 120px;
  height: 120px;
  margin-bottom: 1rem;
  filter: drop-shadow(0 0 10px rgba(14, 211, 255, 0.3));
}

.geometric-a {
  width: 100%;
  height: 100%;
}

.ai-title {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--active-blue);
  margin-bottom: 0.75rem;
  text-align: center;
}

.claim-check-card {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-main);
  text-align: center;
  padding: 0 0.5rem;
}

.claim-check-card .timestamp {
  color: var(--text-muted);
  font-weight: 600;
}

/* Transcription Pipeline Visuals */
.live-transcriptions-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 50px;
  max-height: 100%;
  overflow: hidden;
  position: relative;
  width: 100%;
  padding: 20px;
}

/* Subtle fade out gradient at the top of the transcriptions */
.live-transcriptions-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 20px;
  background: linear-gradient(to bottom, rgba(13, 21, 33, 1), transparent);
  pointer-events: none;
  z-index: 2;
}

.stt-line {
  font-size: 0.95rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
  transition: all 0.3s ease;
  font-style: italic;
  font-weight: 500;
}

@keyframes stt-glow {
  from {
    opacity: 0;
    transform: translateY(10px);
    text-shadow: 0 0 5px rgba(14, 211, 255, 0);
  }

  to {
    opacity: 1;
    transform: translateY(0);
    text-shadow: 0 0 10px rgba(14, 211, 255, 0.5);
  }
}

.stt-glow-in {
  animation: stt-glow 0.3s ease forwards;
}

.stt-finalized {
  color: rgba(255, 255, 255, 0.95);
  font-style: normal;
  text-shadow: 0 0 8px rgba(74, 222, 128, 0.4);
}

.stt-fade-out {
  opacity: 0 !important;
  transform: translateY(-10px) !important;
}


/* Scoreboard & Audience Interaction */
.tug-of-war-bar {
  display: flex;
  height: 38px;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 1rem;
  border: 2px solid #111;
  /* Sharp structural casing */
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.tug-left,
.tug-right {
  display: flex;
  align-items: center;
  transition: width 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.tug-left {
  background: linear-gradient(90deg, #1e3a8a, var(--active-blue));
  justify-content: flex-start;
  padding-left: 1rem;
}

.tug-right {
  background: linear-gradient(90deg, var(--active-orange), #9a3412);
  justify-content: flex-end;
  padding-right: 1rem;
}

.tug-score {
  font-weight: 800;
  font-size: 1.4rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.interaction-buttons {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.action-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0.7rem 0.25rem;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.7rem;
  cursor: pointer;
  transition: transform 0.1s;
}

.btn-likeminded {
  background: rgba(255, 255, 255, 0.15);
}

.audience-scoreboard {
  margin-top: 15px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(0, 0, 0, 0.2) !important;
  border-radius: 12px;
}

.score-labels {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 5px;
}

.score-agree {
  color: #10b981;
}

.score-neutral {
  color: #9ca3af;
}

.score-disagree {
  color: #ef4444;
}

.score-bar {
  display: flex;
  height: 10px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.score-fill-agree {
  background: #10b981;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.score-fill-neutral {
  background: #9ca3af;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.score-fill-disagree {
  background: #ef4444;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.voting-controls {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 15px;
}

.btn-vote {
  flex: 1;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.3);
  color: white;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-vote:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.btn-vote.agree:active,
.btn-vote.agree:hover {
  border-color: #10b981;
  color: #10b981;
}

.btn-vote.disagree:active,
.btn-vote.disagree:hover {
  border-color: #ef4444;
  color: #ef4444;
}

.btn-vote.neutral:active,
.btn-vote.neutral:hover {
  border-color: #9ca3af;
  color: #9ca3af;
}

@keyframes emoji-pop {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.6) translateY(-4px);
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.8));
  }

  100% {
    transform: scale(1);
    filter: drop-shadow(0 0 0 transparent);
  }
}

.vote-pop {
  display: inline-block;
  animation: emoji-pop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Instantly block voting tools mathematically if the user is a Participant */
.mobile-app-wrapper[data-microphone-is-participant-value="true"] .voting-controls,
.mobile-app-wrapper.participant-view .voting-controls {
  display: none !important;
}

.active-vote-target {
  border: 1px solid rgba(255, 255, 255, 0.4) !important;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
  transform: scale(1.035);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: rgba(0, 0, 0, 0.4) !important;
}

.active-badge-indicator {
  font-size: 10px;
  font-weight: 700;
  color: #0ed3ff;
  letter-spacing: 1px;
  text-align: center;
  margin-bottom: 5px;
  animation: pulse-op 2s infinite;
}

.active-badge-wrapper {
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.active-badge-progress-bg {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 2px;
}

.active-badge-progress-fill {
  height: 100%;
  background: #0ed3ff;
  box-shadow: 0 0 8px #0ed3ff;
  width: 100%;
  transition: width 0.1s linear;
}

.mobile-label {
  display: none;
}

@media (max-width: 800px) {
  .desktop-label {
    display: none !important;
  }

  .mobile-label {
    display: inline !important;
  }
}

@keyframes pulse-op {
  0% {
    opacity: 0.5;
  }

  50% {
    opacity: 1;
  }

  100% {
    opacity: 0.5;
  }
}

.btn-factual {
  background: rgba(74, 222, 128, 0.15);
  color: #fff;
}

.btn-respectful {
  background: rgba(245, 158, 11, 0.15);
  color: #fff;
}

.btn-icon {
  font-size: 1rem;
}

.chat-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 2rem;
}

.input-icon {
  position: absolute;
  left: 14px;
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}

.mobile-chat-input {
  width: 100%;
  background: var(--panel-bg);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 1rem 1rem 1rem 2.5rem;
  border-radius: 24px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
}

.mobile-chat-input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.3);
}

/* Spectator Modal Overlay */
.spectator-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(11, 17, 24, 0.85);
  /* Frost Blur Effect */
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.overlay-card {
  background: linear-gradient(135deg, rgba(22, 33, 49, 0.95), rgba(30, 20, 20, 0.95));
  border: 1px solid rgba(14, 211, 255, 0.3);
  box-shadow: 0 0 30px rgba(14, 211, 255, 0.1);
  padding: 30px;
  border-radius: 20px;
  max-width: 400px;
  text-align: center;
}

/* Real-time Transcription STT Styles */
.live-transcriptions-container {
  width: 100%;
  /* max-width: 600px; */
  margin-top: 15px;
  min-height: 60px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
  pointer-events: none;
  border-radius: 12px;
  border-color: var(--border-color);
}

.stt-line {
  background: rgba(14, 211, 255, 0.1);
  border: 1px solid rgba(14, 211, 255, 0.3);
  color: #e2e8f0;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  text-align: center;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 15px rgba(14, 211, 255, 0.15);
  transition: all 0.4s ease;
  transform: translateY(10px);
  /* opacity: 0; */
}

.stt-glow-in {
  transform: translateY(0);
  opacity: 1;
}

.stt-finalized {
  color: #fff;
  text-shadow: 0 0 8px rgba(14, 211, 255, 0.5);
  border-color: rgba(14, 211, 255, 0.6);
  background: rgba(14, 211, 255, 0.15);
}

.stt-fade-out {
  opacity: 0 !important;
  transform: translateY(-10px) !important;
}

.btn-verdict-info {
  background: rgba(250, 204, 21, 0.1);
  border: 1px solid rgba(250, 204, 21, 0.3);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: #facc15;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.btn-verdict-info:hover {
  background: rgba(250, 204, 21, 0.2);
  transform: scale(1.1);
}
.timeline-node {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  width: 120px;
  position: relative;
  flex-shrink: 0;
  padding-top: 10px;
  transition: all 0.3s ease;
}
