*{box-sizing:border-box;}
:root {
    --bg-primary: #0B0F14;
    --bg-secondary: #111827;
    --bg-elevated: #1A2330;
    --text-primary: #E6EDF3;
    --text-secondary: #9AA6B2;
    --text-muted: #6B7280;
    --border-subtle: rgba(255,255,255,0.08);
    --glow-neutral: rgba(255,255,255,0.15);
    --motivation-1: #FF7A18;
    --motivation-2: #FFB347;
    --motivation-glow: rgba(255,140,60,0.35);
    --energy-1: #00C9A7;
    --energy-2: #4FACFE;
    --energy-glow: rgba(0,200,180,0.30);
    --support-1: #A78BFA;
    --support-2: #FBC2EB;
    --support-glow: rgba(180,150,255,0.30);
    --growth-1: #22C55E;
    --growth-2: #A3E635;
    --growth-glow: rgba(100,255,120,0.30);
    --vision-1: #6366F1;
    --vision-2: #8B5CF6;
    --vision-glow: rgba(120,100,255,0.35);
}
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #ffffff;
    color: #333;
    line-height: 1.6;
    margin: 0;
    padding: 0;
}
body.bg-white {
    background-color: #ffffff ;								
}
body.checkin-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at top, rgba(99, 102, 241, 0.18), transparent 36%),
        radial-gradient(circle at 85% 15%, rgba(0, 201, 167, 0.12), transparent 24%),
        linear-gradient(180deg, var(--bg-primary) 0%, #0d131d 55%, #0f1724 100%);
    color: var(--text-primary);
}
body.checkin-page:not(.dark-mode) {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-elevated: #ffffff;
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-muted: #6b7280;
    --border-subtle: rgba(17, 24, 39, 0.14);
    --glow-neutral: rgba(99, 102, 241, 0.14);
    background:
        radial-gradient(circle at top, rgba(99, 102, 241, 0.10), transparent 36%),
        radial-gradient(circle at 85% 15%, rgba(0, 201, 167, 0.08), transparent 24%),
        linear-gradient(180deg, #ffffff 0%, #f8fafc 55%, #eef2f7 100%);
    color: var(--text-primary);
}
body.landing-page{
  background:#ffffff;color:#000000;min-height:100%;
  display:flex;flex-direction:column;align-items:center;justify-content:space-between;
  padding:1rem;text-align:center;position:relative;
  overflow-y: auto; 
  /* Prevent horizontal scroll if mirror slightly exceeds viewport */
  overflow-x: hidden;
}

body.landing-page .mirror { pointer-events: auto; }

.mirror::before,
.mirror::after,
.mirror .sheen,
.mirror .glow {
  pointer-events: none !important;
}

/* Content above the mirror background */
.mirror .card { position: relative; z-index: 3; }

/* Set the content card to be 90% of the mirror frame */
.mirror .card {
  width: 100%;
  /* CHANGED: switched from height:100% to auto so it centers vertically */
  height: auto;
  max-height: 90%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.mirror { scrollbar-gutter: stable; }

/* WORD CLOUD */
#cloudContainer{
  position:fixed;top:0;left:0;width:100%;height:100vh;display:flex;flex-direction:column;
  align-items:stretch;gap:6px;padding:4px 6px;z-index:0;pointer-events:none;
}
#cloudContainer .word{white-space:nowrap;font-weight:600;line-height:1;user-select:none;transition:color 0.25s ease;}
@media (max-width:420px){#cloudContainer{height:100vh;grid-auto-rows:24px;}}
.cloud-row{display:grid;grid-template-columns:repeat(var(--base-cols,14),1fr);align-items:center;column-gap:8px;min-height:26px;}
.cloud-row .word{white-space:nowrap;font-weight:600;line-height:1;user-select:none;}

/* BUTTONS */
.button-container{
  display:flex;flex-direction:row;gap:1rem;width:100%;max-width:400px;margin:0 auto;padding:1rem;
  justify-content:center;position:relative;z-index:5;background:transparent;
}
.nav-button{
  background:#ffffff;color:#1e293b;padding:1rem 1.2rem;font-size:1rem;font-weight:600;
  border:3px solid #1e293b;border-radius:12px;text-decoration:none;text-align:center;
  transition:all 0.3s ease;box-shadow:0 4px 15px rgba(30,41,59,0.2);
  display:block;flex:1;max-width:120px;cursor:pointer;user-select:none;
  -webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;min-height:50px;line-height:1.2;
}
.nav-button:hover{background:#1e293b;color:#ffffff;transform:translateY(-2px);box-shadow:0 6px 20px rgba(30,41,59,0.3);}
.nav-button:active{transform:translateY(0);}

.btn{position:relative;display:inline-flex;align-items:center;justify-content:center;padding: 0.75rem 1.5rem;min-height:3.75rem;border:2px solid #111;border-radius:16px;text-decoration:none;font-weight:600;background:linear-gradient(145deg,#ffffff,#e5e5e5);color:#111;box-shadow:4px 4px 10px rgba(0,0,0,0.2),-4px -4px 10px rgba(255,255,255,0.6);transition:transform 0.1s, box-shadow 0.1s, opacity 0.2s;}
.btn:active{transform:translateY(2px);}
.btn::after{content:"";position:absolute;top:0;left:0;width:100%;height:100%;background:linear-gradient(60deg,rgba(255,255,255,0.6),rgba(255,255,255,0) 70%);border-radius:16px;pointer-events:none;}
.btn .generating-msg{position:absolute;bottom:4px;right:6px;font-size:.75rem;color:#555;pointer-events:none;}
.btn.start-here{border-color:#ff9800;box-shadow:0 0 12px #ff9800;animation:pulse 1.5s infinite;}
.start-here-tag{position:absolute;top:-10px;right:-10px;background:#ff9800;color:#fff;padding:2px 6px;border-radius:8px;font-size:.7rem;font-weight:700;}
@keyframes pulse{0%,100%{box-shadow:0 0 12px #ff9800;}50%{box-shadow:0 0 20px #ff9800;}}

/* ==== MIRROR CENTER + ICONS ==== */

/* Center container */
/* 1. DESKTOP DEFAULT (Keep your existing 3/4 ratio) */
.mirror-wrapper {
  position: fixed; 
  top: 50%; 
  left: 50%; 
  transform: translate(-50%, -50%);
  z-index: 10; 
  display: flex; 
  align-items: center; 
  justify-content: center;
  
  width: min(80vw, 400px);
  aspect-ratio: 3 / 4; 
}

/* 2. SMARTPHONE OVERRIDE (Switch to tall native ratio) */
@media (max-width: 768px) {
  .mirror-wrapper {
    /* Use the specific numbers you asked for (or native 400/865) */
    aspect-ratio: 400 / 865; 
    
    /* Crucial: Prevent the tall mirror from getting cut off on small screens */
    max-height: 85vh; 
    
    /* Allow width to shrink automatically if the height is constrained */
    width: auto; 
    
    /* Ensure it never exceeds screen width even if height allows it */
    max-width: 80vw;
    
    /* Ensure height calculates based on aspect ratio unless hit by max-height */
    height: 100%;
  }
}

/* Mirror Frame */
.mirror{
  position:relative;
  
  /* EXPANDED SIZE: Made 12% larger than the wrapper to let corners stick out */
  width: 112%;
  height: 112%;
  flex-shrink: 0; /* Ensures it stays big and doesn't shrink to fit wrapper */
  
  /* Adjusted padding to match the larger scale */
  /* CHANGED: Increased left padding (25%) to push content away from nav icons. 
     Reduced right padding slightly to 10% to keep card width reasonable. */
  padding: 12% 25% 12% 25%; 
  
  background: url('/static/mirror.png') no-repeat center center;
  background-origin: border-box;
  /* Fills the new larger element completely */
  background-size: 100% 100%; 
  
  border:none;
  box-shadow:0 0 25px rgba(0,0,0,0.3);

  display:flex; flex-direction:column; align-items:center; justify-content:center;
  overflow-y:auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  text-align: initial;
}

/* === NEW: NAVIGATION RAIL === */
/* This container lines up the icons vertically on the left side */
.nav-rail {
  position: absolute;
  /* 14% is relative to the mirror's width. Since mirror is now wider, 
     this ensures it stays comfortably on the glass area. */
  left: 14%; 
  
  top: 50%;
  transform: translateY(-50%); 
  
  display: flex;
  flex-direction: column;
  gap: 0.75rem; 
  z-index: 20;
}

/* Right Navigation Rail */
.nav-rail-right {
  position: absolute;
  right: 14%;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 20;
}

/* Individual Icon Style */
.nav-icon {
  width: 42px;  /* Adjust size as needed */
  height: 42px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
  transition: transform 0.2s ease;
  display: block;
}

.nav-icon:hover {
  transform: scale(1.1);
}

.landing-onboarding {
  position: absolute;
  inset: 0;
  z-index: 35;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  pointer-events: auto;
  background: rgba(248, 250, 252, 0.78);
  backdrop-filter: blur(12px);
  border-radius: inherit;
}

.landing-onboarding[hidden] {
  display: none;
}

.onboarding-dismiss {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(15, 23, 42, 0.18);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: #1f2937;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.16);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}

.onboarding-dismiss:hover,
.onboarding-dismiss:focus-visible {
  outline: none;
  border-color: rgba(15, 23, 42, 0.38);
  transform: translateY(-1px);
}

.onboarding-panel {
  width: min(100%, 360px);
  padding: 22px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  color: #0f172a;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.2);
  text-align: left;
}

.onboarding-panel[hidden] {
  display: none;
}

.onboarding-progress {
  display: flex;
  gap: 6px;
  margin-bottom: 18px;
}

.onboarding-progress span {
  flex: 1;
  height: 5px;
  border-radius: 999px;
  background: #dbe3ee;
}

.onboarding-progress span.active {
  background: #1e293b;
}

.onboarding-kicker {
  margin: 0 0 6px;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.onboarding-panel h1 {
  margin: 0;
  color: #0f172a;
  font-size: 1.75rem;
  line-height: 1.05;
  letter-spacing: 0;
}

.onboarding-panel p {
  margin: 10px 0 18px;
  color: #334155;
  font-size: 1rem;
  line-height: 1.4;
}

.onboarding-actions {
  display: grid;
  gap: 10px;
}

.onboarding-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.onboarding-choice {
  width: 100%;
  min-height: 70px;
  padding: 14px;
  border: 2px solid #1e293b;
  border-radius: 8px;
  background: #ffffff;
  color: #0f172a;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
  text-align: left;
  box-shadow: 0 4px 0 #1e293b;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.onboarding-choice span {
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.1;
}

.onboarding-choice small {
  color: #475569;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.2;
}

.onboarding-choice:hover,
.onboarding-choice:focus-visible {
  outline: none;
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #1e293b;
  background: #f8fafc;
}

.onboarding-choice:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #1e293b;
}

/* Hide on very small screens if they overlap content too much */
@media (max-width: 360px) {
  .nav-rail {
    gap: 0.5rem;
    left: 12%; 
  }
  .nav-rail-right {
    gap: 0.5rem;
    right: 12%; 
  }
  .nav-icon {
    width: 32px;
    height: 32px;
  }
}

@media (max-width: 640px) {
  .landing-onboarding {
    inset: 0;
    padding: 12px;
  }

  .onboarding-dismiss {
    top: 8px;
    right: 8px;
  }

  .onboarding-panel {
    width: min(100%, 330px);
    padding: 18px;
  }

  .onboarding-panel h1 {
    font-size: 1.42rem;
  }

  .onboarding-panel p {
    font-size: 0.92rem;
  }

  .onboarding-choice {
    min-height: 62px;
    padding: 12px;
  }

  .onboarding-choice span {
    font-size: 0.96rem;
  }
}

/* Language switcher (top-right) */
.language-switcher {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
  z-index: 20;
}
.language-toggle {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 2px solid rgba(15, 23, 42, 0.3);
  background: rgba(255, 255, 255, 0.92);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.18);
  color: inherit;
}
.language-toggle:hover,
.language-toggle:focus-visible {
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.28);
  border-color: rgba(15, 23, 42, 0.55);
}
.language-switcher.open .language-toggle {
  border-color: rgba(37, 99, 235, 0.6);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.25);
}
.language-dropdown {
  display: none;
  flex-direction: column;
  align-items: stretch;
  gap: 0.25rem;
  min-width: 9rem;
  padding: 0.45rem 0.55rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.28);
}
.language-switcher.open .language-dropdown {
  display: flex;
}
.lang-flag {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.35rem 0.55rem;
  border-radius: 0.65rem;
  text-decoration: none;
  color: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  opacity: 0.85;
  transition: background 0.2s ease, opacity 0.2s ease;
}
.lang-flag:hover,
.lang-flag:focus-visible {
  outline: none;
  background: rgba(59, 130, 246, 0.12);
  opacity: 1;
}
.lang-flag.active {
  background: rgba(59, 130, 246, 0.18);
  opacity: 1;
}

/* Privacy tooltip (bottom-right) */
.privacy-wrapper{ position:absolute; bottom:8px; right:8px; z-index:20; }
.privacy-icon{ font-size:1.3rem; cursor:pointer; display:inline-block; }
.privacy-tooltip{
  display:none; position:absolute; bottom:100%; right:0; background:#fff; color:#111;
  border:1px solid #111; border-radius:6px; padding:4px 8px; font-size:0.75rem;
  white-space:nowrap; margin-bottom:4px; box-shadow:0 2px 6px rgba(0,0,0,0.2);
}
.privacy-icon:hover + .privacy-tooltip,
.privacy-icon:focus + .privacy-tooltip{ display:block; }

/* Progress bars */
.bars{display:flex;gap:4px;margin:10px 0;}
.bar{flex:1;height:6px;background:#e5e7eb;border-radius:3px;}
.bar.done{background:#22c55e;}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}
.checkin-wrapper {
    padding-top: 30px;
    padding-bottom: 50px;
}
/* --- 1. Progress Bar Styling --- */
.progress-section {
    margin-bottom: 25px;
}
/* --- Header Row (Home & Title) --- */
.header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 0 5px;
}
.home-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s ease;
}
.home-link:hover {
    color: var(--text-primary);
}

.page-title-corner {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* --- Gray Content Box (The Core UI Container) --- */
.gray-card {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.96) 0%, rgba(11, 15, 20, 0.98) 100%);
    border-radius: 24px;
    padding: 40px;
    border: 1px solid var(--border-subtle);
    box-shadow: 0 24px 70px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.04);
}
.gray-card::before {
    content: "";
    position: absolute;
    inset: -15% auto auto -10%;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle at center, rgba(139, 92, 246, 0.18) 0%, rgba(99, 102, 241, 0.08) 52%, transparent 72%);
    pointer-events: none;
}
.gray-card::after {
    content: "";
    position: absolute;
    inset: auto -8% -18% auto;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle at center, rgba(79, 172, 254, 0.12) 0%, rgba(0, 201, 167, 0.06) 55%, transparent 74%);
    pointer-events: none;
}
body.checkin-page:not(.dark-mode) .gray-card {
    background: rgba(255, 255, 255, 0.94);
    border-color: var(--border-subtle);
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.12), inset 0 1px 0 rgba(255,255,255,0.72);
}
body.checkin-page:not(.dark-mode) .gray-card::before {
    background: radial-gradient(circle at center, rgba(139, 92, 246, 0.10) 0%, rgba(99, 102, 241, 0.05) 52%, transparent 72%);
}
body.checkin-page:not(.dark-mode) .gray-card::after {
    background: radial-gradient(circle at center, rgba(79, 172, 254, 0.10) 0%, rgba(0, 201, 167, 0.05) 55%, transparent 74%);
}
.progress-label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 5px;
    font-weight: 600;
}

