/* Modern Design System - OmZIN App */
:root {
  /* Colors */
  --primary: #adb863;
  --primary-hover: #98a356;
  --primary-light: #c5d179;
  --primary-dark: #3730a3;
  --secondary: #06b6d4;
  --accent: #f59e0b;
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  
  /* Surfaces */
  --surface: #ffffff;
  --surface-elevated: #f8fafc;
  --surface-hover: #f1f5f9;
  --background: #f1f5f9;
  --background-subtle: #f1f5f9;
  
  /* Text */
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;
  --text-inverse: #ffffff;
  
  /* Borders */
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --border-strong: #cbd5e1;
  
  /* Shadows */
  --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  
  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  
  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  
  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --line-height-tight: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.625;
}

/* Reset & Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  line-height: var(--line-height-normal);
  overflow-x: hidden;
  height: 100%;
}

body {
  font-family: var(--font-family);
  background: var(--background);
  color: var(--text-primary);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  padding-bottom: 0;
  overscroll-behavior-y: none;
}

/* Layout Components - Desktop & Mobile */
/* Desktop layout improvements */
@media (min-width: 1025px) {
  body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: #667eea;
    padding-bottom: 0;
  }

  .mobile-only-message {
    display: none; /* Hide by default on desktop */
  }

  /* Show mobile-only message for all pages on desktop */
  .mobile-only-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--spacing-2xl);
    background: var(--surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    max-width: 480px;
    border: 1px solid var(--border-light);
  }

  .mobile-only-message .top-header {
    margin-top: var(--spacing-lg);
    padding: 0;
    position: static;
    border-bottom: none;
    backdrop-filter: none;
    background: transparent;
  }

  .mobile-only-message .auth-card {
    background: transparent;
    box-shadow: none;
    padding: 0;
    border-radius: 0;
  }

  .desktop-subtitle {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-md);
  }

  .desktop-description {
    color: var(--text-secondary);
    line-height: 1.6;
  }

  .mobile-content {
    display: none; /* Hide mobile content on desktop */
  }
}

/* Large desktop improvements */
@media (min-width: 1440px) {
  .mobile-content {
    max-width: 2000px;
    padding: 32px 40px;
  }
  
  .auth-card {
    padding: 48px 40px;
  }
}

@media (min-width: 1920px) {
  .mobile-content {
    max-width: 2200px;
    padding: 40px 60px;
  }
}

/* Mobile-first responsive design */
@media (max-width: 1024px) {
  .mobile-only-message {
    display: none;
  }

  .mobile-content {
    display: block;
    min-height: calc(100vh - 80px);
    max-height: calc(100vh - 80px);
    padding-bottom: 40px;
    overflow-y: auto;
    overscroll-behavior: none;
  }

  body {
    background: var(--surface);
    padding-bottom: 0;
    overflow: hidden;
    height: 100vh;
    max-height: 100vh;
    position: fixed;
    width: 100%;
    overscroll-behavior: none;
  }

  html {
    overflow: hidden;
    overscroll-behavior: none;
  }
}

/* Header Components */
.top-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-5) var(--space-4);
  background: var(--surface);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.95);
}

.user-info {
  display: flex;
  align-items: center;
  flex: 1;
  gap: var(--space-3);
}

.user-info div p {
  font-weight: 500;
  color: var(--text-primary);
  margin: 0;
}

.user-info div small {
  color: var(--text-muted);
  font-size: var(--font-size-sm);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.install-btn {
  background: var(--surface-hover);
  border: 1px solid var(--border);
  font-size: 1.125rem;
  color: var(--text-secondary);
  cursor: pointer;
  padding: var(--space-2);
  border-radius: var(--radius-lg);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
}

.install-btn:hover {
  background: var(--primary);
  color: var(--text-inverse);
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

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

.avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-xl);
  object-fit: cover;
  border: 2px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

.challenge-card {
  background: #e9e1fc;
  margin: 15px;
  padding: 20px;
  border-radius: 15px;
}

.challenge-card h2, .your-plan h3 {

  margin-top: 0px;
}

.avatars img {
  width: 30px;
  border-radius: 50%;
  margin-right: 5px;
}

.date-selector {
  display: flex;
  overflow-x: auto;
  padding: 10px 15px;
}

.date-box {
  flex: 0 0 auto;
  background: #fff;
  border-radius: 12px;
  padding: 10px;
  text-align: center;
  margin-right: 10px;
  width: 60px;
  box-shadow: 0 0 5px rgba(0,0,0,0.05);
}

.date-box.active {
  background: #4a90e2;
  color: white;
}

.your-plan {
  padding: 20px 15px;
}

.plan-card {
  display: flex;
  justify-content: space-between;
  background: white;
  border-radius: 15px;
  border: 1px solid rgba(0,0,0,0.03);
  padding: 15px;
  margin-bottom: 25px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: visible; /* Allow images to stick out */
  width: 100%;
}

.plan-card.medium { background: #ffe5a5; }
.plan-card.light { background: #cde7f7; }
.plan-card.hierennu { background: #b4ffcd; }

.card-image {
  position: absolute;
  right: 10px;
  top: -15px;
  width: 80px;
  height: 80px;
  z-index: 3;
  pointer-events: none;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.15));
}

.plan-card .left {
  position: relative;
  z-index: 2;
  flex: 1;
}

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.07);
  display: flex;
  justify-content: space-around;
  padding: 12px 0;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 1000;
  touch-action: none;
  overscroll-behavior: none;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  gap: 4px;
  transition: color 0.2s ease;
  flex-basis: 0;
  flex-grow: 1;
}

