/* In C: Audience Ensemble — Styles */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #0a0a0f;
  --bg-panel: #12121a;
  --bg-elevated: #1a1a28;
  --text: #e0e0e8;
  --text-dim: #666680;
  --border: #2a2a3a;
  --accent: #ff6b35;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 14px;
}

/* Layout */
#app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
}

/* Start Overlay */
#start-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg);
  z-index: 50;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

#start-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.start-content {
  text-align: center;
}

.start-title {
  font-size: 72px;
  font-weight: 300;
  letter-spacing: 12px;
  color: var(--text);
  margin-bottom: 8px;
}

.start-subtitle {
  font-size: 14px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 60px;
}

.play-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  padding: 20px;
  border-radius: 50%;
  transition: all 0.3s ease;
  outline: none;
}

.play-btn:hover {
  color: #fff;
  transform: scale(1.1);
  filter: drop-shadow(0 0 20px rgba(255, 107, 53, 0.5));
}

.play-btn:active {
  transform: scale(0.95);
}

.play-btn svg {
  width: 80px;
  height: 80px;
}

.start-hint {
  margin-top: 40px;
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 1px;
}

/* Score Display */
#score-section {
  flex: 1;
  position: relative;
  min-height: 0;
  padding: 20px;
}

#score-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Button Stations */
#button-section {
  padding: 20px 30px;
  background: var(--bg-panel);
  border-top: 1px solid var(--border);
}

#button-row {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.station {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.station-button {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 3px solid var(--border);
  background: var(--bg);
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
  outline: none;
}

.station-button.eligible {
  border-color: var(--station-color, #fff);
  box-shadow: 0 0 12px color-mix(in srgb, var(--station-color, #fff) 40%, transparent),
              inset 0 0 8px color-mix(in srgb, var(--station-color, #fff) 20%, transparent);
  cursor: pointer;
}

.station-button.queued {
  border-color: var(--station-color, #fff);
  animation: pulse-queued 1s ease-in-out infinite;
}

.station-button.cooldown {
  border-color: var(--border);
  opacity: 0.3;
  cursor: default;
}

.station-button.ineligible {
  border-color: var(--border);
  opacity: 0.15;
  cursor: default;
}

.station-button.pressed {
  animation: press-flash 0.2s ease-out;
}

.station-label {
  font-size: 13px;
  font-weight: bold;
  color: var(--station-color, var(--text-dim));
  text-align: center;
}

.station-key {
  font-size: 10px;
  color: var(--text-dim);
}

@keyframes pulse-queued {
  0%, 100% { box-shadow: 0 0 8px color-mix(in srgb, var(--station-color, #fff) 30%, transparent); }
  50% { box-shadow: 0 0 24px color-mix(in srgb, var(--station-color, #fff) 70%, transparent); }
}

@keyframes press-flash {
  0% { transform: scale(1); background: color-mix(in srgb, var(--station-color, #fff) 50%, transparent); }
  100% { transform: scale(1); background: var(--bg); }
}

/* Status Bar */
#status-bar {
  display: flex;
  justify-content: center;
  gap: 30px;
  padding: 10px 20px;
  background: var(--bg);
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-dim);
}

.status-item {
  display: flex;
  gap: 6px;
}

.status-label {
  color: var(--text-dim);
}

.status-value {
  color: var(--text);
}

.admin-link {
  color: var(--accent);
  text-decoration: none;
  cursor: pointer;
  padding: 2px 10px;
  border: 1px solid var(--accent);
  border-radius: 4px;
  font-size: 11px;
  transition: all 0.15s;
}

.admin-link:hover {
  background: var(--accent);
  color: #fff;
}

/* Operator Panel Overlay */
#operator-panel {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 100;
  justify-content: center;
  align-items: center;
}

#operator-panel.visible {
  display: flex;
}

#operator-content {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 30px;
  min-width: 420px;
  max-width: 600px;
}

#operator-content h2 {
  margin-bottom: 20px;
  font-size: 18px;
  color: var(--accent);
}

.op-section {
  margin-bottom: 20px;
}

.op-section h3 {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.op-row {
  display: flex;
  gap: 10px;
  margin-bottom: 8px;
  align-items: center;
}

.op-row label {
  width: 120px;
  color: var(--text-dim);
  font-size: 13px;
}

.op-row input, .op-row select {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 10px;
  border-radius: 4px;
  font-family: inherit;
  font-size: 13px;
  width: 120px;
}

.op-btn {
  padding: 8px 20px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  transition: all 0.15s;
}

.op-btn:hover {
  background: var(--bg-elevated);
  border-color: var(--accent);
}

.op-btn.primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.op-hint {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 15px;
}