.progress-track {
    width: 100%;
    height: 10px;
    background-color: #e9ecef; /* Light grey track */
    border-radius: 20px;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4facfe 0%, #00f2fe 100%); /* Nice gradient */
    border-radius: 20px;
    transition: width 0.4s ease-in-out;
}

/* --- 2. Feedback Box (Light Blue Box) --- */
.feedback-card {
    background-color: #e3f2fd; /* Softer blue */
    border: 1px solid #bbdefb;
    border-radius: 12px;
    padding: 20px;    
    margin-bottom: 10px; /* Base margin */
    color: #0d47a1;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.feedback-header {
    font-weight: bold;
    font-size: 0.95rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* --- 3. Spacing Utilities --- */
.mt-medium {
    margin-top: 25px;
}

.mt-large {
    margin-top: 40px; /* Big gap for readability */
}

/* --- Framework Section --- */
.section-title {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 10px;
}

/* --- 4 & 5. Button Styling (Radio to Button) --- */
.toggle-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* Hide the actual radio input */
.toggle-btn input[type="radio"] {
    display: none;
}

/* The visual button part */
.toggle-btn .btn-visual {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    background-color: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 50px; /* Pill shape */
    color: #555;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    min-width: 120px;
    text-align: center;
}

/* Hover State */
.toggle-btn .btn-visual:hover {
    border-color: #bbb;
    background-color: #f8f9fa;
    transform: translateY(-1px);
}

/* Checked/Active State */
.toggle-btn input[type="radio"]:checked + .btn-visual {
    background-color: #2c3e50; /* Primary brand color */
    color: white;
    border-color: #2c3e50;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* Specific styling for "Need Help" to make it pop if selected */
.toggle-btn input[value="yes"]:checked + .btn-visual {
    background-color: #e74c3c; /* Red/Orange for help */
    border-color: #e74c3c;
}

/* Mode Selector Specifics (Quick Dip vs Deep) */
.mode-selector .btn-visual {
    border-radius: 8px; /* Slightly squarer for mode selection */
    width: 100%;
    justify-content: center;
}

/* --- 6. General Question Area --- */
.question-section {
    background-color: white;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #eee;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.question-label {
    display: block;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.question-prompt {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: #000;
}

.input-wrapper {
    position: relative;
    width: 100%;
}

textarea.form-control {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    font-family: inherit;
    font-size: 1rem;
    box-sizing: border-box; /* Important for padding */
    resize: vertical;
    background: rgba(11, 15, 20, 0.58);
    color: var(--text-primary);
}

textarea.form-control:focus {
    outline: none;
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.16);
}

/* Submit Button */
.btn-submit {
    background-color: #4facfe;
    background-image: linear-gradient(to right, #4facfe 0%, #00f2fe 100%);
    border: none;
    color: white;
    padding: 12px 30px;
    font-size: 1.1rem;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 242, 254, 0.4);
}

/* Primary Button (Landing Page) */
.btn-primary {
    display: block;
    width: 100%;
    min-height: 58px;
    padding: 16px 20px;
    background-color: #1e293b; /* Dark slate to match nav buttons */
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 1.18rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1.5rem;
    box-shadow: 0 5px 0 #0f172a, 0 12px 24px rgba(30, 41, 59, 0.18);
}
.btn-primary:hover {
    background-color: #334155;
    transform: translateY(-2px);
    box-shadow: 0 7px 0 #0f172a, 0 16px 28px rgba(30, 41, 59, 0.26);
}
.btn-primary:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #0f172a, 0 8px 18px rgba(30, 41, 59, 0.2);
}
.btn-primary.success {
    background-color: #10b981; /* Green */
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
    pointer-events: none;
}

.feedback-li {
    background-color: #f9f9f9;
}

.dm-section {
    margin: 0 0 1.65rem;
    padding: 1.15rem;
    border-radius: 28px;
    border: 1px solid var(--border-subtle);
    background: rgba(255,255,255,0.02);
    backdrop-filter: blur(14px);
}

.dm-section legend {
    padding: 0 0.5rem;
    font-size: 0.98rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.question-block {
    position: relative;
    overflow: hidden;
    margin-bottom: 1.1rem;
    padding: 1.25rem;
    border-radius: 24px;
    border: 1px solid rgba(255,255,255,0.08);
    background: linear-gradient(180deg, rgba(26, 35, 48, 0.92) 0%, rgba(11, 15, 20, 0.9) 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 0 0 1px rgba(255,255,255,0.02), 0 18px 40px rgba(0,0,0,0.22);
}

body.checkin-page:not(.dark-mode) .dm-section {
    background: rgba(255,255,255,0.62);
    border-color: var(--border-subtle);
}

body.checkin-page:not(.dark-mode) .question-block {
    border-color: rgba(17, 24, 39, 0.10);
    background: linear-gradient(180deg, rgba(255,255,255,0.94) 0%, rgba(248,250,252,0.92) 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.88), 0 0 0 1px rgba(17,24,39,0.02), 0 14px 34px rgba(15,23,42,0.10);
}

.question-block::before,
.question-block::after {
    content: "";
    position: absolute;
    pointer-events: none;
}

.question-block::before {
    inset: 0;
    background:
        linear-gradient(135deg, var(--pattern-color-1, rgba(255,255,255,0.10)) 0%, var(--pattern-color-2, rgba(255,255,255,0.16)) 48%, rgba(11, 15, 20, 0.18) 100%);
    opacity: 0.22;
}

.question-block::after {
    inset: 0;
    opacity: 0.2;
}

.question-block .help {
    display: inline-block;
    margin-top: 0.4rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.answer-wrapper,
.question-label,
.checkin-date,
.answer-input {
    position: relative;
    z-index: 1;
}

.checkin-date {
    margin: 0 0 1rem;
    color: var(--text-secondary);
}

.answer-input {
    width: 100%;
    min-height: 110px;
    padding: 1rem 1.05rem;
    resize: vertical;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 18px;
    background: rgba(8, 12, 18, 0.6);
    color: var(--text-primary);
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

body.checkin-page:not(.dark-mode) .answer-input,
body.checkin-page:not(.dark-mode) textarea.form-control {
    background: #ffffff;
    border-color: rgba(17, 24, 39, 0.16);
    color: #111827;
    caret-color: #111827;
}

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

.answer-input:focus {
    outline: none;
    transform: translateY(-1px);
}

#submit-checkin-btn.btn {
    border: 1px solid rgba(99, 102, 241, 0.35);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.95), rgba(139, 92, 246, 0.92));
    color: #f8fbff;
    box-shadow: 0 0 34px rgba(120, 100, 255, 0.28);
}

#submit-checkin-btn.btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 0 40px rgba(120, 100, 255, 0.34);
}

#submit-checkin-btn.btn:disabled {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.06);
    color: var(--text-muted);
    box-shadow: none;
}

