/**
 * Cyberstar Simulator - Styles
 */

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

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: #e0e0e0;
  line-height: 1.6;
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Intro Animation Styles */
.intro-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: black;
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
  transition:
    opacity 1s ease-in-out,
    transform 1s ease-in-out;
  cursor: pointer;
  overflow: hidden;
}

.intro-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.intro-video.video-playing {
  opacity: 1;
}

.intro-prompt {
  position: absolute;
  text-align: center;
  color: #00d4ff;
  font-family: "Courier New", monospace;
  text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
  transition: opacity 0.3s ease;
}

.power-icon {
  font-size: 80px;
  margin-bottom: 20px;
  animation: pulse-glow 2s infinite ease-in-out;
}

@keyframes pulse-glow {
  0% {
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.4);
    transform: scale(1);
  }
  50% {
    text-shadow: 0 0 30px rgba(0, 212, 255, 0.8);
    transform: scale(1.05);
  }
  100% {
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.4);
    transform: scale(1);
  }
}

.skip-intro {
  position: absolute;
  bottom: 20px;
  right: 20px;
  color: rgba(255, 255, 255, 0.4);
  font-family: "Courier New", monospace;
  font-size: 0.8em;
  text-transform: uppercase;
  letter-spacing: 2px;
  pointer-events: none;
}

.app-content {
  pointer-events: none;
}

.app-ready .app-content {
  pointer-events: auto;
}

/* Staggered Reveal System */
.reveal-stagger {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 1s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.reveal-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.intro-hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(1.1);
}

header {
  text-align: center;
  margin-bottom: 40px;
  padding: 30px 0;
  border-bottom: 2px solid #00d4ff;
}

.band-selector {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(0, 212, 255, 0.3);
}

.band-selector label {
  display: inline-block;
  margin-right: 15px;
  margin-bottom: 0;
  color: #00d4ff;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.95em;
  letter-spacing: 1px;
}

.band-selector select {
  display: inline-block;
  width: auto;
  margin: 0;
  padding: 10px 15px;
  background: rgba(0, 212, 255, 0.1);
  border: 2px solid #00d4ff;
  border-radius: 4px;
  color: #00d4ff;
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 250px;
}

.band-selector select:hover {
  background: rgba(0, 212, 255, 0.2);
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
}

.band-selector select:focus {
  outline: none;
  background: rgba(0, 212, 255, 0.15);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.4);
}

h1 {
  font-size: 2.5em;
  color: #00d4ff;
  margin-bottom: 10px;
  text-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
  letter-spacing: 2px;
}

.subtitle {
  color: #a0a0a0;
  font-size: 1.1em;
  font-style: italic;
}

.subtitle-info {
  color: #80a0a0;
  font-size: 0.95em;
  font-style: italic;
  margin-top: 5px;
}

h2 {
  color: #00d4ff;
  margin-bottom: 20px;
  font-size: 1.5em;
  border-bottom: 1px solid #00d4ff;
  padding-bottom: 10px;
}

main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 40px;
}

@media (max-width: 1024px) {
  main {
    grid-template-columns: 1fr;
  }
}

.control-panel {
  background: rgba(22, 33, 62, 0.8);
  border: 1px solid #00d4ff;
  border-radius: 8px;
  padding: 25px;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 212, 255, 0.1);
}

.control-panel:last-child {
  grid-column: 1 / -1;
}

label {
  display: block;
  margin-bottom: 8px;
  color: #00d4ff;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.9em;
  letter-spacing: 1px;
}

input[type="text"],
input[type="number"],
select {
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid #00d4ff;
  border-radius: 4px;
  color: #e0e0e0;
  font-size: 1em;
  transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus {
  outline: none;
  background: rgba(0, 212, 255, 0.1);
  border-color: #00ffff;
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.2);
}

input[type="range"] {
  width: 100%;
  height: 6px;
  margin: 10px 0;
  cursor: pointer;
  accent-color: #00d4ff;
}

/* Button Styles */
.btn {
  padding: 12px 24px;
  border: 1px solid #00d4ff;
  border-radius: 4px;
  background: rgba(0, 212, 255, 0.1);
  color: #00d4ff;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95em;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-right: 10px;
  margin-bottom: 10px;
}

.btn:hover {
  background: rgba(0, 212, 255, 0.2);
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: #00d4ff;
  color: #1a1a2e;
  border-color: #00d4ff;
  font-weight: 700;
}

.btn-primary:hover {
  background: #00ffff;
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.4);
}

