:root {
  --bg: #05070a;
  --panel: rgba(22, 27, 34, 0.7);
  --panel-border: rgba(255, 255, 255, 0.1);
  --text: #e6edf3;
  --text-muted: #8b949e;

  /* Neon Theme Colors */
  --primary: #00f2ff;
  /* Cyan Neon */
  --primary-glow: rgba(0, 242, 255, 0.4);
  --accent: #7000ff;
  /* Purple Neon */
  --success: #00ff9d;
  /* Green Neon */
  --warning: #ffb700;
  /* Amber Neon */
  --danger: #ff0055;
  /* Red Neon */

  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --glass: blur(20px) saturate(180%);

}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-main);
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
}

/* --- Utility --- */
.btn,
.btn-sm,
.btn-icon {
  border: 1px solid var(--panel-border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-main);
  font-size: 0.9rem;
}

.btn:hover,
.btn-sm:hover,
.btn-icon:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--text);
}

.btn.primary {
  background: var(--primary);
  color: #000;
  border-color: var(--primary);
  font-weight: 700;
  box-shadow: 0 0 15px var(--primary-glow);
}

.btn.primary:hover {
  background: #fff;
  box-shadow: 0 0 25px var(--primary-glow);
}

.action-card {
  appearance: none;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--panel-border);
  backdrop-filter: var(--glass);
  padding: 30px;
  border-radius: 20px;
  width: 280px;
  text-align: left;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  display: flex;
  flex-direction: column;
  gap: 15px;
  position: relative;
  overflow: hidden;
  color: var(--text);
  font-family: var(--font-main);
}

.action-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  opacity: 0;
  transition: opacity 0.3s;
}

.action-card:hover {
  transform: translateY(-10px);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.action-card:hover::before {
  opacity: 1;
}

.action-card .icon {
  font-size: 3rem;
}

.action-card h3 {
  margin: 0;
  font-size: 1.5rem;
}

.action-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* --- Wizard Overlay --- */
.wizard-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  z-index: 2500;
  display: none;
  place-items: center;
}

.wizard-overlay.active {
  display: grid;
}

.wizard-container {
  width: 90%;
  max-width: 600px;
  background: #0f1217;
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 50px 100px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  max-height: 85vh;
}