[data-dm-theme="general"] {
    --pattern-color-1: rgba(148, 163, 184, 0.16);
    --pattern-color-2: rgba(226, 232, 240, 0.24);
    --theme-glow: rgba(255,255,255,0.12);
}

[data-dm-theme="motivation"] {
    --pattern-color-1: var(--motivation-1);
    --pattern-color-2: var(--motivation-2);
    --theme-glow: var(--motivation-glow);
}

[data-dm-theme="motivation"].question-block::after {
    background: repeating-conic-gradient(from 0deg, rgba(255,179,71,0.14) 0deg 8deg, transparent 8deg 20deg);
    animation: dmMotivationPulse 7s ease-in-out infinite;
}

[data-dm-theme="energy"] {
    --pattern-color-1: var(--energy-1);
    --pattern-color-2: var(--energy-2);
    --theme-glow: var(--energy-glow);
}

[data-dm-theme="energy"].question-block::after {
    background: repeating-radial-gradient(circle at 50% 38%, rgba(79,172,254,0.14) 0 11px, transparent 11px 26px);
    animation: dmEnergyBreathe 6.5s ease-in-out infinite;
}

[data-dm-theme="support"] {
    --pattern-color-1: var(--support-1);
    --pattern-color-2: var(--support-2);
    --theme-glow: var(--support-glow);
}

