/* ENTRAINIUM - MOBILE-OPTIMIZED PREMIUM DARK THEME */

:root {
  --bg: #0b0f14;
  --panel: #121821;
  --panel-hover: #1a2332;
  --muted: #9fb3c8;
  --text: #e6eef8;
  --brand: #aee8ff;
  --brand-2: #cbb8ff;
  --accent: #7dd3fc;
  --success: #4ade80;
  --warning: #fbbf24;
  --danger: #f87171;
  --sacred-gold: #ffd700;
  --sacred-violet: #9966ff;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.5);
  --lightmod-hue: 180;
  --header-h: 56px;
}

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

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: contain;
}

body {
  touch-action: pan-y;
}



.container {
  width: min(1200px, 94vw);
  margin-inline: auto;
}

h1, h2, .collapsible-header, .category-accordion {
  scroll-margin-top: calc(var(--header-h) + env(safe-area-inset-top, 0px) + 8px);
}

header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: linear-gradient(135deg, rgba(11, 15, 20, 0.95), rgba(18, 24, 33, 0.92));
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(174, 232, 255, 0.15);
  padding: 10px 0;
  padding-top: max(10px, env(safe-area-inset-top, 0px));
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.nav-spacer {
  height: var(--header-h);
  height: calc(var(--header-h) + env(safe-area-inset-top, 0px));
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: conic-gradient(from 210deg, var(--brand), var(--brand-2));
  display: grid;
  place-items: center;
  color: #061018;
  font-weight: 900;
  font-size: 13px;
  box-shadow: 0 3px 10px rgba(174, 232, 255, 0.4);
}

.desktop-nav {
  display: flex;
  gap: 6px;
  align-items: center;
}

.nav-link {
  padding: 7px 14px;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.18s ease;
  min-height: 40px;
  display: flex;
  align-items: center;
}

.nav-link:hover {
  color: var(--brand);
  background: rgba(174, 232, 255, 0.1);
}

.control-bar {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.btn {
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid rgba(174, 232, 255, 0.2);
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  min-height: 38px;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(174, 232, 255, 0.2);
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #0b0f14;
  border-color: transparent;
  font-weight: 700;
}

.btn-primary:hover {
  box-shadow: 0 6px 18px rgba(174, 232, 255, 0.4);
}

.btn-secondary {
  background: var(--panel);
  border-color: rgba(174, 232, 255, 0.2);
}

.btn-mode {
  padding: 6px 12px;
  font-size: 12px;
}

.btn-mode.active {
  background: linear-gradient(135deg, rgba(174, 232, 255, 0.25), rgba(203, 184, 255, 0.15));
  border-color: var(--brand);
  color: var(--brand);
}

.status-badge {
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(11, 15, 20, 0.6);
  border: 1px solid rgba(174, 232, 255, 0.15);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.status-badge.active {
  background: linear-gradient(135deg, rgba(78, 222, 128, 0.2), rgba(134, 239, 172, 0.15));
  border-color: var(--success);
  color: var(--success);
}

.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: rgba(11, 15, 20, 0.95);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(174, 232, 255, 0.15);
  grid-template-columns: repeat(5, 1fr);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.mobile-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 8px;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.18s ease;
  text-decoration: none;
  min-height: 60px;
}

.mobile-nav-btn:hover {
  color: var(--brand);
}

.mobile-nav-icon {
  font-size: 20px;
}

.mobile-nav-label {
  font-size: 11px;
  font-weight: 600;
}

.hero {
  padding: 32px 0;
  margin-bottom: 24px;
}

.hero-grid {
  display: grid;
  gap: 32px;
  grid-template-columns: 1fr 1fr;
  align-items: center;
}

.tag {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(174, 232, 255, 0.15), rgba(203, 184, 255, 0.1));
  border: 1px solid rgba(174, 232, 255, 0.25);
  color: var(--brand);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

h1 {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 900;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 16px;
}

.subtitle {
  font-size: 17px;
  color: var(--muted);
  line-height: 1.7;
}

.card {
  background: linear-gradient(135deg, rgba(18, 24, 33, 0.7), rgba(11, 15, 20, 0.5));
  border: 1px solid rgba(174, 232, 255, 0.15);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.card-highlight {
  border-color: var(--brand);
  box-shadow: 0 0 32px rgba(174, 232, 255, 0.25), var(--shadow);
}

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

section {
  padding: 40px 0;
}

h2 {
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 800;
  color: var(--brand);
  margin-bottom: 12px;
}

h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--brand);
  margin-bottom: 12px;
}



