/* Sobriety Counter - Main Styles */
/* Deep midnight theme with aurora accents */

@import url('https://fonts.googleapis.com/css2?family=Heebo:wght@300;400;500;600;700;800&family=Rubik:wght@400;500;600;700&display=swap');

:root {
  /* Nature Theme - Growth & Recovery */
  --color-primary: #10b981;        /* Fresh Growth Green (emerald-500) */
  --color-primary-dark: #059669;   /* Deep Emerald (emerald-600) */
  --color-primary-light: #d1fae5;  /* Soft Green Mist (emerald-100) */
  
  --color-secondary: #fbbf24;      /* Sunrise Gold (amber-400) */
  --color-secondary-dark: #f59e0b; /* Rich Gold (amber-500) */
  --color-secondary-light: #fef3c7; /* Pale Gold (amber-50) */
  
  --color-accent: #78350f;         /* Deep Earth Brown (amber-900) */
  --color-accent-warm: #fdba74;    /* Warm Terracotta (orange-300) */
  
  --color-success: #10b981;        /* Green */
  --color-warning: #fbbf24;        /* Gold */
  --color-danger: #dc2626;         /* Keep red for relapses */
  
  /* Backgrounds - Deep Forest Night */
  --bg-deep: #0a0f0a;              /* Deep Forest Night */
  --bg-primary: #0a0f0a;           /* Deep Forest Night */
  --bg-secondary: #1a1f1a;         /* Forest Shadow */
  --bg-elevated: #2a2f2a;          /* Elevated Earth */
  --bg-card: #1a1f1a;              /* Forest Shadow */
  --bg-tertiary: #1a1f1a;          /* Match secondary */
  
  /* Accent colors (mapped to nature theme) */
  --accent-primary: #10b981;       /* Green */
  --accent-secondary: #fbbf24;     /* Gold */
  --accent-tertiary: #10b981;      /* Green */
  --accent-warm: #fbbf24;          /* Gold */
  --accent-danger: #dc2626;        /* Red */
  
  /* Borders & Shadows */
  --border-subtle: rgba(16, 185, 129, 0.15);  /* Green tint */
  --border-accent: rgba(251, 191, 36, 0.4);   /* Gold accent */
  --shadow-glow: 0 0 40px rgba(16, 185, 129, 0.25);
  --shadow-gold: 0 0 30px rgba(251, 191, 36, 0.4);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
  
  /* Gradients - Green to Gold */
  --gradient-aurora: linear-gradient(135deg, #10b981 0%, #fbbf24 50%, #f59e0b 100%);
  --gradient-earth: linear-gradient(135deg, #78350f 0%, #92400e 100%);
  --gradient-glow: linear-gradient(180deg, rgba(16, 185, 129, 0.15) 0%, transparent 100%);
  --gradient-card: linear-gradient(145deg, rgba(16, 185, 129, 0.08) 0%, rgba(251, 191, 36, 0.05) 100%);
  
  /* Text colors */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-accent: #d1fae5;          /* Soft green accent */
  
  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  
  /* Border radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  /* Typography */
  --font-display: 'Rubik', sans-serif;
  --font-body: 'Heebo', sans-serif;

  /* Motion */
  --dur-1: 120ms;
  --dur-2: 200ms;
  --dur-3: 320ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  direction: rtl;
  overflow-x: hidden;
}

/* Nature background effect - Forest dawn */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 50vh;
  background: radial-gradient(ellipse at 50% 0%, rgba(16, 185, 129, 0.12) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 20%, rgba(251, 191, 36, 0.08) 0%, transparent 40%),
              radial-gradient(ellipse at 20% 30%, rgba(120, 53, 15, 0.06) 0%, transparent 40%);
  pointer-events: none;
  z-index: 0;
}

/* Container */
.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
  position: relative;
  z-index: 1;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }

p {
  color: var(--text-secondary);
}