[data-dm-theme="support"].question-block::after {
    background:
        radial-gradient(circle at 28% 34%, rgba(251,194,235,0.44) 0 2px, transparent 3px),
        radial-gradient(circle at 52% 25%, rgba(167,139,250,0.42) 0 2px, transparent 3px),
        radial-gradient(circle at 72% 44%, rgba(251,194,235,0.36) 0 2px, transparent 3px),
        radial-gradient(circle at 38% 66%, rgba(167,139,250,0.36) 0 2px, transparent 3px),
        linear-gradient(140deg, transparent 24%, rgba(205,180,255,0.16) 25%, transparent 26%),
        linear-gradient(18deg, transparent 48%, rgba(205,180,255,0.14) 49%, transparent 50%);
    animation: dmSupportBlink 8s ease-in-out infinite;
}

[data-dm-theme="growth"] {
    --pattern-color-1: var(--growth-1);
    --pattern-color-2: var(--growth-2);
    --theme-glow: var(--growth-glow);
}

[data-dm-theme="growth"].question-block::after {
    background: conic-gradient(from 210deg at 50% 42%, transparent 0deg, rgba(163,230,53,0.18) 68deg, rgba(34,197,94,0.18) 122deg, transparent 180deg, transparent 360deg);
    animation: dmGrowthRotate 10s linear infinite;
}

