/* basic setup */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Courier New', Courier, monospace;
  background-color: #0a0a0a;
  color: #e0e0e0;
  height: 100vh;
  overflow: hidden;
  display: grid;
  grid-template-columns: 280px 1fr 300px;
  border-top: 2px solid #000;
}

/* colors */
:root {
  --cyan: #00bcd4;
  --green: #00e676;
  --orange: #ff9100;
  --red: #ff5252;
  --dark-bg: #111;
  --card-bg: #1a1a1a;
  --border: #333;
}

/* container logic */
.col-transcript {
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  background: #0f0f0f;
  height: 100vh;
  overflow: hidden;
}

.col-header {
  padding: 15px;
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #888;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.live-dot {
  width: 6px;
  height: 6px;
  background: var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 5px var(--cyan);
}

.transcript-box {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 20px;
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  scroll-behavior: smooth;
}

/* center stage */
.col-stage {
  position: relative;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, #1a1a1a 0%, #0a0a0a 70%);
  overflow: hidden;
}

.system-status {
  position: absolute;
  top: 20px;
  left: 20px;
  font-size: 10px;
  letter-spacing: 2px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.version {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 10px;
  color: #444;
}

.circle-viz {
  width: 250px;
  height: 250px;
  border: 1px solid #333;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.3s ease;
}

.circle-viz::before {
  content: '';
  position: absolute;
  width: 140px;
  height: 140px;
  border: 1px solid #222;
  border-radius: 50%;
}

.circle-viz::after {
  content: '';
  position: absolute;
  width: 80px;
  height: 80px;
  background: #111;
  border-radius: 50%;
  z-index: 1;
}

.mic-icon {
  z-index: 2;
  font-size: 24px;
  color: #555;
  transition: color 0.2s;
}

.col-stage.listening .circle-viz {
  border-color: var(--cyan);
  box-shadow: 0 0 30px rgba(0, 188, 212, 0.1);
}

.col-stage.listening .mic-icon {
  color: var(--cyan);
}

.col-stage.speaking .circle-viz {
  border-color: var(--green);
  box-shadow: 0 0 40px rgba(0, 230, 118, 0.2);
}

.col-stage.speaking .mic-icon {
  color: var(--green);
}

.col-stage.speaking .circle-viz::after {
  animation: pulseSpeak 1.5s infinite;
}

.col-stage.active .circle-viz {
  border-color: #fff;
}

.col-stage.active .mic-icon {
  color: #fff;
}

.col-stage.thinking .circle-viz {
  border-color: var(--orange);
  box-shadow: 0 0 30px rgba(255, 145, 0, 0.2);
}

.col-stage.thinking .mic-icon {
  color: var(--orange);
}

.col-stage.searching .circle-viz {
  border-color: #a855f7;
  box-shadow: 0 0 30px rgba(168, 85, 247, 0.2);
}

.col-stage.searching .mic-icon {
  color: #a855f7;
}

.col-stage.searching .circle-viz::after {
  animation: pulseSearch 1.0s infinite;
  background: #2e1065;
}

@keyframes pulseSearch {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }

  50% {
    transform: scale(0.95);
    opacity: 1;
  }

  100% {
    transform: scale(1);
    opacity: 0.8;
  }
}

@keyframes pulseSpeak {
  0% {
    transform: scale(1);
    background: #111;
  }

  50% {
    transform: scale(1.1);
    background: #222;
  }

  100% {
    transform: scale(1);
    background: #111;
  }
}

.main-text {
  margin-top: 40px;
  font-size: 18px;
  font-weight: 300;
  color: #ddd;
}

.sub-text {
  margin-top: 10px;
  font-size: 12px;
  color: var(--cyan);
  opacity: 0.8;
  height: 20px;
}

.waveform-fake {
  margin-top: 40px;
  display: flex;
  gap: 3px;
  height: 30px;
  align-items: center;
}

.bar {
  width: 3px;
  background: #333;
  height: 10px;
  border-radius: 2px;
}

.col-stage.listening .bar {
  animation: waveListen 1s infinite ease-in-out;
}

.col-stage.speaking .bar {
  background: var(--cyan);
  animation: waveSpeak 0.5s infinite ease-in-out;
}

@keyframes waveListen {

  0%,
  100% {
    height: 10px
  }

  50% {
    height: 15px
  }
}

@keyframes waveSpeak {

  0%,
  100% {
    height: 10px
  }

  50% {
    height: 25px
  }
}

/* metrics sidebar */
.col-observe {
  border-left: 1px solid var(--border);
  background: #0f0f0f;
  display: flex;
  flex-direction: column;
  padding: 0;
  height: 100vh;
}

.obs-section {
  padding: 20px;
  border-bottom: 1px solid var(--border);
}

.obs-title {
  font-size: 10px;
  letter-spacing: 1px;
  color: #666;
  margin-bottom: 15px;
  text-transform: uppercase;
}

.metric-item {
  margin-bottom: 15px;
}

.m-key {
  font-size: 10px;
  color: #888;
  display: block;
  margin-bottom: 4px;
}

.m-val {
  font-size: 12px;
  color: var(--cyan);
  font-weight: bold;
}

.metric-sub {
  font-size: 10px;
  color: #555;
  margin-top: -10px;
  margin-bottom: 15px;
}

.cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.stat-card {
  background: var(--card-bg);
  padding: 10px;
  border: 1px solid #222;
}

.stat-label {
  font-size: 8px;
  color: #555;
  margin-bottom: 5px;
  text-transform: uppercase;
}

.stat-val {
  font-size: 14px;
  color: #ddd;
}

.footer-action {
  margin-top: auto;
  padding: 20px;
  border-top: 1px solid var(--border);
}

.term-btn {
  width: 100%;
  padding: 12px;
  background: transparent;
  border: 1px solid var(--cyan);
  color: var(--cyan);
  font-family: inherit;
  font-size: 10px;
  letter-spacing: 2px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s;
}

.term-btn:hover {
  background: rgba(0, 188, 212, 0.1);
  box-shadow: 0 0 15px rgba(0, 188, 212, 0.2);
}

#connect-overlay {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}

.start-btn {
  padding: 15px 40px;
  background: var(--cyan);
  color: #000;
  border: none;
  font-weight: bold;
  letter-spacing: 2px;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(0, 188, 212, 0.4);
}