/* Links */
a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--text-accent);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-md) var(--spacing-xl);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: transform var(--dur-2) var(--ease-out),
              box-shadow var(--dur-2) var(--ease-out),
              background var(--dur-2) var(--ease-out),
              border-color var(--dur-2) var(--ease-out),
              color var(--dur-2) var(--ease-out),
              opacity var(--dur-2) var(--ease-out);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  will-change: transform;
  -webkit-tap-highlight-color: transparent;
}

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

.btn:disabled,
.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none !important;
}

.btn::after {
  content: '';
  position: absolute;
  inset: -1px;
  background: radial-gradient(120px 60px at 20% 20%, rgba(255,255,255,0.16), transparent 60%),
              radial-gradient(160px 80px at 80% 0%, rgba(255,255,255,0.10), transparent 55%);
  opacity: 0;
  transition: opacity var(--dur-2) var(--ease-out);
  pointer-events: none;
}

.btn:hover::after {
  opacity: 1;
}

.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25), 0 0 0 6px rgba(251, 191, 36, 0.22);
}

/* Celebratory pulse animation */
@keyframes pulse-celebrate {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.btn-primary {
  background: var(--gradient-aurora);
  color: white;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(16, 185, 129, 0.4), 0 0 20px rgba(251, 191, 36, 0.2);
}

.btn-primary:active {
  transform: scale(0.95);
  box-shadow: 0 8px 40px rgba(251, 191, 36, 0.6), 0 0 60px rgba(251, 191, 36, 0.4);
  animation: pulse-celebrate 0.6s ease-out;
}

.btn-secondary {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn-secondary:hover {
  background: rgba(16, 185, 129, 0.1);
  border-color: var(--color-secondary);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
}

.btn-secondary:active {
  background: var(--color-primary);
  color: white;
  box-shadow: var(--shadow-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  color: var(--text-primary);
  background: rgba(16, 185, 129, 0.05);
}

.btn-block {
  width: 100%;
}

.btn-lg {
  padding: var(--spacing-lg) var(--spacing-2xl);
  font-size: 1.125rem;
}

/* Cards */
.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-card);
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-2px);
  border-color: var(--color-primary);
  box-shadow: 0 8px 30px rgba(16, 185, 129, 0.15);
}

.card-glow {
  background: var(--gradient-card);
  border-color: var(--color-secondary);
  box-shadow: 0 0 30px rgba(251, 191, 36, 0.2);
}

.card-glow:hover {
  border-color: var(--color-secondary);
  box-shadow: 0 0 40px rgba(251, 191, 36, 0.3), 0 0 20px rgba(16, 185, 129, 0.15);
}

/* Day Counter - Hero Component */
.day-counter {
  text-align: center;
  padding: var(--spacing-2xl) 0;
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.day-counter--has-background::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(3, 3, 5, 0.7) 0%,
    rgba(3, 3, 5, 0.5) 50%,
    rgba(3, 3, 5, 0.7) 100%
  );
  z-index: 0;
}

.day-counter--has-background > * {
  position: relative;
  z-index: 1;
}

.day-counter__number {
  font-family: var(--font-display);
  font-size: 6rem;
  font-weight: 800;
  background: var(--gradient-aurora);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  text-shadow: 0 0 60px rgba(124, 58, 237, 0.4);
}

.day-counter__label {
  font-size: 1.5rem;
  color: var(--text-secondary);
  margin-top: var(--spacing-sm);
}

.day-counter__subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: var(--spacing-xs);
}

/* Streak Badge */
.streak-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm) var(--spacing-md);
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-full);
  color: var(--accent-warm);
  font-weight: 600;
  font-size: 0.875rem;
}

/* Check-in Options */
.checkin-options {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  margin: var(--spacing-xl) 0;
}

.checkin-option {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-lg);
  background: var(--bg-elevated);
  border: 2px solid transparent;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.3s ease;
}

.checkin-option:hover {
  border-color: var(--border-accent);
  transform: translateX(-4px);
}

.checkin-option.selected {
  border-color: var(--accent-primary);
  background: rgba(124, 58, 237, 0.1);
}

.checkin-option__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.checkin-option--sober .checkin-option__icon {
  background: rgba(16, 185, 129, 0.2);
}