.nav-item:hover {
  color: #01a9e8; /* Blue from home page */
}

.nav-item .nav-icon {
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  width: 28px;
}

.nav-item .nav-icon img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
}

.nav-item.active {
  color: #01a9e8; /* Blue from home page */
}

.nav-item.active .nav-icon img {
  border: 2px solid #01a9e8;
}

.plan-card .left p {
  font-size: 19px;
  font-weight: bold;
  margin-top: 0px;
  margin-right: 70px;

}

.card-link {
  display: flex;
  justify-content: space-between;
  width: 100%;
  height: 100%;
  text-decoration: none;
  color: inherit;
  position: relative;
  z-index: 1;
  cursor: pointer;
}

.card-link:hover {
  color: inherit;
  text-decoration: none;
}

.plan-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: all 0.3s ease;
}

.user-info div p {
 margin-bottom: 3px;
 margin-top: 3px;
 }

/* Auth styles - Modern refactored design */
.auth-section {
  padding: 40px 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 200px);
}

/* Auth-specific gradient background */
body:has(.auth-section) {
  background: linear-gradient(to top, #adb863 0 52px, #00abe9 20px 100%);
  background-attachment: fixed;
}

/* Fallback for browsers without :has() support */
.auth-page-body {
  background: linear-gradient(to top, #adb863 0 52px, #00abe9 20px 100%);
  background-attachment: fixed;
}

.auth-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: 40px 32px;
  margin: 0;
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.1),
    0 1px 0 rgba(255, 255, 255, 0.5) inset;
  border: 1px solid rgba(255, 255, 255, 0.2);
  width: 100%;
  max-width: 400px;
  position: relative;
  overflow: hidden;
}

/* Desktop admin pages - wider cards */
@media (min-width: 768px) {
  body.auth-page-body .auth-card {
    max-width: 100%;
  }
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent);
}

.auth-title {
  margin: 0 0 0px 0;
  font-size: 28px;
  font-weight: 700;
  text-align: center;
  background: linear-gradient(135deg, #1a1a1a 0%, #4a4a4a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.form-group { 
  margin-bottom: 24px; 
  position: relative;
}

.form-group label { 
  display: block; 
  margin-bottom: 8px; 
  font-size: 14px; 
  font-weight: 600;
  color: #2c2c2c;
  letter-spacing: 0.3px;
}

.form-group input {
  width: 100%;
  border: 2px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  padding: 16px 20px;
  font-size: 16px;
  outline: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: rgba(248, 250, 252, 0.8);
  backdrop-filter: blur(10px);
  box-sizing: border-box;
}

.form-group input:focus {
  border-color: #4a90e2;
  box-shadow: 
    0 0 0 4px rgba(74, 144, 226, 0.1),
    0 8px 25px rgba(74, 144, 226, 0.15);
  background: rgba(255, 255, 255, 0.95);
  transform: translateY(-2px);
}

.form-group input::placeholder {
  color: #9ca3af;
  font-weight: 400;
}

.btn-primary {
  display: block;
  width: 100%;
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 18px 24px;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  margin-top: 32px;
  letter-spacing: 0.5px;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.btn-primary:hover {
  background: var(--accent);
  transform: translateY(-2px);
  /* box-shadow: 
    0 15px 35px rgba(245, 158, 11, 0.3),
    0 5px 15px rgba(245, 158, 11, 0.2); */
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:active { 
  transform: translateY(0px);
  transition: transform 0.1s;
}

.alert {
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 20px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid transparent;
}
.alert-error { 
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%); 
  color: #dc2626; 
  border-color: #fca5a5;
}
.alert-success { 
  background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%); 
  color: #16a34a;
  border-color: #86efac;
}

.auth-alt { 
  text-align: center; 
  margin-top: 24px; 
  font-size: 14px; 
  color: #6b7280;
}
.auth-alt a { 
  color: #4a90e2; 
  font-weight: 600; 
  text-decoration: none;
  transition: color 0.2s ease;
}
.auth-alt a:hover { 
  color: #2563eb;
  text-decoration: underline; 
}

/* ==========================================
   Design enhancements to match reference UI
   (appended to override earlier rules safely)
   ========================================== */

/* Theme tokens */
:root {
  --bg: #f5f5f5;
  --surface: #ffffff;
  --text: #1a1a1a;
  --muted: #666666;
  --primary: #1a1a1a;
  --accent: #4a90e2;
  --radius: 18px;
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.08);
  --shadow-md: 0 6px 20px rgba(0,0,0,0.12);
}

