:root {
  --bg: #0B0F19;
  --panel: #111827;
  --text: #F8FAFC;
  --text-dim: #64748B;
  --text-faded: #334155;
  --accent: #22D3EE;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  text-align: center;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Setup Screen */
#setup {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: radial-gradient(circle at center, #1E293B 0%, var(--bg) 100%);
}

h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #22D3EE, #8B5CF6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

textarea {
  width: 100%;
  max-width: 800px;
  height: 300px;
  background: var(--panel);
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 1.5rem;
  font-size: 1.2rem;
  font-family: inherit;
  resize: none;
  outline: none;
  margin-bottom: 1.5rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

button {
  background: var(--text);
  color: var(--bg);
  border: none;
  padding: 1rem 2.5rem;
  font-size: 1.2rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s;
}

button:hover {
  transform: scale(1.05);
}

/* Prompter Screen */
#prompter {
  display: none;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  padding: 2rem;
}

.lines-container {
  width: 100vw;
  height: 80vh;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
}

#top, #bottom {
  display: none;
}

#current {
  position: absolute;
  left: 50%;
  display: flex;
  align-items: center;
  overflow: visible;
}

.train-track {
  display: flex;
  align-items: center;
  white-space: nowrap;
  gap: 15px;
  transition: transform 0.2s linear;
  will-change: transform;
  z-index: 10;
}

.train-word {
  font-size: clamp(2rem, 4.5vw, 4rem);
  font-weight: 600;
  color: #64748B;
  transition: color 0.3s ease;
  display: inline-block;
}

.train-word.spoken {
  color: #1E293B;
}

.train-word.active {
  color: #FFFFFF;
}

.center-guide {
  position: absolute;
  left: 50%;
  top: 10%;
  bottom: 10%;
  width: 400px;
  background: radial-gradient(ellipse at center, rgba(255,255,255,0.03) 0%, transparent 70%);
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 0;
}

.controls {
  position: absolute;
  top: 1rem;
  right: 2rem;
}

.btn-small {
  padding: 0.5rem 1rem;
  font-size: 1rem;
  background: rgba(255,255,255,0.1);
  color: white;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.2);
}

.bottom-panel {
  position: absolute;
  bottom: 25px;
  width: 90%;
  max-width: 900px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: rgba(17, 24, 39, 0.85);
  padding: 20px 30px;
  border-radius: 24px;
  border: 1px solid rgba(34, 211, 238, 0.2);
  box-shadow: 0 10px 40px rgba(0,0,0,0.6);
  backdrop-filter: blur(10px);
}

.playback-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.icon-btn {
  background: linear-gradient(135deg, #22D3EE, #8B5CF6);
  color: #fff;
  border: none;
  padding: 10px 24px;
  font-size: 1.1rem;
  font-weight: bold;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 15px rgba(34, 211, 238, 0.3);
}

.icon-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 20px rgba(34, 211, 238, 0.5);
}

.speed-control {
  display: flex;
  align-items: center;
  gap: 12px;
  color: white;
  font-size: 1rem;
  font-weight: 500;
}

.speed-control input[type="range"] {
  width: 150px;
}

.slider-container {
  display: flex;
  align-items: center;
  width: 100%;
}

input[type="range"] {
  width: 100%;
  cursor: pointer;
  accent-color: var(--accent);
  height: 6px;
  background: rgba(255,255,255,0.1);
  border-radius: 10px;
  outline: none;
}