.checkin-option--struggled .checkin-option__icon {
  background: rgba(245, 158, 11, 0.2);
}

.checkin-option--relapsed .checkin-option__icon {
  background: rgba(239, 68, 68, 0.2);
}

.checkin-option__text {
  flex: 1;
}

.checkin-option__title {
  font-weight: 600;
  color: var(--text-primary);
}

.checkin-option__desc {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Onboarding Screens */
.onboarding {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: var(--spacing-xl) 0;
}

.onboarding__progress {
  display: flex;
  gap: var(--spacing-xs);
  margin-bottom: var(--spacing-xl);
}

.onboarding__progress-dot {
  height: 4px;
  flex: 1;
  background: var(--bg-elevated);
  border-radius: var(--radius-full);
  transition: background 0.3s;
}

.onboarding__progress-dot.active {
  background: var(--accent-primary);
}

.onboarding__progress-dot.completed {
  background: var(--accent-tertiary);
}

.onboarding__question {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: var(--spacing-lg);
  color: var(--text-primary);
}

.onboarding__options {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  flex: 1;
}

.onboarding__option {
  padding: var(--spacing-lg);
  background: var(--bg-elevated);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: right;
  position: relative;
  overflow: hidden;
}

.onboarding__option:hover {
  border-color: var(--border-accent);
  background: var(--bg-card);
}

.onboarding__option:active {
  transform: scale(0.98);
  border-color: var(--color-secondary);
  box-shadow: 0 0 30px rgba(251, 191, 36, 0.5), inset 0 0 20px rgba(251, 191, 36, 0.2);
}

/* Celebratory burst animation on tap */
.onboarding__option::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.6) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  opacity: 0;
  pointer-events: none;
}

.onboarding__option:active::after {
  animation: burst-celebrate 0.6s ease-out;
}

@keyframes burst-celebrate {
  0% {
    width: 0;
    height: 0;
    opacity: 1;
  }
  100% {
    width: 300%;
    height: 300%;
    opacity: 0;
  }
}

.onboarding__option.selected {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(251, 191, 36, 0.15));
  border-color: var(--color-secondary);
  box-shadow: 0 0 20px rgba(251, 191, 36, 0.3);
}

.onboarding__option-title {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--spacing-xs);
}

.onboarding__option-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Navigation */
.nav-bottom {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-primary);
  border-top: 1px solid var(--border-subtle);
  padding: var(--spacing-sm) 0;
  padding-bottom: calc(var(--spacing-sm) + env(safe-area-inset-bottom));
  z-index: 100;
}

.nav-bottom__inner {
  display: flex;
  justify-content: space-around;
  max-width: 480px;
  margin: 0 auto;
}

.nav-bottom__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: var(--spacing-sm);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.75rem;
  transition: color var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-out), background var(--dur-2) var(--ease-out);
  border-radius: 14px;
}

.nav-bottom__item:hover,
.nav-bottom__item.active {
  color: var(--accent-primary);
}

.nav-bottom__item:active {
  transform: scale(0.96);
  background: rgba(255,255,255,0.04);
}

.nav-bottom__icon {
  font-size: 1.5rem;
}

/* Header */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-lg) 0;
}

.header__title {
  font-size: 1.25rem;
  font-weight: 600;
}

.header__action {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.header__action:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}

/* Journal Entry */
.journal-entry {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-md);
}

.journal-entry__date {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: var(--spacing-sm);
}

.journal-entry__content {
  color: var(--text-primary);
  line-height: 1.7;
}

/* Textarea */
.textarea {
  width: 100%;
  min-height: 150px;
  padding: var(--spacing-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  resize: vertical;
  transition: border-color 0.2s;
}

.textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
}

.textarea::placeholder {
  color: var(--text-muted);
}

/* Input */
.input {
  width: 100%;
  padding: var(--spacing-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color 0.2s;
}

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

.input::placeholder {
  color: var(--text-muted);
}

/* Group Card */
.group-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-md);
  cursor: pointer;
  transition: all 0.3s ease;
}