@media (max-width: 767px) {
  body { background: linear-gradient(180deg, #f7f7fb 0%, #f5f5f5 60%) fixed; }
}

/* Header polish */
.top-header { border-bottom: 1px solid rgba(0,0,0,0.04); }
.avatar { box-shadow: 0 2px 8px rgba(0,0,0,0.12); }

/* Daily challenge card */
.challenge-card {
  background: linear-gradient(180deg, #bda5ff 0%, #e9e1fc 100%);
  border: 1px solid rgba(0,0,0,0.03);
  box-shadow: var(--shadow-sm);
}
.challenge-card h2 { font-size: 22px; color: var(--text); }
.challenge-card p { color: #4a4a4a; margin-bottom: 12px; }

/* Overlapping avatars */
.avatars { display:flex; align-items:center; }
.avatars img {
  width: 30px; height: 30px; border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}
.avatars span { margin-left: 12px; font-size: 13px; color: #555; }

/* Date selector pills */
.date-box {
  background: #fff; border-radius: 14px; padding: 8px 10px; width: 58px;
  border: 1px solid rgba(0,0,0,0.06); box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.date-box.active { background: #1a1a1a; color:#fff; box-shadow: 0 6px 16px rgba(0,0,0,0.18); }
.date-box .dow { display:block; font-size: 12px; color:#666; }
.date-box.active .dow { color:#ddd; }
.date-box .dom { display:block; font-weight:700; font-size: 16px; margin-top: 2px; }

/* Plan section + cards */
.your-plan h3 { color: var(--text); letter-spacing: 0.2px; }
.plan-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid rgba(0,0,0,0.04);
  box-shadow: var(--shadow-sm);
}
.plan-card .left small { color:#555; }

/* Floating card image */
@media (max-width: 767px) {
  .card-image img { animation: floatY 6s ease-in-out infinite; }
}

/* Glassy bottom nav */
.bottom-nav {
  background: rgba(26,26,26,0.92);
  padding: 12px 16px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
  backdrop-filter: blur(8px) saturate(120%);
}
.nav-icon { 
  background: transparent; 
  position: relative;
}
.nav-item.active .nav-icon { background: linear-gradient(180deg, #fff, #eaeaea); }

/* Notification Badge */
.notification-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #ef4444;
  color: white;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Primary button polish */
.btn-primary { background: var(--primary); }
@media (max-width: 767px) {
  .btn-primary { background-image: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0)); }
}

/* Badges */
.badge { font-size: 12px; padding: 6px 10px; border-radius: 999px; font-weight: 600; display:inline-block; }
.badge-medium { background:#ffe2b8; color:#6d3c00; }
.badge-light { background:#d9eeff; color:#0d4d7a; }
.badge-focus { background:#dbffe8; color:#0e5b35; }

/* Mobile-only animations */
@media (max-width: 767px) {
  .animate-in { opacity: 0; animation: slideUp 0.6s ease forwards; }
  .delay-1 { animation-delay: 0.08s; }
  .delay-2 { animation-delay: 0.16s; }
  .delay-3 { animation-delay: 0.24s; }
  .delay-4 { animation-delay: 0.32s; }
  .top-header { position: sticky; top:0; z-index:1000; background: rgba(255,255,255,0.92); backdrop-filter: blur(6px); }
}
@keyframes slideUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes floatY { 0% { transform: translateY(0); } 50% { transform: translateY(-4px); } 100% { transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .animate-in, .card-image img { animation: none !important; opacity: 1 !important; } }

/* ========================================
   HOME PAGE REDESIGN STYLES
   ======================================== */

/* Stats Overview */
.stats-overview {
  padding: var(--space-4);
  margin-bottom: var(--space-2);
}

.stats-card {
  background: linear-gradient(135deg, #7c91ee 0%, #764ba2 100%);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  color: var(--text-inverse);
  position: relative;
  overflow: hidden;
}

.stats-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>');
  pointer-events: none;
}

.stats-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-5);
  position: relative;
  z-index: 2;
}

.stats-info h2 {
  margin: 0 0 var(--space-1) 0;
  font-size: var(--font-size-2xl);
  font-weight: 700;
  color: #000;
}

.stats-info p {
  margin: 0;
  font-size: var(--font-size-sm);
  color: rgba(0, 0, 0, 0.8);
  font-weight: 400;
}

.stats-badge {
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  /* border: 1px solid rgba(255, 255, 255, 0.3); */
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-2xl);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  white-space: nowrap;
}

.stats-badge i {
  font-size: var(--font-size-lg);
  color: #000;
}

.stats-badge span {
  font-size: var(--font-size-base);
  font-weight: 600;
  color: #000;
}

.progress-indicators {
  position: relative;
  z-index: 2;
}

.activity-dots {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.activity-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  position: relative;
  border: 2px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: 20px 20px;
  background-position: center;
  background-repeat: no-repeat;
}

.activity-dot.instromen {
  background-color: rgba(255, 229, 165, 0.9);
  background-image: url('/assets/images/instromen.png');
}

.activity-dot.verbinding {
  background-color: rgba(205, 231, 247, 0.9);
  background-image: url('/assets/images/verbinding-oee.png');
}

.activity-dot.hier-nu {
  background-color: rgba(180, 255, 205, 0.9);
  background-image: url('/assets/images/verbinding-hier-nu.png');
}

.more-count {
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  /* border: 1px solid rgba(255, 255, 255, 0.3); */
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-lg);
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: #000;
  margin-left: var(--space-2);
}

/* Meditation Programs */
.meditation-programs {
  padding: var(--space-4);
}

.section-header {
  margin-bottom: var(--space-6);
}

.section-header h3 {
  margin: 0 0 var(--space-2) 0;
  font-size: var(--font-size-2xl);
  font-weight: 700;
  color: var(--text-primary);
}

.section-description {
  margin: 0;
  font-size: var(--font-size-base);
  color: var(--text-secondary);
  font-weight: 400;
}

.programs-grid {
  display: grid;
  gap: var(--space-8);
}

.program-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: visible;
  
}

.program-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.program-card.instromen-card {
  background: linear-gradient(135deg, #ffe5a5 0%, #caa843 100%);
}

.program-card.oee-card {
  background: linear-gradient(135deg, #cde7f7 0%, #4980a4 100%);
}

.program-card.hier-nu-card {
  background: linear-gradient(135deg, #b4ffcd 0%, #388c4e 100%);
}

.program-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

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

.program-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  position: relative;
  z-index: 2;
}

.program-info {
  flex: 1;
  padding-right: var(--space-12);
}

.program-info h4 {
  margin: 0 0 var(--space-2) 0;
  font-size: var(--font-size-xl);
  font-weight: 600;
  color: var(--text-primary);
}

.program-info p {
  margin: 0 0 var(--space-4) 0;
  font-size: var(--font-size-base);
  color: var(--text-secondary);
  line-height: var(--line-height-relaxed);
}

.program-meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.tag {
  background: rgba(255, 255, 255, 0.3);
  color: var(--text-primary);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-2xl);
  font-size: var(--font-size-xs);
  font-weight: 500;
  text-transform: lowercase;
}

.duration {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  font-weight: 500;
}

.program-image {
  position: absolute;
  top: -40px;
  right: -10px;
  width: 100px;
  height: 100px;
  flex-shrink: 0;
  z-index: 3;
}

.program-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
}

/* Responsive Design */
@media (max-width: 768px) {
  .stats-header {
    flex-direction: column;
    gap: var(--space-4);
    align-items: flex-start;
  }
  
  .stats-badge {
    align-self: flex-start;
  }
  
  .activity-dots {
    justify-content: flex-start;
  }
  
  .program-info {
    padding-right: 5rem;
  }
  
  /* .program-image {
    width: 60px;
    height: 60px;
    top: -10px;
    right: var(--space-3);
  } */
}

/* ========================================
   MEDITATION PAGE STYLES
   ======================================== */

/* Meditation Header */
.meditation-header {
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border);
  position: relative;
}

.header-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.back-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  text-decoration: none;
  padding: var(--space-2);
  border-radius: 50%;
  transition: all 0.3s ease;
  position: absolute;
  left: 0;
  z-index: 2;
  color: var(--text-primary);
}

.back-btn:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
}

.meditation-header h1 {
  margin: 0;
  font-size: 1.5rem;
  color: var(--text-primary);
  font-weight: 600;
  position: relative;
  z-index: 2;
}

.header-logo {
  position: absolute;
  right: 0;
  display: flex;
  align-items: center;
  /* opacity: 0.6; */
}

.meditation-logo {
  width: 100px;
  height: 100px;
  object-fit: cover;
}

/* Play Buttons */
.play-btn {
  background: var(--success);
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--text-inverse);
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.play-btn:hover {
  background: #059669;
  transform: scale(1.05);
}

.play-btn.playing {
  background: var(--error);
}

/* Play Section */
.play-section {
  padding: var(--space-5);
  margin-bottom: var(--space-3);
}

.play-btn-full {
  width: 100%;
  background: var(--success);
  border: none;
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-6);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-inverse);
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-lg);
  font-family: var(--font-family);
}

.play-btn-full:hover {
  /* background: #059669; */
  /* transform: translateY(-2px); */
   box-shadow: var(--shadow-lg);
}

.play-btn-full:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.play-btn-full.playing {
  background: var(--error);
}

.play-btn-full.playing:hover {
  background: #dc2626;
}

.play-btn-full.loading {
  background: var(--warning);
  cursor: wait;
  pointer-events: none;
}

.play-btn-full.loading i {
  animation: spin 1s linear infinite;
}

.play-btn-full.playing {
  background: linear-gradient(135deg, var(--error) 0%, #dc2626 100%);
  transform: scale(1.02);
  box-shadow: var(--shadow-lg);
}

.play-btn-full.playing:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  transform: scale(1.05);
  box-shadow: var(--shadow-xl);
}

.play-btn-full i {
  font-size: 1.25rem;
}

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

/* Error state styling */
.play-btn-full i.bi-exclamation-triangle {
  color: #fbbf24;
}

/* Audio progress indicator */
.audio-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.8);
  transition: width 0.1s ease;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  width: 0%;
}