.section-intro {
  color: var(--muted);
  margin-bottom: 24px;
  font-size: 15px;
}

.category-chips-container {
  position: sticky;
  top: calc(var(--header-h) + env(safe-area-inset-top, 0px));
  z-index: 100;
  background: linear-gradient(to bottom, var(--bg) 0%, var(--bg) 80%, transparent 100%);
  padding: 12px 0 20px;
  margin: 0 -3vw;
  padding-left: 3vw;
  padding-right: 3vw;
  overflow-x: auto;
  overflow-y: hidden;
  display: flex;
  gap: 10px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.category-chips-container::-webkit-scrollbar {
  display: none;
}

.category-chip {
  flex-shrink: 0;
  padding: 10px 18px;
  border-radius: 24px;
  border: 1.5px solid rgba(174, 232, 255, 0.2);
  background: var(--panel);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
  scroll-snap-align: start;
  min-height: 42px;
}

.category-chip:hover {
  border-color: var(--brand);
  background: var(--panel-hover);
  color: var(--text);
}

.category-chip.active {
  background: linear-gradient(135deg, rgba(174, 232, 255, 0.2), rgba(203, 184, 255, 0.15));
  border-color: var(--brand);
  color: var(--brand);
  box-shadow: 0 4px 12px rgba(174, 232, 255, 0.25);
}

.chip-count {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 7px;
  border-radius: 12px;
  background: rgba(174, 232, 255, 0.15);
  font-size: 11px;
  font-weight: 700;
}

.categories-accordion {
  margin-top: 24px;
}

.category-accordion {
  margin-bottom: 20px;
  border: 1px solid rgba(174, 232, 255, 0.12);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(18, 24, 33, 0.5), rgba(11, 15, 20, 0.3));
  overflow: hidden;
}

.category-accordion-header {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border: none;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: background 0.18s ease;
  text-align: left;
  min-height: 60px;
}

.category-accordion-header:hover {
  background: rgba(174, 232, 255, 0.05);
}

.category-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.category-info {
  flex: 1;
  min-width: 0;
}

.category-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--brand);
  margin-bottom: 2px;
}

.category-meta {
  font-size: 13px;
  color: var(--muted);
}

.category-caret {
  font-size: 16px;
  color: var(--brand);
  transition: transform 0.22s ease;
  flex-shrink: 0;
}

.category-accordion.expanded .category-caret {
  transform: rotate(180deg);
}

.category-preview {
  padding: 0 20px 16px;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.preset-btn-mini {
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid rgba(174, 232, 255, 0.15);
  background: var(--panel);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
  min-height: 36px;
}

.preset-btn-mini:hover {
  border-color: var(--brand);
  background: var(--panel-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(174, 232, 255, 0.2);
}

.more-badge {
  padding: 8px 14px;
  border-radius: 8px;
  background: rgba(174, 232, 255, 0.1);
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
}

.category-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.22s ease;
}

.category-accordion.expanded .category-body {
  max-height: 5000px;
}

.category-accordion.expanded .category-preview {
  display: none;
}

.category-content {
  padding: 0 20px 20px;
}

.lightmod-guideline {
  padding: 14px;
  margin-bottom: 16px;
  border-radius: 10px;
  background: rgba(174, 232, 255, 0.08);
  border-left: 3px solid var(--brand);
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

.preset-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.preset-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 18px;
  border-radius: 14px;
  border: 1.5px solid rgba(174, 232, 255, 0.15);
  background: linear-gradient(135deg, rgba(18, 24, 33, 0.6), rgba(11, 15, 20, 0.4));
  color: var(--text);
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-align: left;
  font-weight: 600;
  font-size: 14px;
  min-height: 170px;
  min-width: 44px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.preset-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 100% 0%, rgba(174, 232, 255, 0.12), transparent 70%);
  opacity: 0;
  transition: opacity 0.22s ease;
  pointer-events: none;
}