[data-dm-theme="vision"] {
    --pattern-color-1: var(--vision-1);
    --pattern-color-2: var(--vision-2);
    --theme-glow: var(--vision-glow);
}

[data-dm-theme="vision"].question-block::after {
    background: repeating-radial-gradient(circle at 50% 45%, rgba(139,92,246,0.16) 0 15px, transparent 15px 34px);
    animation: dmVisionZoom 8.5s ease-in-out infinite;
}

.dm-section[data-dm-theme] {
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03), 0 0 30px rgba(255,255,255,0.03);
}

.question-block[data-dm-theme] {
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 0 0 1px rgba(255,255,255,0.02), 0 0 40px var(--theme-glow, rgba(255,255,255,0.1)), 0 18px 40px rgba(0,0,0,0.22);
}

[data-dm-theme="motivation"] .answer-input:focus {
    border-color: rgba(255,179,71,0.58);
    box-shadow: 0 0 0 3px rgba(255,140,60,0.16), 0 0 28px rgba(255,140,60,0.18);
}

[data-dm-theme="energy"] .answer-input:focus {
    border-color: rgba(79,172,254,0.52);
    box-shadow: 0 0 0 3px rgba(0,200,180,0.14), 0 0 28px rgba(0,200,180,0.16);
}

[data-dm-theme="support"] .answer-input:focus {
    border-color: rgba(167,139,250,0.54);
    box-shadow: 0 0 0 3px rgba(180,150,255,0.16), 0 0 28px rgba(180,150,255,0.16);
}