.play-btn-full.playing .audio-progress {
  display: block;
}

/* Introduction Section */
.intro-section {
  padding: var(--space-5);
  background: var(--background-subtle);
  margin-bottom: 0;
}

.intro-content {
  text-align: center;
  max-width: 100%;
}

.intro-content h2 {
  margin: 0 0 var(--space-4) 0;
  font-size: 1.375rem;
  color: var(--text-primary);
  font-weight: 600;
}

.intro-content p {
  margin: 0;
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Presets Section */
.presets-section {
  padding: var(--space-4);
  /* margin-bottom: var(--space-3); */
}

.presets-card {
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  /* background: #ffe5a5; */
    background: linear-gradient(135deg, #ffe5a5 0%, #caa843 100%);
}

.presets-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.05"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  pointer-events: none;
}

.presets2-card {
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  /* background: #cde7f7; */
  background: #01a9e8;
}

.presets2-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.05"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  pointer-events: none;
}

.presets2-card::after {
  content: '';
  position: absolute;
  top: -20px;
  right: -20px;
  width: 80px;
  height: 80px;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
}

.presets-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-6);
  position: relative;
  z-index: 2;
}

.presets2-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 2;
}

.header-content {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.header-icon {
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.header-icon i {
  font-size: 1.5rem;
  color: var(--text-inverse);
}

.header-text h3 {
  margin: 0 0 var(--space-1) 0;
  font-size: 1.375rem;
  color: white;
  font-weight: 700;
}

.header-text p {
  margin: 0;
  font-size: 0.875rem;
  color: white;
  font-weight: 400;
}

.duration-badge {
  background: rgba(255, 255, 255, 0.4);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-2xl);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.duration-badge i {
  font-size: 1rem;
  color: var(--text-primary);
}

.duration-badge span {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.presets-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 100%;
}

.preset-card {
  /* background: rgba(255, 255, 255, 0.4); */
  background: #fff;
  /* border: 1px solid rgba(255, 255, 255, 0.2); */
  border: 1px solid #f0f0f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
  min-height: 110px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  box-sizing: border-box;
}

.preset-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s ease;
}

.preset-card:hover::before {
  left: 100%;
}

.preset-card:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: var(--shadow-lg);
}