.preset-btn:hover:not(:disabled) {
  border-color: var(--brand);
  background: linear-gradient(135deg, rgba(18, 24, 33, 0.9), rgba(11, 15, 20, 0.7));
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(174, 232, 255, 0.3);
}

.preset-btn:hover::before {
  opacity: 1;
}

.preset-btn:active {
  transform: translateY(-2px);
}

.preset-btn.is-selected {
  border-color: var(--brand);
  background: linear-gradient(135deg, rgba(174, 232, 255, 0.18), rgba(203, 184, 255, 0.12));
  box-shadow: 0 0 24px rgba(174, 232, 255, 0.4);
}

.preset-icon {
  font-size: 28px;
  margin-bottom: 10px;
}

.preset-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.preset-freq {
  font-size: 12px;
  color: var(--brand);
  margin-bottom: 8px;
  font-weight: 600;
}

.preset-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 10px;
  flex: 1;
}

.preset-time {
  font-size: 11px;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 6px;
}

.evidence-btn {
  position: absolute;
  bottom: 14px;
  right: 14px;
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(174, 232, 255, 0.15);
  border: 1px solid rgba(174, 232, 255, 0.3);
  color: var(--brand);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
  text-decoration: none;
  min-height: 28px;
}

.evidence-btn:hover {
  background: rgba(174, 232, 255, 0.25);
  border-color: var(--brand);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(174, 232, 255, 0.3);
}

.controls-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.control-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.control-block label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.control-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--brand);
  min-width: 80px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

input[type="range"] {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: rgba(174, 232, 255, 0.15);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(174, 232, 255, 0.4);
  transition: transform 0.12s ease;
}

input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 8px rgba(174, 232, 255, 0.4);
  transition: transform 0.12s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

input[type="range"]::-moz-range-thumb:hover {
  transform: scale(1.15);
}

input[type="range"]:focus {
  outline: 2px solid rgba(174, 232, 255, 0.5);
  outline-offset: 2px;
  border-radius: 3px;
}

.control-hint {
  font-size: 12px;
  color: var(--muted);
}

.visualizer {
  width: 100%;
  height: 140px;
  border-radius: 10px;
  background: rgba(11, 15, 20, 0.8);
  border: 1px solid rgba(174, 232, 255, 0.15);
  margin-top: 16px;
}

.affirmations-voice-config {
  margin-bottom: 16px;
  padding: 16px;
  border-radius: 10px;
  background: rgba(174, 232, 255, 0.05);
  border: 1px solid rgba(174, 232, 255, 0.15);
}

.voice-mode-select {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
}

.voice-mode-select label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  min-height: 32px;
}

.voice-mode-select input[type="radio"] {
  cursor: pointer;
  accent-color: var(--brand);
}

.cloud-voice-config input[type="text"] {
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--panel);
  border: 1px solid rgba(174, 232, 255, 0.2);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  transition: all 0.18s ease;
}

.cloud-voice-config input[type="text"]:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(174, 232, 255, 0.1);
}

textarea {
  width: 100%;
  padding: 14px;
  border-radius: 10px;
  background: rgba(11, 15, 20, 0.6);
  border: 1px solid rgba(174, 232, 255, 0.2);
  color: var(--text);
  font: inherit;
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}

textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(174, 232, 255, 0.1);
}

footer {
  padding: 32px 0;
  border-top: 1px solid rgba(174, 232, 255, 0.1);
  color: var(--muted);
  text-align: center;
  font-size: 14px;
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

#mobile-detector {
  display: none;
  position: absolute;
  width: 0;
  height: 0;
  pointer-events: none;
}

.collapsible-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  margin-bottom: 16px;
  border: 1px solid rgba(174, 232, 255, 0.15);
  border-radius: 10px;
  background: var(--panel);
  cursor: pointer;
  user-select: none;
  transition: background 0.18s ease;
  min-height: 48px;
}