.group-card:hover {
  border-color: var(--border-accent);
  transform: translateX(-4px);
}

.group-card__header {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-sm);
}

.group-card__avatar {
  width: 48px;
  height: 48px;
  background: var(--gradient-aurora);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.group-card__name {
  font-weight: 600;
  color: var(--text-primary);
}

.group-card__members {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.group-card__desc {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* Milestone Card */
.milestone {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-md);
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-sm);
}

.milestone__icon {
  width: 40px;
  height: 40px;
  background: var(--gradient-aurora);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.milestone__text {
  flex: 1;
}

.milestone__title {
  font-weight: 600;
  color: var(--text-primary);
}

.milestone__date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.milestone--locked {
  opacity: 0.5;
}

.milestone--locked .milestone__icon {
  background: var(--bg-card);
}

/* Video Player */
.video-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--spacing-md);
}

.video-card__player {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--bg-deep);
}

.video-card__info {
  padding: var(--spacing-md);
}

.video-card__title {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--spacing-xs);
}

.video-card__date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Subscription Tier Cards */
.tier-card {
  background: var(--bg-card);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--spacing-xl);
  margin-bottom: var(--spacing-lg);
  transition: all 0.3s ease;
}

.tier-card:hover {
  border-color: var(--border-accent);
}

.tier-card--featured {
  border-color: var(--accent-primary);
  background: var(--gradient-card);
  position: relative;
}

.tier-card--featured::before {
  content: 'מומלץ';
  position: absolute;
  top: -12px;
  right: var(--spacing-lg);
  background: var(--gradient-aurora);
  color: white;
  padding: var(--spacing-xs) var(--spacing-md);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

.tier-card__name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--spacing-sm);
}

.tier-card__price {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
}

.tier-card__price span {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-muted);
}

.tier-card__features {
  list-style: none;
  margin: var(--spacing-lg) 0;
}

.tier-card__feature {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm) 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.tier-card__feature::before {
  content: '✓';
  color: var(--accent-tertiary);
  font-weight: 700;
}

/* Loading Spinner */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-subtle);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Page bottom padding for nav */
.page-content {
  padding-bottom: calc(80px + env(safe-area-inset-bottom));
}

/* Toast Notifications */
.toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--spacing-md) var(--spacing-lg);
  color: var(--text-primary);
  font-weight: 500;
  box-shadow: var(--shadow-card);
  z-index: 200;
  animation: slideUp 0.3s ease;
}

.toast--success {
  border-color: var(--accent-tertiary);
}

.toast--error {
  border-color: var(--accent-danger);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
  padding: var(--spacing-md);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--spacing-xl);
  max-width: 400px;
  width: 100%;
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal {
  transform: scale(1);
}

.modal__title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: var(--spacing-md);
}

.modal__actions {
  display: flex;
  gap: var(--spacing-md);
  margin-top: var(--spacing-xl);
}

/* Utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }
.mt-xl { margin-top: var(--spacing-xl); }
.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }
.mb-xl { margin-bottom: var(--spacing-xl); }
.hidden { display: none !important; }

/* Responsive */
@media (min-width: 768px) {
  .container {
    max-width: 520px;
  }
  
  .day-counter__number {
    font-size: 8rem;
  }
}

/* ===========================
   COACH MODE THEME
   =========================== */

