/* 
 * style.css - PomoShield AI Design System
 * Cyber-Zen Antigravity Focus & Emergency Hazard Alert
 */

:root {
  --bg-deep: #06080f;
  --bg-surface: rgba(14, 20, 36, 0.72);
  --bg-surface-elevated: rgba(22, 32, 58, 0.85);
  --border-subtle: rgba(255, 255, 255, 0.09);
  --border-glow: rgba(0, 245, 212, 0.35);

  --accent-cyan: #00f5d4;
  --accent-cyan-glow: rgba(0, 245, 212, 0.5);
  --accent-blue: #00b4d8;
  --accent-purple: #7928ca;
  --accent-purple-glow: rgba(121, 40, 202, 0.5);
  --accent-emerald: #10b981;

  --alarm-red: #ff0055;
  --alarm-red-glow: rgba(255, 0, 85, 0.65);
  --alarm-orange: #ff9f1c;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --font-main: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Space Mono', monospace;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 8px;
  --transition-fast: 0.18s ease;
  --transition-smooth: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-main);
  background: var(--bg-deep);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  user-select: none;
}

/* Background Canvas */
#physics-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: auto; /* allows mouse interaction with physics */
}

/* Ambient Cyber Mesh Gradient Overlay */
.mesh-gradient-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(circle at 15% 20%, rgba(121, 40, 202, 0.16) 0%, transparent 45%),
              radial-gradient(circle at 85% 75%, rgba(0, 245, 212, 0.12) 0%, transparent 45%),
              radial-gradient(circle at 50% 50%, rgba(6, 8, 15, 0.4) 0%, rgba(6, 8, 15, 0.85) 100%);
  transition: opacity 0.3s ease;
}

/* Hazard Alarm Overlay */
.hazard-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
  box-shadow: inset 0 0 120px rgba(255, 0, 85, 0.7);
  background: radial-gradient(circle, transparent 40%, rgba(255, 0, 85, 0.28) 100%);
}

/* Alarm State Animations */
body.alarm-active .hazard-overlay {
  opacity: 1;
  animation: pulseHazard 0.8s infinite alternate ease-in-out;
}

@keyframes pulseHazard {
  0% {
    box-shadow: inset 0 0 70px rgba(255, 0, 85, 0.4);
    background: radial-gradient(circle, transparent 50%, rgba(255, 0, 85, 0.2) 100%);
  }
  100% {
    box-shadow: inset 0 0 150px rgba(255, 0, 85, 0.95);
    background: radial-gradient(circle, transparent 30%, rgba(255, 0, 85, 0.4) 100%);
  }
}

body.alarm-active {
  background-color: #17040a;
}

/* Screen Shake Effect */
.screen-shake {
  animation: screenShake 0.4s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes screenShake {
  10%, 90% { transform: translate3d(-3px, 2px, 0); }
  20%, 80% { transform: translate3d(4px, -3px, 0); }
  30%, 50%, 70% { transform: translate3d(-5px, 4px, 0); }
  40%, 60% { transform: translate3d(5px, -4px, 0); }
}

/* App Layout Container */
.app-container {
  position: relative;
  z-index: 5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 1.25rem 2rem 2rem 2rem;
  max-width: 1440px;
  margin: 0 auto;
}

/* Top Navigation Bar */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.5rem;
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  margin-bottom: 1.5rem;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 0 20px var(--accent-cyan-glow);
  position: relative;
}

.brand-titles h1 {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, #ffffff, #d8e2fd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-tagline {
  font-size: 0.76rem;
  color: var(--accent-cyan);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Status Chips */
.gravity-status-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: rgba(0, 245, 212, 0.1);
  border: 1px solid rgba(0, 245, 212, 0.3);
  color: var(--accent-cyan);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: all 0.3s ease;
}

body.alarm-active .gravity-status-badge {
  background: rgba(255, 0, 85, 0.2);
  border-color: var(--alarm-red);
  color: var(--alarm-red);
  box-shadow: 0 0 16px var(--alarm-red-glow);
  animation: pulseGlow 1s infinite alternate;
}

@keyframes pulseGlow {
  0% { transform: scale(0.98); }
  100% { transform: scale(1.02); }
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 10px var(--accent-cyan);
}

body.alarm-active .status-dot {
  background: var(--alarm-red);
  box-shadow: 0 0 12px var(--alarm-red);
}