.collapsible-header:hover {
  background: var(--panel-hover);
}

.collapsible-header:focus {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.collapsible-header h2 {
  margin: 0;
  font-size: 1.5rem;
}

.collapsible-toggle {
  font-size: 1.2rem;
  transition: transform 0.22s ease;
  color: var(--brand);
}

.collapsible-content {
  overflow: hidden;
  transition: max-height 0.22s ease;
}

.collapsible-section.collapsed .collapsible-toggle {
  transform: rotate(-90deg);
}

.collapsible-section.collapsed .collapsible-content {
  max-height: 0 !important;
}

.lightmod-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0.75), rgba(0,0,0,0.92) 70%);
  backdrop-filter: blur(12px);
  display: grid;
  place-items: center;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
  padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
}

.lightmod-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.lightmod-consent-panel {
  position: relative;
  width: min(600px, 90vw);
  max-height: 85vh;
  overflow-y: auto;
  background: linear-gradient(145deg, #1a1f28, #12161d);
  border: 2px solid #f87171;
  border-radius: clamp(16px, 2.5vw, 24px);
  padding: clamp(24px, 4vw, 36px);
  box-shadow: 0 20px 60px rgba(248, 113, 113, 0.4), 0 0 0 1px rgba(248, 113, 113, 0.2);
}

.lightmod-consent-header {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid rgba(248, 113, 113, 0.3);
}

.lightmod-consent-header h2 {
  color: #f87171;
  font-size: clamp(20px, 3vw, 26px);
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.lightmod-consent-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.lightmod-consent-warning {
  background: rgba(248, 113, 113, 0.15);
  border-left: 4px solid #f87171;
  padding: 14px;
  border-radius: 8px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
}

.lightmod-consent-text {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  margin: 0;
}

.lightmod-consent-text strong {
  color: var(--text);
  font-weight: 600;
}

.lightmod-consent-checkbox-group {
  margin: 8px 0;
  padding: 16px;
  background: rgba(174, 232, 255, 0.05);
  border: 1px solid rgba(174, 232, 255, 0.15);
  border-radius: 10px;
}

.lightmod-consent-checkbox-label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  user-select: none;
  min-height: 44px;
}

.lightmod-consent-checkbox {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--brand);
}

.lightmod-consent-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.lightmod-consent-actions .btn {
  flex: 1;
  padding: 12px 20px;
  font-size: 15px;
}

.lightmod-consent-actions .btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
}

.lightmod-consent-prefs {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid rgba(174, 232, 255, 0.1);
  margin-top: 8px;
}

.lightmod-consent-pref-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
  color: var(--muted);
  user-select: none;
  min-height: 44px;
}

.lightmod-consent-pref-check {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--brand);
}

.lightmod-consent-link {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--brand);
  font-size: 13px;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
  text-align: left;
  transition: color 0.18s ease;
  min-height: 44px;
}

.lightmod-consent-link:hover:not(:disabled) {
  color: var(--accent);
}

.lightmod-consent-link:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  text-decoration: none;
}

.lightmod-frame {
  position: relative;
  width: min(980px, 84vw);
  padding: clamp(16px, 3vw, 32px);
  border-radius: clamp(16px, 2.5vw, 28px);
  background: linear-gradient(145deg, #0e131b, #0a0f16);
  border: 2px solid rgba(174, 232, 255, 0.2);
  box-shadow: var(--shadow-lg), 0 0 80px rgba(174, 232, 255, 0.15);
}

.lightmod-screen {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: clamp(12px, 2vw, 20px);
  overflow: hidden;
  background: radial-gradient(ellipse at center, hsl(var(--lightmod-hue), 20%, 8%) 0%, hsl(var(--lightmod-hue), 15%, 5%) 50%, hsl(var(--lightmod-hue), 10%, 3%) 100%);
  border: 1px solid rgba(174, 232, 255, 0.15);
  box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.8);
  transition: background 0.22s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightmod-center-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 0 30px white, 0 0 60px rgba(255, 255, 255, 0.8), 0 0 90px rgba(255, 255, 255, 0.6);
  opacity: 0;
  transition: opacity 0.05s ease, transform 0.05s ease;
  z-index: 5;
}