[data-dm-theme="growth"] .answer-input:focus {
    border-color: rgba(163,230,53,0.48);
    box-shadow: 0 0 0 3px rgba(100,255,120,0.14), 0 0 28px rgba(100,255,120,0.16);
}

[data-dm-theme="vision"] .answer-input:focus {
    border-color: rgba(139,92,246,0.52);
    box-shadow: 0 0 0 3px rgba(120,100,255,0.16), 0 0 28px rgba(120,100,255,0.18);
}

@keyframes dmMotivationPulse {
    0%, 100% { transform: scale(1); opacity: 0.16; }
    50% { transform: scale(1.05); opacity: 0.26; }
}

@keyframes dmEnergyBreathe {
    0%, 100% { transform: scale(0.985); opacity: 0.16; }
    50% { transform: scale(1.02); opacity: 0.26; }
}

@keyframes dmSupportBlink {
    0%, 100% { opacity: 0.16; }
    50% { opacity: 0.3; }
}

@keyframes dmGrowthRotate {
    0% { transform: rotate(0deg); opacity: 0.16; }
    100% { transform: rotate(360deg); opacity: 0.2; }
}

@keyframes dmVisionZoom {
    0%, 100% { transform: scale(1); opacity: 0.16; }
    50% { transform: scale(1.04); opacity: 0.24; }
}