/* Buttons */
.btn-icon {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
  font-size: 1.1rem;
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.btn-icon.active {
  background: rgba(0, 245, 212, 0.2);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

/* Main Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.95fr;
  gap: 1.5rem;
  flex: 1;
}

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

/* Glass Card */
.glass-card {
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

body.alarm-active .glass-card {
  border-color: rgba(255, 0, 85, 0.4);
}

/* Pomodoro Core Section */
.pomodoro-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  position: relative;
}

/* Mode Tabs */
.mode-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 4px;
  gap: 4px;
  margin-bottom: 1.5rem;
  width: 100%;
  max-width: 440px;
}

.mode-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-main);
  font-size: 0.86rem;
  font-weight: 600;
  padding: 0.6rem 0.8rem;
  border-radius: 999px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.mode-tab:hover {
  color: var(--text-main);
}

.mode-tab.active {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  color: #040914;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(0, 245, 212, 0.35);
}

.mode-tab.break-active {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.35);
}

/* Circular Timer Dial */
.timer-dial-wrapper {
  position: relative;
  width: 310px;
  height: 310px;
  margin: 0.5rem 0 1.5rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.progress-ring {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.progress-ring-bg {
  stroke: rgba(255, 255, 255, 0.06);
}

.progress-ring-circle {
  stroke: var(--accent-cyan);
  stroke-linecap: round;
  transition: stroke-dashoffset 0.35s ease, stroke 0.3s ease;
  filter: drop-shadow(0 0 10px var(--accent-cyan-glow));
}

body.alarm-active .progress-ring-circle {
  stroke: var(--alarm-red);
  filter: drop-shadow(0 0 14px var(--alarm-red-glow));
}

.timer-inner-content {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.timer-digits {
  font-family: var(--font-mono);
  font-size: 4.4rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  text-shadow: 0 0 25px rgba(0, 245, 212, 0.5);
  color: #ffffff;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

body.alarm-active .timer-digits {
  color: #ffccd5;
  text-shadow: 0 0 35px var(--alarm-red-glow);
}

.session-indicator {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-cyan);
  margin-top: 0.6rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.session-dots {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}

.dot.completed {
  background: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan);
}

/* Quick Time Adjustment Presets */
.quick-time-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  background: rgba(0, 0, 0, 0.25);
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.quick-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
}

.quick-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.2);
}

.quick-btn.active {
  background: rgba(0, 245, 212, 0.15);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

/* Timer Action Buttons */
.timer-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  max-width: 440px;
}

.btn-primary {
  flex: 1;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  border: none;
  color: #040914;
  font-family: var(--font-main);
  font-size: 1.05rem;
  font-weight: 700;
  padding: 0.95rem 1.5rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 8px 25px rgba(0, 245, 212, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 245, 212, 0.5);
  filter: brightness(1.05);
}

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

.btn-primary.pause-state {
  background: linear-gradient(135deg, #ff9f1c, #f77f00);
  box-shadow: 0 8px 25px rgba(255, 159, 28, 0.35);
  color: #ffffff;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.95rem 1.25rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Right Column: AI Vision Camera & Real-Time Monitor */
.right-column {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.camera-card {
  display: flex;
  flex-direction: column;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.card-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
}

.live-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #ff0055;
  background: rgba(255, 0, 85, 0.12);
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 0, 85, 0.3);
}

.pulse-red {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ff0055;
  animation: liveBlink 1.2s infinite ease-in-out;
}

@keyframes liveBlink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(0.8); }
}

/* Camera Viewport */
.webcam-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #020408;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.webcam-viewport canvas,
.webcam-viewport video {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
}

/* Camera HUD Overlay */
.camera-hud-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  box-shadow: inset 0 0 25px rgba(0, 0, 0, 0.7);
}

/* Corner Reticles */
.camera-hud-overlay::before,
.camera-hud-overlay::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 24px;
  border-color: var(--accent-cyan);
  pointer-events: none;
}
.camera-hud-overlay::before {
  top: 12px;
  left: 12px;
  border-top: 2px solid;
  border-left: 2px solid;
}
.camera-hud-overlay::after {
  bottom: 12px;
  right: 12px;
  border-bottom: 2px solid;
  border-right: 2px solid;
}

/* Camera Center Targeting Box */
.hud-target-box {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60%;
  height: 60%;
  border: 1px dashed rgba(0, 245, 212, 0.4);
  border-radius: var(--radius-sm);
  transition: all 0.3s ease;
}

