/* DopaBrain 5-4-3-2-1 Sensory Grounding & Panic Reset Styles */
:root {
  --bg-dark: #070c14;
  --bg-card: rgba(16, 24, 38, 0.8);
  --bg-card-hover: rgba(24, 34, 52, 0.9);
  --line: rgba(255, 255, 255, 0.12);
  --line-light: rgba(255, 255, 255, 0.06);
  --text: #f8fafc;
  --muted: #94a3b8;
  --teal: #14b8a6;
  --teal-light: #2dd4bf;
  --indigo: #6366f1;
  --emerald: #10b981;
  --sky: #0ea5e9;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 8px;
}

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

body {
  background-color: var(--bg-dark);
  color: var(--text);
  font-family: 'Outfit', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.skip {
  position: absolute;
  top: -999px;
  left: 10px;
  background: var(--teal);
  color: #000;
  font-weight: 700;
  padding: 10px 16px;
  z-index: 1000;
  border-radius: var(--radius-sm);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.skip:focus {
  top: 10px;
}

.hero {
  padding: 24px 20px 40px;
  background: radial-gradient(circle at 50% 0%, rgba(20, 184, 166, 0.16) 0%, transparent 70%);
  border-bottom: 1px solid var(--line-light);
}

nav {
  max-width: 900px;
  margin: 0 auto 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-light);
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

nav a:hover {
  color: #fff;
  border-color: var(--teal);
  background: rgba(20, 184, 166, 0.1);
}

.lang-picker {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-picker label {
  font-size: 0.85rem;
  color: var(--muted);
}

.lang-picker select {
  background: rgba(16, 24, 38, 0.95);
  color: var(--text);
  border: 1px solid var(--line);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  cursor: pointer;
  min-height: 44px;
  outline: none;
}
.lang-picker select:focus {
  border-color: var(--teal);
}

.hero-body {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.kicker {
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  font-weight: 800;
  color: var(--teal-light);
  margin-bottom: 12px;
  text-transform: uppercase;
}

.hero-body h1 {
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #fff 30%, var(--teal-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.lead {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 24px;
}

.chips {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.chip {
  background: rgba(20, 184, 166, 0.1);
  border: 1px solid rgba(20, 184, 166, 0.25);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--teal-light);
  min-height: 36px;
  display: inline-flex;
  align-items: center;
}

.main-wrap {
  max-width: 820px;
  width: 100%;
  margin: 0 auto;
  padding: 32px 20px 60px;
  flex: 1;
}

.panel {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  backdrop-filter: blur(14px);
  margin-bottom: 32px;
}

@media (max-width: 600px) {
  .panel {
    padding: 24px 16px;
  }
}

/* Calming Breathing Pulse Indicator */
.pulse-wrap {
  text-align: center;
  margin-bottom: 28px;
}

.pulse-circle {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.4) 0%, rgba(20, 184, 166, 0.05) 70%);
  border: 2px solid var(--teal-light);
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  animation: calmBreath 8s infinite ease-in-out;
  box-shadow: 0 0 24px rgba(20, 184, 166, 0.3);
}

@keyframes calmBreath {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.18); opacity: 1; box-shadow: 0 0 36px rgba(20, 184, 166, 0.55); }
}

.pulse-label {
  font-size: 0.9rem;
  color: var(--teal-light);
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* Step Progression Tracker */
.steps-progress {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 32px;
}

.step-indicator {
  flex: 1;
  text-align: center;
  padding: 10px 4px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line-light);
  transition: all 0.3s;
  min-height: 52px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.step-indicator.active {
  background: rgba(20, 184, 166, 0.16);
  border-color: var(--teal);
  box-shadow: 0 0 12px rgba(20, 184, 166, 0.3);
}

.step-indicator.completed {
  background: rgba(16, 185, 129, 0.14);
  border-color: var(--emerald);
  color: var(--emerald);
}

.step-num {
  font-size: 0.78rem;
  font-weight: 800;
  display: block;
}

.step-name {
  font-size: 0.72rem;
  color: var(--muted);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Active Grounding Stage Card */
.stage-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 24px;
  animation: fadeIn 0.3s ease-out;
}

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

.stage-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.stage-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: rgba(20, 184, 166, 0.15);
  border: 1px solid rgba(20, 184, 166, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  flex-shrink: 0;
}

.stage-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.3;
}

.stage-desc {
  font-size: 0.98rem;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 20px;
}

/* Interactive Check Items */
.items-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.check-item {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-light);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  min-height: 52px;
  transition: all 0.2s;
  user-select: none;
}

.check-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--line);
}

.check-item.checked {
  background: rgba(20, 184, 166, 0.14);
  border-color: var(--teal);
}

.check-box {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 2px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  color: transparent;
  transition: all 0.2s;
  flex-shrink: 0;
}

.check-item.checked .check-box {
  background: var(--teal);
  border-color: var(--teal);
  color: #000;
}

.check-text {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
}

.check-item.checked .check-text {
  color: #fff;
  font-weight: 600;
}

/* Cyclic Sigh Breath Guide (Stage 1) */
.sigh-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(20, 184, 166, 0.3);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  margin-bottom: 24px;
}

.sigh-timer-bar {
  height: 14px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 7px;
  overflow: hidden;
  margin: 16px 0;
}

.sigh-timer-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--teal), var(--emerald));
  transition: width 0.1s linear;
}

.sigh-instruction {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--teal-light);
}

/* Nav Buttons */
.btn-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.primary-btn,
.ghost-btn {
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  padding: 14px 28px;
  cursor: pointer;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.2s;
  flex: 1;
}

.primary-btn {
  background: linear-gradient(135deg, var(--teal), #0d9488);
  color: #000;
  border: none;
  box-shadow: 0 4px 16px rgba(20, 184, 166, 0.35);
}
.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(20, 184, 166, 0.5);
}
.primary-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.ghost-btn {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border: 1px solid var(--line);
}
.ghost-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
}

/* Completion Verdict Card */
.complete-card {
  text-align: center;
  padding: 24px 10px;
  animation: fadeIn 0.4s ease-out;
}

.complete-badge {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.18);
  color: var(--emerald);
  border: 1px solid rgba(16, 185, 129, 0.35);
  text-transform: uppercase;
  display: inline-block;
  margin-bottom: 14px;
}

.complete-title {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 800;
  color: #fff;
  margin-bottom: 10px;
}

.complete-desc {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 620px;
  margin: 0 auto 28px;
  line-height: 1.6;
}

/* Cross-Funnel Bridge Grid */
.bridge-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 32px 0 20px;
  text-align: left;
}

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

.bridge-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line-light);
  border-radius: var(--radius-md);
  padding: 18px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  min-height: 110px;
}

.bridge-card:hover {
  transform: translateY(-3px);
  border-color: var(--teal);
  background: rgba(20, 184, 166, 0.08);
}

.bridge-emoji {
  font-size: 1.6rem;
  margin-bottom: 8px;
}

.bridge-card h5 {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.bridge-card p {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.45;
}

/* Disclaimer */
.disclaimer-box {
  background: rgba(255, 255, 255, 0.02);
  border-left: 3px solid var(--muted);
  border-radius: 4px;
  padding: 14px 18px;
  margin-top: 32px;
}

.disclaimer-box strong {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.disclaimer-box p {
  font-size: 0.82rem;
  color: #64748b;
  line-height: 1.5;
}

footer {
  text-align: center;
  padding: 28px 20px;
  border-top: 1px solid var(--line-light);
  color: var(--muted);
  font-size: 0.88rem;
  margin-top: auto;
}

footer a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 6px;
}
footer a:hover {
  color: var(--teal-light);
}