.btn-signal {
  padding: 10px 20px;
  font-size: 0.9em;
  margin-top: 5px;
  width: 100%;
}

/* Showtape Selector */
.tape-selector {
  margin-bottom: 20px;
}

.tape-selector select {
  margin-bottom: 0;
}

/* Player Controls */
.player-controls {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.player-controls .btn {
  flex: 1;
  min-width: 100px;
  margin-right: 5px;
  margin-bottom: 5px;
}

/* Playback Info */
.playback-info {
  margin-bottom: 20px;
  padding: 15px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

.progress-container {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.progress-container input {
  flex: 1;
  margin: 0;
  min-width: 200px;
}

#time-display {
  color: #00d4ff;
  font-weight: 600;
  min-width: 120px;
  text-align: right;
  font-family: "Courier New", monospace;
}

/* Playback Controls */
.playback-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 20px;
}

.playback-controls label {
  margin-bottom: 5px;
}

.playback-controls select,
.playback-controls input {
  margin: -8px 0 15px 0;
}

#volume-display {
  color: #00d4ff;
  font-weight: 600;
  text-align: right;
}

.tape-info {
  padding: 15px;
  background: rgba(0, 212, 255, 0.05);
  border-left: 3px solid #00d4ff;
  border-radius: 4px;
  margin-top: 20px;
}

.tape-info p {
  margin: 0;
  color: #d0d0d0;
  line-height: 1.5;
}

.tape-info p:first-child {
  margin-bottom: 10px;
}

.bmc-info {
  margin-top: 10px !important;
  font-size: 0.9em;
  color: #a0d0d0;
  font-style: italic;
}

/* Song Sync Panel */
.song-sync-panel {
  margin-top: 16px;
  padding: 12px 15px;
  background: rgba(0, 255, 128, 0.04);
  border: 1px solid rgba(0, 255, 128, 0.2);
  border-radius: 6px;
}

.song-sync-panel h3 {
  margin: 0 0 6px 0;
  font-size: 0.95em;
  color: #0f8;
  letter-spacing: 0.05em;
}

.song-sync-info {
  margin: 0 0 10px 0;
  font-size: 0.82em;
  color: #a0d0d0;
  line-height: 1.4;
}

.song-sync-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-file {
  cursor: pointer;
  padding: 5px 12px;
  background: rgba(0, 255, 128, 0.12);
  border: 1px solid rgba(0, 255, 128, 0.4);
  border-radius: 4px;
  color: #0f8;
  font-size: 0.85em;
  user-select: none;
  transition: background 0.2s;
}

.btn-file:hover {
  background: rgba(0, 255, 128, 0.22);
}

.song-status {
  font-family: "Courier New", monospace;
  font-size: 0.82em;
  color: #0f8;
  opacity: 0.85;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 340px;
}

/* Channel Grid */
.channel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .channel-grid {
    grid-template-columns: 1fr;
  }
}

.channel-control {
  padding: 15px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 4px;
}

.channel-control label {
  margin-bottom: 10px;
  color: #00d4ff;
  font-weight: 600;
}

.channel-control select {
  width: 100%;
  margin-bottom: 10px;
}

.channel-control .btn-signal {
  margin: 0;
  padding: 10px;
  font-size: 0.85em;
}

/* Signal Duration */
.signal-length {
  margin-bottom: 20px;
  padding: 15px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

.signal-length label {
  margin-bottom: 8px;
}

.signal-length input {
  margin-bottom: 0;
  max-width: 200px;
}

/* Signal Monitor */
.signal-monitor {
  background: rgba(0, 0, 0, 0.4);
  border-left: 3px solid #4dff4d;
  border-radius: 4px;
  padding: 15px;
  font-family: "Courier New", monospace;
  font-size: 0.9em;
  max-height: 300px;
  overflow-y: auto;
}

.signal-monitor p {
  color: #4dff4d;
  margin-bottom: 8px;
  text-shadow: 0 0 5px rgba(77, 255, 77, 0.2);
}

.signal-monitor p:last-child {
  margin-bottom: 0;
}

/* Band Monitors Grid */
.band-monitors {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
  margin-top: 20px;
}

.character-monitor {
  background: rgba(0, 20, 40, 0.6);
  border: 1px solid #00d4ff;
  border-radius: 6px;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 212, 255, 0.1);
  transition: all 0.3s ease;
}

.character-monitor:hover {
  border-color: #00ffff;
  box-shadow: 0 6px 20px rgba(0, 212, 255, 0.2);
  transform: translateY(-2px);
}