.lightmod-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(174, 232, 255, 0.3);
  background: linear-gradient(135deg, rgba(174, 232, 255, 0.1), rgba(203, 184, 255, 0.1));
  color: var(--text);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.18s ease;
  display: grid;
  place-items: center;
}

.lightmod-close:hover {
  transform: translateY(-2px);
  border-color: var(--brand);
  background: linear-gradient(135deg, rgba(174, 232, 255, 0.2), rgba(203, 184, 255, 0.2));
}

.lightmod-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(174, 232, 255, 0.05);
  border: 1px solid rgba(174, 232, 255, 0.15);
}

.lightmod-source-control {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  justify-content: center;
}

.lightmod-source-select {
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(174, 232, 255, 0.22);
  background: var(--panel);
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.18s ease;
  min-height: 36px;
}

.lightmod-source-select:hover {
  border-color: var(--brand);
  background: var(--panel-hover);
}

.lightmod-source-select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(174, 232, 255, 0.1);
}

#lightModFreqDisplay {
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.lightmod-safety {
  color: var(--muted);
  font-size: 12px;
  font-style: italic;
  text-align: center;
}

.lightmod-motion-notice {
  color: var(--warning);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .lightmod-screen {
    background: hsl(180, 15%, 5%) !important;
    transition: none !important;
  }
}

@media (min-width: 901px) {
  .category-chips-container {
    position: static;
    overflow: visible;
    flex-wrap: wrap;
    margin: 0;
    padding: 12px 0;
  }
}

@media (max-width: 900px) {
  .mobile-nav {
    display: grid;
  }

  body {
    padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px));
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .desktop-nav {
    display: none;
  }

  .control-bar {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 640px) {
  #mobile-detector {
    display: block;
  }

 
  .btn-mode {
    padding: 5px 10px;
    font-size: 11px;
  }

  #startBtn,
  #stopBtn {
    padding: 7px 12px;
    font-size: 12px;
  }

  .status-badge {
    font-size: 11px;
    padding: 5px 8px;
  }

  .preset-grid {
    grid-template-columns: 1fr;
  }

  .controls-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  #affirmationsSection {
    display: none !important;
  }

  .brand {
    font-size: 15px;
  }

  .brand span {
    font-size: 14px;
  }
}

@media (max-width: 380px) {
  .brand {
    font-size: 14px;
  }

  .brand span {
    font-size: 13px;
  }
}

.references-page {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
}

.references-page .container {
  max-width: 1400px;
}

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  input[type="range"]::-webkit-slider-thumb {
    width: 20px;
    height: 20px;
  }

  input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
  }
}
/* ===== PREMIUM SIMPLIFIED STYLES ===== */
/* Add these to the END of your existing styles.css file */

/* Premium Category Cards */
.category-card-premium {
  background: linear-gradient(135deg, rgba(18, 24, 33, 0.6), rgba(11, 15, 20, 0.4));
  border: 1.5px solid rgba(174, 232, 255, 0.15);
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 20px;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.category-card-premium:hover {
  border-color: var(--brand);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(174, 232, 255, 0.25);
}

.category-header-premium {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 28px 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease;
  text-align: left;
}

.category-header-premium:hover {
  background: rgba(174, 232, 255, 0.05);
}

.premium-icon {
  font-size: 48px;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 8px rgba(174, 232, 255, 0.3));
}

.premium-info {
  flex: 1;
  min-width: 0;
}

.premium-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

.premium-tagline {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 6px;
  line-height: 1.4;
}

.premium-count {
  font-size: 12px;
  color: var(--brand);
  font-weight: 600;
}

