*{box-sizing:border-box;}
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.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);
}

/* 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;
  }
}

/* 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: #6c757d;
    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: #2c3e50;
}

.page-title-corner {
    font-weight: 700;
    color: #2c3e50;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* --- Gray Content Box (The Core UI Container) --- */
.gray-card {
    background-color: #f3f4f6; /* Soft gray background */
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03); /* Very subtle shadow */
}
.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: #444;
}

.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 #ccc;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    box-sizing: border-box; /* Important for padding */
    resize: vertical;
}

textarea.form-control:focus {
    outline: none;
    border-color: #4facfe;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.2);
}

/* 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%;
    padding: 14px 20px;
    background-color: #1e293b; /* Dark slate to match nav buttons */
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1.5rem;
    box-shadow: 0 4px 10px rgba(30, 41, 59, 0.2);
}
.btn-primary:hover {
    background-color: #334155;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(30, 41, 59, 0.3);
}
.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;
}

/* 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 #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;
}