@media (max-width: 640px) {
    .container {
        padding: 14px;
    }

    .checkin-wrapper {
        padding-top: 18px;
        padding-bottom: 28px;
    }

    .gray-card {
        padding: 22px 16px;
        border-radius: 20px;
    }

    .header-row {
        gap: 12px;
        align-items: flex-start;
        flex-direction: column;
    }

    .tabs {
        flex-wrap: wrap;
    }

    .question-block::before {
        inset: 0;
    }
}

/* DARK MODE */
body.dark-mode {
    background-color: #121212;
    color: #e0e0e0;
}
body.landing-page.dark-mode {

    background-color: #000000;
}
body.dark-mode .card,
body.dark-mode .gray-card,
body.dark-mode .story,
body.dark-mode .question-section,
body.dark-mode .question-block,
body.dark-mode .goal-card,
body.dark-mode .feedback-card,
body.dark-mode .about-card,
body.dark-mode .question-card {
    background-color: #1e1e1e;
    color: #e0e0e0;
    border-color: #333;
}
body.dark-mode h1, body.dark-mode h2, body.dark-mode h3, body.dark-mode h4,
body.dark-mode .title, body.dark-mode .card-title, body.dark-mode .question-label,
body.dark-mode .page-title-corner {
    color: #e0e0e0 !important;
}
body.dark-mode .muted, body.dark-mode .hint, body.dark-mode .crumbs, body.dark-mode .crumbs a,
body.dark-mode .form-group label {
    color: #bbb !important;
}
body.dark-mode .form-control, body.dark-mode textarea, body.dark-mode input, body.dark-mode .answer-input {
    background-color: #2c2c2c;
    border-color: #444;
    color: #fff;
}
body.dark-mode a { color: #8ab4f8; }
body.dark-mode .nav-icon { filter: invert(1) drop-shadow(0 2px 4px rgba(0,0,0,0.2)); }
body.dark-mode .landing-onboarding {
    background: rgba(0, 0, 0, 0.72);
}
body.dark-mode .onboarding-panel,
body.dark-mode .onboarding-dismiss {
    background: rgba(24, 24, 24, 0.94);
    border-color: rgba(255,255,255,0.14);
    color: #e5e7eb;
    box-shadow: 0 12px 28px rgba(0,0,0,0.42);
}
body.dark-mode .onboarding-panel h1,
body.dark-mode .onboarding-dismiss {
    color: #f9fafb;
}
body.dark-mode .onboarding-panel p,
body.dark-mode .onboarding-kicker {
    color: #cbd5e1;
}
body.dark-mode .onboarding-progress span {
    background: #334155;
}
body.dark-mode .onboarding-progress span.active {
    background: #f8fafc;
}
body.dark-mode .onboarding-choice {
    background: #111827;
    border-color: #e5e7eb;
    color: #f9fafb;
    box-shadow: 0 4px 0 #e5e7eb;
}
body.dark-mode .onboarding-choice small {
    color: #cbd5e1;
}
body.dark-mode .onboarding-choice:hover,
body.dark-mode .onboarding-choice:focus-visible {
    background: #1f2937;
    box-shadow: 0 6px 0 #e5e7eb;
}
body.dark-mode #cloudContainer { display: none; }
body.dark-mode .btn-visual { background-color: #2c2c2c; border-color: #444; color: #e0e0e0; }
body.dark-mode .toggle-btn input[type="radio"]:checked + .btn-visual { background-color: #e0e0e0; color: #121212; }
body.dark-mode .num { background-color: #2c2c2c; border-color: #e0e0e0; color: #e0e0e0; }
body.dark-mode .row:hover { background-color: #2c2c2c; }
body.dark-mode .tab-btn { color: #bbb; border-color: #444; }
body.dark-mode .tab-btn:hover { background-color: #333; color: #fff; }
body.dark-mode .tab-btn.active { background-color: #e0e0e0; color: #000; border-color: #e0e0e0; }
body.dark-mode .msg.assistant { background-color: #2c2c2c; color: #e0e0e0; }
body.dark-mode .option-btn { background-color: #2c2c2c; border-color: #444; color: #e0e0e0; }
body.dark-mode .option-btn:hover { background-color: #333; }
body.dark-mode .feedback-li {
    background-color: #000000;
    border: 1px solid #333;
}
body.dark-mode .hud-container {
    background-color: #1e1e1e;
    color: #e0e0e0;
    border-color: #333;
}

body.checkin-page.dark-mode,
body.checkin-page {
    color: var(--text-primary);
}

body.checkin-page.dark-mode .gray-card,
body.checkin-page.dark-mode .question-block,
body.checkin-page.dark-mode .dm-section {
    background-color: transparent;
    border-color: var(--border-subtle);
}

body.checkin-page.dark-mode .answer-input,
body.checkin-page.dark-mode textarea.form-control {
    background: rgba(8, 12, 18, 0.6);
    border-color: rgba(255,255,255,0.08);
    color: var(--text-primary);
}

body.checkin-page.dark-mode .tab-btn {
    color: var(--text-secondary);
    border-color: var(--border-subtle);
}

body.checkin-page.dark-mode .tab-btn:hover {
    background: rgba(255,255,255,0.06);
    color: var(--text-primary);
}

body.checkin-page.dark-mode .tab-btn.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.24), rgba(139, 92, 246, 0.18));
    color: var(--text-primary);
    border-color: rgba(139, 92, 246, 0.42);
}