.premium-arrow {
  font-size: 28px;
  color: var(--brand);
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.category-card-premium:hover .premium-arrow {
  transform: translateX(4px);
}

.category-card-premium.expanded .premium-arrow {
  transform: rotate(90deg);
}

.category-body-premium {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.category-card-premium.expanded .category-body-premium {
  max-height: 5000px;
}

/* Premium Sessions Grid */
.sessions-grid-premium {
  display: grid;
  gap: 16px;
  padding: 0 24px 28px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.session-card-premium {
  background: linear-gradient(135deg, rgba(18, 24, 33, 0.7), rgba(11, 15, 20, 0.5));
  border: 1.5px solid rgba(174, 232, 255, 0.15);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  align-items: flex-start;
  gap: 18px;
  cursor: pointer;
  transition: all 0.25s ease;
  text-align: left;
  width: 100%;
  position: relative;
  overflow: hidden;
}

.session-card-premium::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 100% 0%, rgba(174, 232, 255, 0.12), transparent 70%);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.session-card-premium:hover {
  border-color: var(--brand);
  transform: translateY(-3px);
  box-shadow: 0 10px 32px rgba(174, 232, 255, 0.3);
}

.session-card-premium:hover::before {
  opacity: 1;
}

.session-card-premium.active {
  border-color: var(--brand);
  background: linear-gradient(135deg, rgba(174, 232, 255, 0.18), rgba(203, 184, 255, 0.12));
  box-shadow: 0 0 24px rgba(174, 232, 255, 0.4);
}

.session-icon-premium {
  font-size: 42px;
  flex-shrink: 0;
  line-height: 1;
}

.session-info-premium {
  flex: 1;
  min-width: 0;
}

.session-title-premium {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.session-desc-premium {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 14px;
  line-height: 1.5;
}

.session-meta-premium {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  font-weight: 600;
  flex-wrap: wrap;
}

.meta-duration {
  color: var(--brand);
}

.meta-intensity {
  padding: 5px 12px;
  border-radius: 14px;
  text-transform: capitalize;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.intensity-gentle {
  background: rgba(134, 239, 172, 0.15);
  color: #86efac;
}

.intensity-moderate {
  background: rgba(174, 232, 255, 0.15);
  color: var(--brand);
}

.intensity-deep {
  background: rgba(203, 184, 255, 0.15);
  color: var(--brand-2);
}

.intensity-energizing {
  background: rgba(251, 191, 36, 0.15);
  color: var(--warning);
}

.intensity-intense {
  background: rgba(248, 113, 113, 0.15);
  color: var(--danger);
}

/* Enhanced Category Chips */
.category-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 24px;
  border: 1.5px solid rgba(174, 232, 255, 0.2);
  background: var(--panel);
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  scroll-snap-align: start;
  min-height: 44px;
}

.category-chip:hover {
  border-color: var(--brand);
  background: var(--panel-hover);
  color: var(--text);
  transform: translateY(-1px);
}

.category-chip.active {
  background: linear-gradient(135deg, rgba(174, 232, 255, 0.2), rgba(203, 184, 255, 0.15));
  border-color: var(--brand);
  color: var(--brand);
  box-shadow: 0 4px 12px rgba(174, 232, 255, 0.25);
}

/* Mobile Optimizations */
@media (max-width: 640px) {
  .sessions-grid-premium {
    grid-template-columns: 1fr;
    padding: 0 16px 20px;
  }

  .category-header-premium {
    padding: 20px 16px;
    gap: 16px;
  }

  .premium-icon {
    font-size: 40px;
  }

  .premium-title {
    font-size: 19px;
  }

  .session-card-premium {
    padding: 20px;
    gap: 16px;
  }

  .session-icon-premium {
    font-size: 36px;
  }

  .session-title-premium {
    font-size: 17px;
  }

  .session-desc-premium {
    font-size: 13px;
  }

  .premium-arrow {
    font-size: 24px;
  }
}

/* Smooth transitions for dynamic content */
.category-card-premium,
.session-card-premium {
  animation: fadeInUp 0.4s ease-out backwards;
}

.category-card-premium:nth-child(1) { animation-delay: 0.05s; }
.category-card-premium:nth-child(2) { animation-delay: 0.1s; }
.category-card-premium:nth-child(3) { animation-delay: 0.15s; }
.category-card-premium:nth-child(4) { animation-delay: 0.2s; }
.category-card-premium:nth-child(5) { animation-delay: 0.25s; }

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}