body.alarm-active .hud-target-box {
  border-color: var(--alarm-red);
  box-shadow: 0 0 15px rgba(255, 0, 85, 0.4);
  animation: targetAlert 0.5s infinite alternate;
}

@keyframes targetAlert {
  0% { transform: translate(-50%, -50%) scale(1); }
  100% { transform: translate(-50%, -50%) scale(1.04); }
}

/* Scanline Effect */
.camera-scanline {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
  opacity: 0.6;
  animation: scanline 2.5s infinite linear;
}

@keyframes scanline {
  0% { top: 0%; }
  100% { top: 100%; }
}

/* Camera Placeholder State */
.camera-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
}

.camera-empty-state span {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

/* AI Detection Confidence Bars */
.confidence-metrics {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.metric-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.metric-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 600;
}

.metric-name {
  color: var(--text-muted);
}

.metric-val {
  font-family: var(--font-mono);
  font-weight: 700;
}

.metric-track {
  height: 10px;
  background: rgba(0, 0, 0, 0.45);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border-subtle);
}

.metric-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  transition: width 0.15s ease, background-color 0.25s ease;
}

.metric-fill.safe {
  background: linear-gradient(90deg, #10b981, #00f5d4);
  box-shadow: 0 0 8px rgba(0, 245, 212, 0.4);
}

.metric-fill.danger {
  background: linear-gradient(90deg, #ff9f1c, #ff0055);
  box-shadow: 0 0 12px var(--alarm-red-glow);
}

.threshold-marker {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #ffffff;
  z-index: 2;
  box-shadow: 0 0 6px #ffffff;
}

/* Bottom Status Banner */
.status-banner-card {
  margin-top: 1.5rem;
  padding: 1.1rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(20px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.status-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.status-icon-ring {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(0, 245, 212, 0.12);
  border: 1px solid rgba(0, 245, 212, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: all 0.3s ease;
}

.status-text-content h3 {
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.15rem;
}

.status-text-content p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Safe State in Banner */
.banner-safe .status-icon-ring {
  background: rgba(16, 185, 129, 0.15);
  border-color: #10b981;
  color: #10b981;
}

/* Alarm State in Banner */
body.alarm-active .status-banner-card {
  background: rgba(77, 0, 25, 0.88);
  border-color: var(--alarm-red);
  box-shadow: 0 0 40px var(--alarm-red-glow);
}

body.alarm-active .status-icon-ring {
  background: rgba(255, 0, 85, 0.3);
  border-color: var(--alarm-red);
  color: #ffffff;
  animation: sirenSpin 1s infinite alternate;
}

@keyframes sirenSpin {
  0% { transform: scale(0.95); }
  100% { transform: scale(1.1); }
}

/* Settings Modal & Drawer */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  padding: 1.5rem;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background: #0f1629;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
  padding: 2rem;
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
  transform: translateY(20px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.open .modal-box {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.modal-header h2 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}

.form-help {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
}

.input-stepper {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.input-number {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  width: 100px;
  text-align: center;
}

.input-number:focus {
  outline: none;
  border-color: var(--accent-cyan);
}

.input-range {
  width: 100%;
  accent-color: var(--accent-cyan);
  cursor: pointer;
}

.toggle-switch-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.toggle-label {
  font-size: 0.88rem;
  font-weight: 600;
}

/* Custom Checkbox Toggle */
.switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.15);
  transition: .3s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--accent-cyan);
}

input:checked + .slider:before {
  transform: translateX(22px);
  background-color: #06080f;
}

/* Simulator Bar */
.simulator-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(121, 40, 202, 0.12);
  border: 1px solid rgba(121, 40, 202, 0.35);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  margin-top: 1rem;
}

.sim-buttons {
  display: flex;
  gap: 0.5rem;
}

.btn-sim {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-sim-danger {
  background: var(--alarm-red);
  color: #ffffff;
}

.btn-sim-safe {
  background: var(--accent-cyan);
  color: #040914;
}

.btn-sim:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .app-container {
    padding: 1rem;
  }
  .navbar {
    padding: 0.75rem 1rem;
  }
  .brand-titles h1 {
    font-size: 1.05rem;
  }
  .timer-dial-wrapper {
    width: 260px;
    height: 260px;
  }
  .timer-digits {
    font-size: 3.4rem;
  }
}