.character-header {
  background: linear-gradient(
    135deg,
    rgba(0, 212, 255, 0.2) 0%,
    rgba(0, 212, 255, 0.05) 100%
  );
  border-bottom: 2px solid #00d4ff;
  padding: 12px;
  font-weight: 700;
  color: #00ffff;
  text-shadow: 0 0 8px rgba(0, 255, 255, 0.3);
  letter-spacing: 1px;
  text-align: center;
}

.character-signal {
  background: rgba(0, 0, 0, 0.3);
  padding: 15px;
  font-family: "Courier New", monospace;
  font-size: 0.85em;
  color: #4dff4d;
  min-height: 80px;
  max-height: 200px;
  overflow-y: auto;
  line-height: 1.4;
}

.character-signal p {
  margin: 0 0 8px 0;
  word-break: break-word;
  color: #4dff4d;
  text-shadow: 0 0 5px rgba(77, 255, 77, 0.1);
}

.character-signal p:last-child {
  margin-bottom: 0;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar-thumb {
  background: #00d4ff;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #00ffff;
}

/* Animations */
@keyframes pulse-glow {
  0%,
  100% {
    text-shadow: 0 0 5px rgba(0, 212, 255, 0.3);
  }
  50% {
    text-shadow: 0 0 15px rgba(0, 212, 255, 0.6);
  }
}

h1 {
  animation: pulse-glow 3s ease-in-out infinite;
}

/* Print Styles */
@media print {
  body {
    background: white;
  }

  .control-panel {
    border: 1px solid #000;
    background: white;
    color: black;
  }

  h1,
  h2,
  label {
    color: black;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  h1 {
    font-size: 1.8em;
  }

  .container {
    padding: 10px;
  }

  .control-panel {
    padding: 15px;
  }

  .player-controls {
    flex-direction: column;
  }

  .player-controls .btn {
    width: 100%;
    margin-right: 0;
  }
}

/* ─── Custom Show Builder Panel ─────────────────────────────────────────── */

.custom-builder-panel {
  border-color: rgba(180, 100, 255, 0.4);
}

.custom-builder-panel h2 {
  color: #c884ff;
  text-shadow: 0 0 12px rgba(200, 132, 255, 0.35);
}

.builder-info {
  color: #a0a8c0;
  font-size: 0.88em;
  margin: 0 0 18px 0;
  line-height: 1.5;
}

.builder-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.builder-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.builder-row label {
  color: #c884ff;
  font-size: 0.9em;
  white-space: nowrap;
  min-width: 80px;
}

.builder-input {
  flex: 1;
  min-width: 180px;
  padding: 6px 10px;
  background: rgba(180, 100, 255, 0.07);
  border: 1px solid rgba(180, 100, 255, 0.35);
  border-radius: 4px;
  color: #e0e0f0;
  font-size: 0.9em;
}

.builder-input:focus {
  outline: none;
  border-color: rgba(180, 100, 255, 0.7);
  background: rgba(180, 100, 255, 0.12);
}

.builder-select {
  flex: 1;
  min-width: 200px;
  background: rgba(180, 100, 255, 0.07);
  border: 1px solid rgba(180, 100, 255, 0.35);
  border-radius: 4px;
  color: #e0e0f0;
  padding: 6px 10px;
  font-size: 0.9em;
}

.builder-row-action {
  margin-top: 4px;
}

.generate-status {
  font-family: "Courier New", monospace;
  font-size: 0.82em;
  color: #a0a8c0;
  flex: 1;
  min-width: 0;
}

.file-name-display {
  font-family: "Courier New", monospace;
  font-size: 0.82em;
  color: #c884ff;
  opacity: 0.8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 320px;
}

/* Saved Shows List */
.saved-shows-header h3 {
  font-size: 1em;
  color: #c884ff;
  margin: 0 0 10px 0;
  padding-top: 8px;
  border-top: 1px solid rgba(180, 100, 255, 0.2);
}

.custom-show-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.custom-show-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(180, 100, 255, 0.06);
  border: 1px solid rgba(180, 100, 255, 0.2);
  border-radius: 6px;
  flex-wrap: wrap;
}

.custom-show-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.custom-show-title {
  font-weight: 600;
  color: #e0d0ff;
  font-size: 0.95em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 340px;
}

.custom-show-meta {
  font-size: 0.78em;
  color: #8090b0;
  font-family: "Courier New", monospace;
}

.custom-show-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

/* Show Editor Launch Panel */
.show-editor-link-panel {
  margin-top: 28px;
  padding: 18px 20px;
  background: rgba(100, 0, 255, 0.05);
  border: 1px solid rgba(130, 60, 255, 0.2);
  border-radius: 8px;
}

.show-editor-link-panel h3 {
  font-size: 1em;
  color: #a080ff;
  margin: 0 0 10px;
  letter-spacing: 1px;
}

.btn-editor-launch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-size: 0.9em;
  background: rgba(130, 60, 255, 0.12);
  border-color: rgba(130, 60, 255, 0.4);
  color: #c0a0ff;
  text-decoration: none;
}