.wizard-header {
  padding: 20px;
  border-bottom: 1px solid var(--panel-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
}

.wizard-header h2 {
  margin: 0;
  font-size: 1.2rem;
}

.wizard-steps {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.step {
  display: none;
  animation: fade-in 0.3s ease;
}

.step.active {
  display: block;
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

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

.step h3 {
  margin-top: 0;
  color: var(--primary);
}

.filters {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.filters select,
.filters input,
.form-group select {
  width: 100%;
  padding: 12px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--panel-border);
  color: var(--text);
  border-radius: 8px;
  font-size: 1rem;
  outline: none;
}

.filters select:focus,
.filters input:focus,
.form-group select:focus {
  border-color: var(--primary);
}

.route-list.compact {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
}

.route-item {
  padding: 12px;
  border-bottom: 1px solid var(--panel-border);
  cursor: pointer;
  transition: background 0.2s;
}

.route-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.route-item.selected {
  background: rgba(0, 242, 255, 0.1);
  border-left: 3px solid var(--primary);
}

.step-actions {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--panel-border);
  padding-top: 20px;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.info-box {
  background: rgba(255, 255, 255, 0.05);
  padding: 15px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* --- Main App --- */
.app-main {
  height: 100vh;
  display: flex;
  flex-direction: column;
  opacity: 0;
  /* Hidden initially until started */
  transition: opacity 0.5s ease;
}

.app-main.visible {
  opacity: 1;
}

.app-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  /* Let clicks pass through to video if needed */
}

.app-header>* {
  pointer-events: auto;
}

.settings-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(420px, 92vw);
  background: rgba(12,15,20,0.88);
  border-left: 1px solid var(--panel-border);
  backdrop-filter: blur(16px) saturate(160%);
  box-shadow: -24px 0 80px rgba(0,0,0,0.55);
  transform: translateX(100%);
  transition: transform 0.35s ease;
  z-index: 3000;
}
.settings-panel.open { transform: translateX(0); }
.settings-header { display:flex; align-items:center; justify-content:space-between; padding:16px 18px; border-bottom:1px solid var(--panel-border); }
.settings-header .title { font-weight:700; }
.settings-tabs { display:flex; gap:8px; padding:12px 18px; border-bottom:1px solid var(--panel-border); }
.settings-tabs .tab-btn { padding:8px 12px; border:1px solid var(--panel-border); background:rgba(255,255,255,0.04); color:var(--text); border-radius:8px; cursor:pointer; }
.settings-tabs .tab-btn.active { background: rgba(0,242,255,0.15); border-color: var(--primary); }
.settings-body { padding: 14px 18px; height: calc(100% - 120px); overflow:auto; }
.settings-body .tab { display:none; }
.settings-body .tab.active { display:block; }

.player-section {
  flex: 1;
  position: relative;
  background: #000;
}

.player-container {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.media {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dashboard-widget {
  position: absolute;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  width: min(680px, 92vw);
  pointer-events: none;
}

.dashboard-widget .gauge-container {
  position: relative;
  width: 100%;
  height: 180px;
  margin: 0 auto;
}

.placeholder {
  position: absolute;
  inset: 0;
  /* Half circle */
  margin-bottom: 10px;
}

.gauge-svg {
  width: 100%;
  height: 180px;
  overflow: visible;
}

.gauge-progress {
  transition: stroke 0.5s ease;
  stroke-linecap: round;
}

.gauge-needle {
  
}

.dashboard-center {
  position: absolute;
  top: 52%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.action-text {
  font-size: 1.2rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 0 0 10px currentColor;
  margin-bottom: 4px;
}

.timer-text {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
}

.dashboard-labels {
  position: absolute;
  bottom: -20px;
  width: 100%;
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  padding: 0 10px;
}

.dashboard-info {
  margin-top: 15px;
  font-size: 0.8rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 12px;
  border-radius: 12px;
}

/* State Colors */
.state-inhale .gauge-progress {
  stroke: var(--success);
}

.state-inhale .action-text {
  color: var(--success);
}

.state-retain .gauge-progress {
  stroke: var(--warning);
}

.state-retain .action-text {
  color: var(--warning);
}

.state-exhale .gauge-progress {
  stroke: var(--primary);
}

.state-exhale .action-text {
  color: var(--primary);
}

.state-sustain .gauge-progress {
  stroke: var(--accent);
}

.state-sustain .action-text {
  color: var(--accent);
}

/* --- Responsive --- */
@media (max-width: 600px) {
  .brand-large {
    font-size: 2.5rem;
  }

  .landing-actions {
    flex-direction: column;
    align-items: center;
  }

  .action-card {
    width: 100%;
    max-width: 320px;
  }

  .dashboard-widget {
    width: 90%;
    bottom: 20px;
  }
}
.landing {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 2000;
}

.landing-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(1200px 800px at 20% 20%, rgba(112,0,255,0.25), transparent 60%),
              radial-gradient(800px 600px at 80% 30%, rgba(0,242,255,0.25), transparent 60%),
              linear-gradient(160deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
  filter: saturate(120%);
}

.landing-content {
  position: relative;
  width: min(1040px, 92vw);
  text-align: center;
  padding: 40px 24px;
  border-radius: 24px;
  backdrop-filter: blur(24px) saturate(160%);
  background: rgba(12, 15, 20, 0.35);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 40px 120px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.06);
}

.brand-large {
  font-size: clamp(40px, 7vw, 96px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 8px 0;
  background: linear-gradient(90deg, #fff, #cfe8ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-large .highlight {
  background: linear-gradient(90deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tagline {
  margin: 0 0 28px 0;
  color: var(--text-muted);
  font-size: clamp(16px, 2.2vw, 24px);
  letter-spacing: 0.02em;
}

.landing-actions {
  display: flex;
  gap: 20px;
  justify-content: center;
}

.action-card {
  width: 360px;
  min-height: 140px;
  border-radius: 20px;
  padding: 24px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
}

.action-card .icon {
  font-size: 2.4rem;
}

.action-card h3 {
  font-size: 1.4rem;
}

.action-card:hover {
  transform: translateY(-6px);
  background: rgba(255,255,255,0.1);
  box-shadow: 0 36px 80px rgba(0,0,0,0.55);
}

@media (max-width: 720px) {
  .landing-actions { flex-direction: column; }
  .action-card { width: 100%; }
}
.btn-icon {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 1.1rem;
}