.preset-card.active {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: var(--shadow-md);
}

.preset-card.active .preset-indicator {
  opacity: 1;
  transform: scale(1);
}

.preset-icon {
  width: 45px;
  height: 45px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-3);
  transition: all 0.3s ease;
  align-self: flex-start;
}

.preset-card:hover .preset-icon {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.preset-icon i {
  font-size: 1.25rem;
  color: var(--text-primary);
}

.preset-info h4 {
  margin: 0 0 var(--space-1) 0;
  font-size: 1rem;
  color: var(--text-primary);
  font-weight: 600;
}

.preset-duration {
  font-size: 0.8125rem;
  color: var(--text-primary);
  font-weight: 500;
}

.preset-indicator {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  width: 12px;
  height: 12px;
  background: var(--success);
  border-radius: 50%;
  opacity: 0;
  transform: scale(0);
  transition: all 0.3s ease;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

/* Options Section */
.options-section {
  padding: 0 0 var(--space-5) 0;
}

.options-section > h3 {
  padding: var(--space-5);
  margin: 0;
  font-size: 1.375rem;
  color: var(--text-primary);
  background: var(--background-subtle);
  text-align: center;
}

/* Duration display styling */
.duration-display {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
  background: rgba(255, 255, 255, 0.7);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  backdrop-filter: blur(10px);
}

.duration-display span {
  color: var(--secondary);
  font-weight: 600;
}

/* Meditation Cards */
.meditation-cards {
  padding: 0 var(--space-4);
}

.meditation-card {
  border-radius: var(--radius-lg);
  width: 100%;
  /* margin-bottom: var(--space-3); */
}

.meditation-card.light {
  /* background: #cde7f7; */
  
}

.card-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: var(--radius-lg); 
  padding: var(--space-4);
  /* background: rgba(255, 255, 255, 0.4); */
  background: linear-gradient(135deg, #017bb5 0%, #015a8a 100%);
  /* border-bottom: 1px solid #fff; */
  gap: 15px;
}

.card-content h4 {
  text-align: left;
  margin: 0;
  font-size: 1rem;
  color: #fff;
  font-weight: normal;
  flex: 1;
  line-height: 1.4;
  min-width: 0; /* Allow text to shrink */
}

.sub-selector {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0; /* Prevent selector from shrinking */
  justify-content: flex-end;
}

.sub-selector label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
  min-width: auto;
}

.sub-selector select {
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  font-size: 1rem;
  color: var(--text-primary);
  min-width: 120px;
  font-family: var(--font-family);
}

/* Responsive Design for Meditation Cards */
@media (max-width: 768px) {
  .card-content {
    padding: 14px;
    gap: 12px;
  }
  
  .card-content h4 {
    font-size: 0.95rem;
    line-height: 1.3;
  }
  
  .sub-selector select {
    min-width: 110px;
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  .card-content {
    padding: 12px;
    gap: 10px;
  }
  
  .card-content h4 {
    font-size: 0.875rem;
    line-height: 1.3;
  }
  
  .sub-selector select {
    min-width: 100px;
    font-size: 0.875rem;
    padding: 6px 8px;
  }
}

/* Animation classes */
.fade-in {
  animation: fadeIn 0.3s ease-in-out;
}

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

/* Toggle switches for options */
.option-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.option-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--border-strong);
  transition: 0.3s;
  border-radius: 24px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: var(--surface);
  transition: 0.3s;
  border-radius: 50%;
}

input:checked + .toggle-slider {
  background-color: var(--success);
}

input:checked + .toggle-slider:before {
  transform: translateX(20px);
}

.header-content {
    flex-direction: column;
    gap: var(--space-3);
  } 

/* Responsive Design */
@media (max-width: 768px) {
  .presets-container {
    grid-template-columns: 1fr 50%;
  }
  
  .presets-header, .presets2-header {
    flex-direction: column;
    gap: var(--space-4);
    text-align: center;
  }
  
  
  
  .sub-selector {
    /* width: 100%; */
    justify-content: center;
  }
  
  .sub-selector select {
    width: 100%;
    min-width: auto;
  }
}

@media (max-width: 480px) {
  .presets-container {
    grid-template-columns: repeat(2, 1fr);
  }
}