.btn-editor-launch:hover {
  background: rgba(130, 60, 255, 0.25);
  border-color: rgba(130, 60, 255, 0.7);
  color: #d8c0ff;
}

/* Show Import Panel */
.show-import-panel {
  margin-top: 28px;
  padding: 18px 20px;
  background: rgba(0, 212, 100, 0.04);
  border: 1px solid rgba(0, 212, 100, 0.2);
  border-radius: 8px;
}

.show-import-panel h3 {
  font-size: 1em;
  color: #00d464;
  margin: 0 0 10px;
  letter-spacing: 1px;
}

.show-import-panel code {
  font-family: "Courier New", monospace;
  background: rgba(255, 255, 255, 0.07);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 0.88em;
  color: #aef;
}

.btn-sm {
  padding: 4px 10px;
  font-size: 0.8em;
}

.btn-danger {
  background: rgba(255, 60, 60, 0.12);
  border-color: rgba(255, 60, 60, 0.4);
  color: #ff8080;
}

.btn-danger:hover {
  background: rgba(255, 60, 60, 0.25);
  border-color: rgba(255, 60, 60, 0.7);
}

.btn-export {
  background: rgba(0, 200, 255, 0.08);
  border-color: rgba(0, 200, 255, 0.35);
  color: #60dfff;
}

.btn-export:hover {
  background: rgba(0, 200, 255, 0.2);
  border-color: rgba(0, 200, 255, 0.65);
}

/* =========================================================
   v2 — Dual 96-Bit TDM Frame Monitors
   ========================================================= */

.dual-grid-container {
  display: flex;
  flex-direction: column;
  gap: 25px;
  width: 100%;
}

.track-monitor {
  background: rgba(0, 0, 0, 0.4);
  padding: 15px;
  border-radius: 8px;
  border-left: 4px solid #00d4ff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.track-monitor h4 {
  color: #00d4ff;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.85em;
  opacity: 0.8;
  border-bottom: 1px solid rgba(0, 212, 255, 0.15);
  padding-bottom: 6px;
}

.led-grid-v2 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 6px;
}

.led-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  background: rgba(255, 255, 255, 0.035);
  padding: 6px 12px;
  border-radius: 4px;
  border: 1px solid rgba(0, 212, 255, 0.08);
}

.led-label {
  flex: 0 0 65px;
  font-size: 0.72em;
  color: #88a;
  font-family: "Courier New", monospace;
  text-align: left;
}

.led-bits {
  display: flex;
  gap: 4px;
  margin: 0 12px;
}

.led {
  width: 11px;
  height: 11px;
  background: #111;
  border-radius: 2px;
  border: 1px solid #222;
  box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.6);
  transition: all 0.08s ease;
}

.led-on {
  background: #00ffd4;
  border-color: #00ffcc;
  box-shadow:
    0 0 8px #00ffd4,
    0 0 14px rgba(0, 255, 212, 0.45);
}

/* =========================================================
   Stage View Modal & Animatronics
   ========================================================= */