/* Coach Mode (for regular dashboard when user is coach) - Keep earth-brown */
body.coach-mode {
  --accent-primary: #78350f;  /* Deep Earth Brown */
  --accent-secondary: #92400e; /* Rich Earth */
  --gradient-aurora: linear-gradient(135deg, #78350f 0%, #92400e 50%, #b45309 100%);
  --gradient-glow: linear-gradient(180deg, rgba(120, 53, 15, 0.15) 0%, transparent 100%);
  --gradient-card: linear-gradient(145deg, rgba(120, 53, 15, 0.12) 0%, rgba(146, 64, 14, 0.08) 100%);
  --border-accent: rgba(120, 53, 15, 0.4);
  --shadow-glow: 0 0 40px rgba(120, 53, 15, 0.25);
  --text-accent: #fdba74;
}

/* Coach Mode - Earth background effect override */
body.coach-mode::before {
  background: radial-gradient(ellipse at 50% 0%, rgba(120, 53, 15, 0.15) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 20%, rgba(146, 64, 14, 0.10) 0%, transparent 40%),
              radial-gradient(ellipse at 20% 30%, rgba(180, 83, 9, 0.08) 0%, transparent 40%);
}

/* Coach Dashboard - Beautiful golden theme with multiple shades */
body.coach-dashboard {
  --color-primary: #fbbf24;        /* Medium Gold */
  --color-primary-dark: #f59e0b;   /* Rich Gold */
  --color-primary-light: #fef3c7;  /* Light Gold */
  --accent-primary: #fbbf24;       /* Medium Gold */
  --accent-secondary: #f59e0b;     /* Rich Gold */
  --gradient-aurora: linear-gradient(135deg, #fcd34d 0%, #fbbf24 50%, #f59e0b 100%);
  --gradient-glow: linear-gradient(180deg, rgba(251, 191, 36, 0.15) 0%, transparent 100%);
  --gradient-card: linear-gradient(145deg, rgba(251, 191, 36, 0.12) 0%, rgba(245, 158, 11, 0.08) 100%);
  --border-accent: rgba(251, 191, 36, 0.4);
  --shadow-glow: 0 0 40px rgba(251, 191, 36, 0.25);
  --shadow-gold: 0 0 30px rgba(251, 191, 36, 0.4);
  --text-accent: #fef3c7;
}

/* Coach Dashboard - Golden background effect */
body.coach-dashboard::before {
  background: radial-gradient(ellipse at 50% 0%, rgba(251, 191, 36, 0.12) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 20%, rgba(245, 158, 11, 0.10) 0%, transparent 40%),
              radial-gradient(ellipse at 20% 30%, rgba(217, 119, 6, 0.08) 0%, transparent 40%);
}

/* Coach Dashboard buttons - Orange to green gradient (orange → light green → strong green) */
body.coach-dashboard .btn-primary {
  background: linear-gradient(135deg, #f59e0b 0%, #34d399 50%, #10b981 75%, #059669 100%);
  color: #fff;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3), 0 0 20px rgba(251, 191, 36, 0.2);
  font-weight: 600;
}

body.coach-dashboard .btn-primary:hover {
  background: linear-gradient(135deg, #fbbf24 0%, #6ee7b7 50%, #34d399 75%, #10b981 100%);
  box-shadow: 0 6px 24px rgba(16, 185, 129, 0.4), 0 0 30px rgba(251, 191, 36, 0.3);
  transform: translateY(-2px);
}

body.coach-dashboard .btn-primary:active {
  background: linear-gradient(135deg, #d97706 0%, #10b981 50%, #059669 100%);
  box-shadow: 0 2px 12px rgba(16, 185, 129, 0.5), 0 0 25px rgba(251, 191, 36, 0.25);
  transform: translateY(0);
}

/* Coach Dashboard Day Counter - Bright golden gradient with glow */
body.coach-dashboard .day-counter__number {
  background: linear-gradient(135deg, #fcd34d 0%, #fbbf24 50%, #f59e0b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 60px rgba(251, 191, 36, 0.5), 0 0 40px rgba(245, 158, 11, 0.3);
  filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.6));
}

/* Coach Dashboard Card Glow - Golden borders and shadows */
body.coach-dashboard .card-glow {
  border-color: #fbbf24;
  box-shadow: 0 0 30px rgba(251, 191, 36, 0.2), 0 0 20px rgba(245, 158, 11, 0.15);
}

body.coach-dashboard .card-glow:hover {
  border-color: #fcd34d;
  box-shadow: 0 0 40px rgba(251, 191, 36, 0.3), 0 0 30px rgba(245, 158, 11, 0.2);
}

/* Coach Badge - Top indicator (golden gradient like button) */
.coach-badge {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: #000;
  padding: 10px 20px;
  border-radius: 24px;
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: var(--spacing-lg);
  box-shadow: 0 4px 20px rgba(251, 191, 36, 0.4);
  animation: coachBadgePulseGold 2s ease-in-out infinite;
}

/* Coach Dashboard Badge - Orange to green gradient (orange → light green → strong green) */
body.coach-dashboard .coach-badge {
  background: linear-gradient(135deg, #f59e0b 0%, #34d399 50%, #10b981 75%, #059669 100%);
  color: #fff;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3), 0 0 20px rgba(251, 191, 36, 0.2);
  animation: none;
}

@keyframes coachBadgePulse {
  0%, 100% { box-shadow: 0 4px 15px rgba(120, 53, 15, 0.3); }
  50% { box-shadow: 0 4px 25px rgba(120, 53, 15, 0.5); }
}

@keyframes coachBadgePulseGold {
  0%, 100% { box-shadow: 0 4px 15px rgba(251, 191, 36, 0.3); }
  50% { box-shadow: 0 4px 25px rgba(251, 191, 36, 0.5); }
}

/* Coach Nav Button - Prominent golden button */
.nav-bottom__item.coach-highlight,
.nav-bottom__item.coach-btn {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%) !important;
  color: #000 !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 20px rgba(251, 191, 36, 0.6), 0 0 40px rgba(251, 191, 36, 0.3) !important;
  border: 2px solid rgba(251, 191, 36, 0.8) !important;
  border-radius: 12px !important;
  padding: 8px 12px !important;
  margin: -2px 2px !important;
  animation: coachNavPulse 2s ease-in-out infinite;
}

.nav-bottom__item.coach-highlight:hover,
.nav-bottom__item.coach-btn:hover {
  color: #000 !important;
  transform: scale(1.05);
  box-shadow: 0 6px 30px rgba(251, 191, 36, 0.7), 0 0 50px rgba(251, 191, 36, 0.4) !important;
}

.nav-bottom__item.coach-highlight:active,
.nav-bottom__item.coach-btn:active {
  transform: scale(0.92);
  box-shadow: 0 2px 10px rgba(251, 191, 36, 0.8) !important;
}

.nav-bottom__item.coach-highlight .nav-bottom__icon,
.nav-bottom__item.coach-highlight span,
.nav-bottom__item.coach-btn .nav-bottom__icon,
.nav-bottom__item.coach-btn span {
  color: #000 !important;
}

@keyframes coachNavPulse {
  0%, 100% { 
    box-shadow: 0 4px 20px rgba(251, 191, 36, 0.6), 0 0 40px rgba(251, 191, 36, 0.3);
  }
  50% { 
    box-shadow: 0 6px 30px rgba(251, 191, 36, 0.7), 0 0 50px rgba(251, 191, 36, 0.4);
  }
}

/* ===========================
   APP LOGO + SPLASH
   =========================== */
.app-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
}

.app-logo__mark {
  width: 64px;
  height: 64px;
  filter: drop-shadow(0 10px 24px rgba(124, 58, 237, 0.20));
}

.app-logo__title {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
  background: var(--gradient-aurora);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 40px rgba(124, 58, 237, 0.25);
}

.splash {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-2xl) var(--spacing-md);
}

.splash__inner {
  width: 100%;
  max-width: 420px;
  text-align: center;
  animation: splashIn var(--dur-3) var(--ease-out);
}

.splash__subtitle {
  margin-top: var(--spacing-md);
  color: var(--text-muted);
}

.splash__loader {
  margin-top: var(--spacing-xl);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-weight: 600;
}

.splash__dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.18);
  animation: dotPulse 900ms var(--ease-in-out) infinite;
}
.splash__dot:nth-child(2) { animation-delay: 120ms; }
.splash__dot:nth-child(3) { animation-delay: 240ms; }

@keyframes splashIn {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes dotPulse {
  0%, 100% { opacity: 0.35; transform: translateY(0); }
  50% { opacity: 0.95; transform: translateY(-2px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}