.modal {
  display: none;
  position: fixed;
  z-index: 20000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 5, 10, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow-y: auto;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.modal.active {
  display: block;
  opacity: 1;
}

.stage-modal-content {
  background: linear-gradient(180deg, #0a0a1a 0%, #1a1a2e 100%);
  margin: 5vh auto;
  padding: 30px;
  width: 95%;
  max-width: 1400px;
  border-radius: 12px;
  border: 1px solid #00d4ff;
  box-shadow: 0 0 50px rgba(0, 212, 255, 0.2);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(0, 212, 255, 0.3);
  padding-bottom: 15px;
}

.close-btn {
  background: none;
  border: none;
  color: #88a;
  font-size: 32px;
  cursor: pointer;
}

.close-btn:hover {
  color: #fff;
}

.stage-info {
  margin-bottom: 20px;
  color: #88a;
  font-size: 0.9em;
}

.stage-arena {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 16px;
  background: rgba(0, 0, 0, 0.4);
  padding: 30px 20px;
  border-radius: 8px;
  border: 1px dashed rgba(0, 212, 255, 0.2);
}

/* ── Character card ── */
.stage-character {
  width: 200px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.stage-character:hover {
  border-color: rgba(0, 212, 255, 0.5);
}

.stage-char-header {
  background: rgba(0, 212, 255, 0.07);
  padding: 10px 12px;
  border-bottom: 1px solid rgba(0, 212, 255, 0.15);
}

.stage-char-header h3 {
  font-size: 0.78em;
  color: #00d4ff;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Movement indicator list ── */
.character-body-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 8px;
}

.stage-part {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.68em;
  color: #556;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition:
    background 0.05s ease,
    color 0.05s ease,
    border-color 0.05s ease;
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stage-part::before {
  content: "";
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #222;
  border: 1px solid #333;
  transition:
    background 0.05s ease,
    box-shadow 0.05s ease;
}

.stage-part.active {
  background: rgba(0, 255, 180, 0.1);
  border-color: rgba(0, 255, 180, 0.4);
  color: #00ffcc;
}

.stage-part.active::before {
  background: #00ffcc;
  box-shadow: 0 0 6px #00ffcc;
}

.btn-stage {
  margin-left: 20px;
}

.led-hex {
  flex: 0 0 42px;
  font-family: "Courier New", monospace;
  font-size: 0.82em;
  color: #444;
  text-align: right;
  min-width: unset;
}

/* Character Reveal Animations */
.stage-character.reveal-enter {
  opacity: 0;
  transform: translateY(20px);
  animation: charReveal 0.6s forwards ease-out;
}

@keyframes charReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* (schematic absolute positioning removed — stage now uses indicator pills) */

/* Sync Indicator */
.panel-header-sync {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.sync-indicator-group {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.4);
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid rgba(0, 212, 255, 0.2);
}

.sync-label {
  font-family: var(--font-mono);
  font-size: 0.75em;
  color: #00d4ff;
  letter-spacing: 1px;
}

.sync-led {
  width: 10px;
  height: 10px;
  background: #333;
  border-radius: 50%;
  box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.5);
  transition:
    background 0.05s ease,
    box-shadow 0.05s ease;
}

.sync-led.active {
  background: #ff0055;
  box-shadow:
    0 0 10px #ff0055,
    0 0 20px rgba(255, 0, 85, 0.4);
}

/* ── Signal Tester ─────────────────────────────────────────────────────── */

/* ── Signal Tester: source selector ───────────────────────────────────────── */
.st-source-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 8px 0 12px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.st-source-label {
  font-size: 0.85rem;
  color: #aaa;
  white-space: nowrap;
}
.st-source-option {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.9rem;
  cursor: pointer;
  color: #ddd;
}
.st-source-option input[type="radio"] {
  accent-color: #0af;
}
.st-source-hint {
  font-size: 0.78rem;
  color: #888;
  font-style: italic;
  margin-left: auto;
}

.st-band-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 12px 14px;
  background: rgba(0, 212, 255, 0.05);
  border: 1px solid rgba(0, 212, 255, 0.25);
  border-radius: 6px;
}

.st-band-label {
  display: inline;
  margin-bottom: 0;
  color: #00d4ff;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.85em;
  letter-spacing: 1px;
  white-space: nowrap;
}

.st-band-select {
  width: auto;
  min-width: 220px;
  padding: 8px 12px;
  margin-bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid #00d4ff;
  border-radius: 4px;
  color: #e0e0e0;
  font-size: 0.95em;
  cursor: pointer;
}

.st-band-select:focus {
  outline: none;
  border-color: #00ffff;
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.25);
}

.st-band-hint {
  font-size: 0.8em;
  color: #607888;
  font-style: italic;
}

.st-file-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.st-format-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.78em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin: 4px 0 14px 0;
}

.badge-2ch {
  background: rgba(0, 200, 120, 0.12);
  border: 1px solid #00c878;
  color: #00c878;
}

.badge-4ch {
  background: rgba(180, 100, 255, 0.12);
  border: 1px solid #b464ff;
  color: #b464ff;
}

.st-controls {
  margin-top: 4px;
}

.st-status {
  margin-top: 14px;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.25);
  border-left: 3px solid #00d4ff;
  border-radius: 0 4px 4px 0;
  font-family: "Courier New", monospace;
  font-size: 0.88em;
  color: #a0c0cc;
  word-break: break-word;
}

.st-time {
  color: #00d4ff;
  font-weight: 600;
  min-width: 130px;
  text-align: right;
  font-family: "Courier New", monospace;
  white-space: nowrap;
}
