/* ========== ROOT VARIABLES  ========== */

:root {
  /* Primary App Colors */
  --primary: #39E079;
  --bg-dark: #122017;
  --input-bg: #292D2B;
  
  /* Text Colors */
  --text-light: #ffffff;
  --text-secondary: #E9E9EB;
  --text-muted: #9ca3af;
  
  /* Error & Disabled */
  --error: #EF5350;
  --btn-disabled-bg: #1f2937;
  --btn-disabled-text: #6b7280;
  --input-border: #404040;

  /* Story Page Colors */
  --story-card-dark: #1E1E1E;
  --story-border-dark: #333333;
  --story-text-primary: #E0E0E0;
  --story-text-secondary: #888888;
  --story-negative: #fa5538;
  --story-emerald-bg: rgba(6, 78, 59, 0.3);
}



/* ========== GLOBAL BASE STYLES ========== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body, #root {
  min-height: 100vh;
  background-color: var(--bg-dark);
}

body {
  font-family: "Lexend", sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-light);
}

/* ========== WelcomePage ========== */

.welcome-section {
  width: 100%;
  min-height: 100vh;
  background-color: var(--bg-dark);
  font-family: "Lexend", sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.content-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 480px;
  width: 100%;
}

.icon-wrapper {
  margin-bottom: 24px;
}

.icon-wrapper .material-symbols-outlined {
  font-size: 70px;
  color: var(--primary);
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.title {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.subtitle {
  font-size: 15px;
  color: rgba(233, 233, 235, 0.7);
  line-height: 1.5;
}

.button-wrapper {
  max-width: 480px;
  width: 100%;
  margin-top: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.btn-primary {
  width: 100%;
  height: 52px;
  background-color: var(--primary);
  color: var(--bg-dark);
  font-size: 18px;
  font-weight: 700;
  font-family: "Lexend", sans-serif;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.btn-primary:hover {
  opacity: 0.9;
}

.login-link {
  margin-top: 16px;
  color: var(--primary);
  font-size: 14px;
  text-decoration: underline;
  cursor: pointer;
}

.login-link:hover {
  opacity: 0.8;
}

/* WelcomePage Mobile */
@media (max-width: 767px) {
  .welcome-section {
    justify-content: space-between;
    padding-top: 0;
    padding-bottom: 20px;
  }

  .content-wrapper {
    flex: 1;
    justify-content: center;
  }

  .icon-wrapper {
    margin-bottom: 16px;
  }

  .icon-wrapper .material-symbols-outlined {
    font-size: 56px;
  }

  .title {
    font-size: 28px;
    margin-bottom: 8px;
  }

  .subtitle {
    font-size: 14px;
  }

  .button-wrapper {
    margin-top: 0;
  }
}

/* ========== SelectLanguagePage ========== */

.language-section {
  width: 100%;
  min-height: 100vh;
  background-color: var(--bg-dark);
  font-family: "Lexend", sans-serif;
  color: var(--text-light);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.language-card {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
}

.main-container {
  width: 100%;
  padding: 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: center;
  align-items: center;
}

/* Desktop/Tablet - Card Box */
@media (min-width: 768px) {
  .language-section {
    padding: 40px 24px;
  }

  .language-card {
    background-color: var(--bg-dark);
    border: 1px solid #404040;
    border-radius: 24px;
    min-height: calc(100vh - 80px);
    padding: 0;
  }
}

/* Header Icon + Title */
.header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
}

.header .material-symbols-outlined {
  font-size: 40px;
  color: var(--primary);
}

.header-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
}

/* Main Heading */
.page-title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 5px;
  color: var(--text-light);
}

.page-subtitle {
  color: var(--text-muted);
  margin-top: 0;
  margin-bottom: 3rem;
}

/* Select Box */
.form-area {
  width: 100%;
}

.form-label {
  width: 100%;
  text-align: left;
  font-size: 16px;
  margin-bottom: 8px;
  display: block;
  color: var(--text-light);
}

.form-select {
  width: 100%;
  height: 52px;
  padding: 0 20px;
  border-radius: 50px;
  border: 1px solid #444;
  background-color: var(--input-bg);
  font-size: 16px;
  font-family: "Lexend", sans-serif;
  color: var(--text-light);
  outline: none;
  appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg fill="white" viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg"><path d="M181.66 170.34a8 8 0 0 1 0 11.32l-48 48a8 8 0 0 1-11.32 0l-48-48a8 8 0 0 1 11.32-11.32L128 212.69l42.34-42.35a8 8 0 0 1 11.32 0zM85.66 85.66L128 43.31l42.34 42.35a8 8 0 0 0 11.32-11.32l-48-48a8 8 0 0 0-11.32 0l-48 48A8 8 0 0 0 85.66 85.66z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 16px;
  cursor: pointer;
}

/* Button Bottom */
.button-area {
  width: 100%;
  max-width: 480px;
  padding: 0 24px 24px;
}

.btn-continue {
  width: 100%;
  height: 56px;
  border: none;
  border-radius: 50px;
  background-color: #1f2937;
  color: #6b7280;
  font-size: 17px;
  font-weight: 700;
  font-family: "Lexend", sans-serif;
  cursor: not-allowed;
  transition: all 0.2s ease;
}

.btn-continue.active {
  background-color: var(--primary);
  color: #000000;
  cursor: pointer;
}

.btn-continue.active:hover {
  background-color: #2ec96a;
}

/* SelectLanguagePage Mobile */
@media (max-width: 767px) {
  .language-section {
    padding: 0;
  }

  .language-card {
    min-height: 100vh;
    justify-content: space-between;
  }

  .main-container {
    padding: 16px;
    flex-grow: 1;
    justify-content: center;
  }

  .header {
    margin-bottom: 24px;
  }

  .header .material-symbols-outlined {
    font-size: 34px;
  }

  .header-title {
    font-size: 24px;
  }

  .page-title {
    font-size: 26px;
  }

  .page-subtitle {
    font-size: 14px;
    margin-bottom: 2rem;
  }

  .button-area {
    padding: 0 16px 20px;
  }
}

/* ========== RegistrationPage ========== */

.reg-section {
  width: 100%;
  min-height: 100vh;
  background-color: var(--bg-dark);
  font-family: "Lexend", sans-serif;
  color: var(--text-light);
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.reg-card {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.reg-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--input-border);
  position: sticky;
  top: 0;
  background-color: var(--bg-dark);
  z-index: 10;
}

.header-spacer {
  width: 48px;
}

.progress-bar {
  display: flex !important;
  flex-direction: row !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 20px 0 !important;
  width: 100%;
}

.progress-dot {
  height: 8px !important;
  width: 40px !important;
  min-width: 40px !important;
  border-radius: 50px !important;
  background-color: var(--input-bg) !important;
  display: inline-block !important;
}

.progress-dot.active {
  background-color: var(--primary) !important;
}

.reg-main {
  flex: 1;
  padding: 0 16px 24px;
}

.reg-title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 4px;
  padding-top: 16px;
  color: var(--text-light);
}

.reg-subtitle {
  color: var(--text-muted);
  margin-bottom: 24px;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text-light);
}

.reg-input {
  width: 100%;
  height: 56px;
  padding: 0 16px;
  border-radius: 50px;
  border: 1px solid var(--input-border);
  background-color: var(--input-bg);
  font-size: 16px;
  font-family: "Lexend", sans-serif;
  color: var(--text-light);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.reg-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(57, 224, 121, 0.2);
}

.reg-input::placeholder {
  color: var(--text-muted);
}

.reg-input.input-error {
  border-color: var(--error);
}

.reg-input.input-error:focus {
  box-shadow: 0 0 0 2px rgba(239, 83, 80, 0.2);
}

.reg-input.input-success {
  border-color: var(--primary);
}

.input-wrapper {
  position: relative;
}

.input-wrapper .reg-input {
  padding-right: 48px;
}

.input-wrapper.has-left-icon .reg-input {
  padding-left: 48px;
  padding-right: 88px;
}

.input-wrapper .left-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.input-wrapper .status-icon {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
}

.status-icon.error {
  color: var(--error);
}

.status-icon.success {
  color: var(--primary);
}

/* Password Toggle Icon */
.password-toggle-icon {
  position: absolute;
  right: 48px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 20px;
  user-select: none;
  z-index: 1;
}

.password-toggle-icon:hover {
  color: var(--text-light);
}

/* Location Fetch Icon */
.location-fetch-icon {
  position: absolute;
  right: 48px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--primary);
  cursor: pointer;
  font-size: 20px;
  user-select: none;
  z-index: 1;
}

.location-fetch-icon:hover {
  color: #2ec96a;
}

.error-text {
  color: var(--error);
  font-size: 14px;
  margin-top: 6px;
}

.row {
  display: flex;
  gap: 16px;
}

.row .form-group {
  flex: 1;
}

.gender-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.gender-btn {
  height: 52px;
  border-radius: 50px;
  border: 1px solid var(--input-border);
  background-color: var(--input-bg);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  font-family: "Lexend", sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
}

.gender-btn.active {
  background-color: var(--primary);
  border-color: var(--primary);
  color: var(--bg-dark);
}

.select-wrapper {
  position: relative;
}

.select-wrapper select {
  appearance: none;
  cursor: pointer;
}

.select-wrapper .select-arrow {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.checkbox-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 24px;
}

.checkbox-wrapper input[type="checkbox"] {
  width: 20px;
  height: 20px;
  min-width: 20px;
  margin-top: 2px;
  accent-color: var(--primary);
  cursor: pointer;
}

.checkbox-wrapper span {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
}

.checkbox-wrapper a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: underline;
}

.checkbox-error {
  color: var(--error) !important;
}

.checkbox-error a {
  color: var(--primary);
}

.reg-footer {
  padding: 24px 16px;
  border-top: 1px solid var(--input-border);
  background-color: var(--bg-dark);
}

.submit-btn {
  width: 100%;
  height: 56px;
  border: none;
  border-radius: 50px;
  background-color: var(--btn-disabled-bg);
  color: var(--btn-disabled-text);
  font-size: 16px;
  font-weight: 700;
  font-family: "Lexend", sans-serif;
  cursor: not-allowed;
  transition: all 0.2s ease;
}

.submit-btn.active {
  background-color: var(--primary);
  color: var(--bg-dark);
  cursor: pointer;
}

.submit-btn.active:hover {
  background-color: #2ec96a;
}

.login-text {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 16px;
}

.login-text span {
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
}

/* Registration Desktop */
@media (min-width: 768px) {
  .reg-section {
    padding: 40px 24px;
    align-items: center;
    min-height: auto;
  }

  .reg-card {
    min-height: auto;
    max-height: none;
    border-radius: 24px;
    border: 1px solid var(--input-border);
    overflow: visible;
  }

  .reg-header {
    position: relative;
    border-radius: 24px 24px 0 0;
  }

  .reg-footer {
    position: relative;
    border-radius: 0 0 24px 24px;
  }
}

/* Registration Mobile */
@media (max-width: 767px) {
  .reg-section {
    padding: 0;
  }

  .reg-card {
    min-height: 100vh;
    padding-bottom: 140px;
  }

  .reg-header {
    position: sticky;
    top: 0;
  }

  .reg-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--bg-dark);
    border-top: 1px solid var(--input-border);
    z-index: 10;
  }
}


/* ========== VerifyOtpPage ========== */

.otp-section {
  width: 100%;
  min-height: 100vh;
  background-color: var(--bg-dark);
  font-family: "Lexend", sans-serif;
  color: var(--text-light);
  display: flex;
  justify-content: center;
  align-items: center;
}

.otp-card {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.otp-header {
  display: flex;
  align-items: center;
  padding: 16px;
}

.back-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.back-btn .material-symbols-outlined {
  color: #d1d5db;
  font-size: 24px;
}

.header-text {
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  flex: 1;
  margin-right: 40px;
}

.otp-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 48px 16px 24px;
}

.otp-title {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}

.otp-subtitle {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.6;
  max-width: 320px;
}

.otp-subtitle .phone-number {
  color: #e5e7eb;
  font-weight: 600;
}

.otp-container {
  display: flex;
  gap: 8px;
  padding: 40px 0 24px;
}

.otp-input {
  width: 48px;
  height: 56px;
  border-radius: 8px;
  border: 2px solid #404040;
  background-color: var(--bg-dark);
  font-size: 20px;
  font-weight: 700;
  font-family: "Lexend", sans-serif;
  color: var(--text-light);
  text-align: center;
  outline: none;
  transition: border-color 0.2s;
  -moz-appearance: textfield;
}

.otp-input::-webkit-outer-spin-button,
.otp-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.otp-input:focus {
  border-color: var(--primary);
}

.otp-input.filled {
  border-color: var(--primary);
}

.otp-footer {
  padding: 24px;
}

.resend-text {
  color: var(--text-muted);
  font-size: 14px;
  text-align: center;
  margin-bottom: 16px;
}

.resend-link {
  color: var(--primary);
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

.verify-btn {
  width: 100%;
  height: 56px;
  border: none;
  border-radius: 12px;
  background-color: #1f2937;
  color: #6b7280;
  font-size: 16px;
  font-weight: 700;
  font-family: "Lexend", sans-serif;
  cursor: not-allowed;
  transition: all 0.2s ease;
}

.verify-btn.active {
  background-color: var(--primary);
  color: #000;
  cursor: pointer;
}

.verify-btn.active:hover {
  background-color: #2ec96a;
}

/* Success Modal */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
  z-index: 100;
}

.modal-overlay.show {
  display: flex;
}

.modal {
  background: #1f2937;
  padding: 32px;
  border-radius: 24px;
  text-align: center;
  max-width: 320px;
  margin: 20px;
}

.modal .material-symbols-outlined {
  font-size: 64px;
  color: var(--primary);
}

.modal h3 {
  font-size: 24px;
  margin: 16px 0 8px;
}

.modal p {
  color: var(--text-muted);
  margin-bottom: 24px;
}

.modal button {
  padding: 14px 32px;
  border: none;
  border-radius: 50px;
  background-color: var(--primary);
  color: #000;
  font-size: 16px;
  font-weight: 600;
  font-family: "Lexend", sans-serif;
  cursor: pointer;
}

/* OTP Desktop */
@media (min-width: 768px) {
  .otp-section {
    padding: 40px 24px;
  }

  .otp-card {
    min-height: calc(100vh - 80px);
    border-radius: 24px;
    border: 1px solid #404040;
    overflow: hidden;
  }

  .otp-container {
    gap: 16px;
  }

  .otp-input {
    width: 52px;
    height: 60px;
  }
}

/* ========== WellnessGuidancePage ========== */

.wellness-section {
  width: 100%;
  min-height: 100vh;
  background: #ffffff;
  font-family: "Lexend", sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.wellness-container {
  width: 100%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 40px 20px;
}

.logo-circle {
  width: 120px;
  height: 120px;
  background: #dbeafe;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 40px;
}

.lotus-icon {
  width: 50px;
  height: 50px;
}

.lotus-icon path {
  fill: #359EFF;
}

.wellness-title {
  font-size: 32px;
  font-weight: 700;
  color: #1a202c;
  line-height: 1.2;
  margin-bottom: 12px;
}

.wellness-subtitle {
  font-size: 16px;
  color: #718096;
  margin-bottom: 60px;
}

.slider-section {
  width: 100%;
  max-width: 400px;
}

.slider-label {
  font-size: 14px;
  color: #4a5568;
  margin-bottom: 16px;
  display: block;
}

.slider-track {
  position: relative;
  width: 100%;
  height: 6px;
  background: #E2E8F0;
  border-radius: 3px;
  margin-bottom: 32px;
  cursor: pointer;
}

.slider-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: #359EFF;
  border-radius: 3px;
  transition: width 0.1s ease;
  pointer-events: none;
}

.slider-thumb {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  background: #359EFF;
  border-radius: 50%;
  cursor: grab;
  box-shadow: 0 2px 8px rgba(53, 158, 255, 0.4);
  transition: transform 0.1s ease, box-shadow 0.2s ease;
  user-select: none;
}

.slider-thumb:hover {
  transform: translate(-50%, -50%) scale(1.1);
  box-shadow: 0 4px 12px rgba(53, 158, 255, 0.5);
}

.slider-arrow {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  color: #a0aec0;
  font-size: 14px;
  pointer-events: none;
}

.begin-button {
  width: 100%;
  max-width: 400px;
  height: 56px;
  background: #359EFF;
  border: none;
  border-radius: 28px;
  color: white;
  font-family: "Lexend", sans-serif;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.begin-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(53, 158, 255, 0.35);
}

.begin-button:active {
  transform: translateY(0);
}

.begin-button.complete {
  background: #22c55e;
}

.begin-button.complete:hover {
  box-shadow: 0 8px 20px rgba(34, 197, 94, 0.35);
}

@media (max-width: 480px) {
  .wellness-container {
    padding: 30px 16px;
  }

  .logo-circle {
    width: 100px;
    height: 100px;
    margin-bottom: 32px;
  }

  .lotus-icon {
    width: 40px;
    height: 40px;
  }

  .wellness-title {
    font-size: 26px;
  }

  .wellness-subtitle {
    font-size: 15px;
    margin-bottom: 50px;
  }

  .slider-section {
    max-width: 100%;
  }

  .begin-button {
    max-width: 100%;
    height: 52px;
  }
}


/* ========== HealthLogPage ========== */

.health-log-section {
  width: 100%;
  min-height: 100vh;
  background-color: var(--bg-dark);
  font-family: "Lexend", sans-serif;
  color: var(--text-light);
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.health-log-card {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.health-log-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(18, 32, 23, 0.9);
  backdrop-filter: blur(8px);
  padding: 16px;
  padding-bottom: 8px;
  display: flex;
  align-items: center;
}

.health-log-main {
  flex: 1;
  padding: 16px;
  padding-bottom: 32px;
  display: flex;
  flex-direction: column;
}

.log-date {
  color: var(--text-muted);
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 8px;
}

.log-title {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 24px;
  color: var(--text-light);
}

/* Feeling Buttons Grid */
.feelings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 32px;
}

.feeling-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 16px;
  border-radius: 50px;
  border: 1px solid var(--input-border);
  background: transparent;
  color: #d1d5db;
  font-size: 14px;
  font-weight: 600;
  font-family: "Lexend", sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
}

.feeling-btn .material-symbols-outlined {
  font-size: 18px;
}

.feeling-btn.active {
  background-color: var(--primary);
  border-color: var(--primary);
  color: var(--bg-dark);
}

.feeling-btn.active .material-symbols-outlined {
  color: var(--bg-dark);
}

/* Add More Section */
.add-more-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-light);
}

.textarea-wrapper {
  position: relative;
  margin-bottom: 24px;
}

.log-textarea {
  width: 100%;
  height: 160px;
  padding: 16px;
  padding-bottom: 64px;
  border-radius: 12px;
  border: none;
  background-color: #2C2C2E;
  color: var(--text-light);
  font-size: 16px;
  font-family: "Lexend", sans-serif;
  resize: none;
  outline: none;
}

.log-textarea::placeholder {
  color: #6b7280;
}

.log-textarea:focus {
  box-shadow: 0 0 0 2px var(--primary);
}

.mic-btn {
  position: absolute;
  bottom: 16px;
  right: 16px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background-color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s;
}

.mic-btn .material-symbols-outlined {
  color: var(--bg-dark);
  font-size: 24px;
}

.mic-btn:hover {
  background-color: #2ec96a;
}

/* I'm Fine Button */
.fine-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 80px;
  border-radius: 50px;
  background-color: #2C2C2E;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  font-family: "Lexend", sans-serif;
  cursor: pointer;
  transition: all 0.2s;
}

.fine-btn:hover {
  background-color: #3a3a3c;
}

.fine-btn.active {
  background-color: var(--primary);
  color: var(--bg-dark);
}

/* Spacer */
.spacer {
  flex: 1;
}

/* Save Button */
.save-btn {
  width: 100%;
  height: 56px;
  border-radius: 50px;
  border: none;
  background-color: var(--primary);
  color: var(--bg-dark);
  font-size: 16px;
  font-weight: 700;
  font-family: "Lexend", sans-serif;
  cursor: pointer;
  margin-top: 32px;
  transition: background-color 0.2s;
}

.save-btn:hover {
  background-color: #2ec96a;
}

/* Desktop */
@media (min-width: 768px) {
  .health-log-section {
    padding: 40px 24px;
    align-items: center;
  }

  .health-log-card {
    min-height: calc(100vh - 80px);
    border-radius: 24px;
    border: 1px solid #404040;
    overflow: hidden;
  }
}


/* ========== WellnessScanPage ========== */

.scan-section {
  width: 100%;
  min-height: 100vh;
  background-color: #1A2E27;
  font-family: "Lexend", sans-serif;
  color: #ffffff;
}

.scan-container {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 24px;
}

/* Header */
.scan-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  margin-bottom: 24px;
}

.scan-icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.2);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}

.scan-icon-btn:hover {
  background: rgba(0, 0, 0, 0.4);
}

.scan-icon-btn .material-symbols-outlined {
  color: #ffffff;
  font-size: 24px;
}

/* Main */
.scan-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 32px;
}

/* Face Section */
.scan-face-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.scan-face-outline-wrapper {
  position: relative;
  width: 280px;
  height: 280px;
}

.scan-face-outline {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 4px dashed #89D9B7;
  opacity: 0.6;
  animation: rotateScanCircle 10s linear infinite;
  z-index: 1;
}

.scan-video {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

@keyframes rotateScanCircle {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.scan-face-title {
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  line-height: 1.4;
  max-width: 300px;
  color: #ffffff;
}

/* Breathing Section */
.scan-breathing-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.scan-breathing-text {
  color: #89D9B7;
  font-size: 16px;
  font-weight: 400;
}

.scan-timer {
  font-size: 56px;
  font-weight: 700;
  letter-spacing: 4px;
  color: #ffffff;
}

.scan-breathe-btn {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: #5EBE9A;
  border: none;
  color: #1A2E27;
  font-size: 20px;
  font-weight: 700;
  font-family: "Lexend", sans-serif;
  cursor: pointer;
  margin-top: 16px;
  box-shadow: 0 10px 40px rgba(94, 190, 154, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: scanPulse 4s ease-in-out infinite;
}

@keyframes scanPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.scan-breathe-btn:hover {
  box-shadow: 0 15px 50px rgba(94, 190, 154, 0.4);
}

/* Footer Note */
.scan-footer-note {
  color: rgba(137, 217, 183, 0.7);
  font-size: 12px;
  text-align: center;
  line-height: 1.5;
  max-width: 320px;
}

/* Camera Error */
.scan-camera-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 40px 20px;
}

.scan-error-icon {
  font-size: 64px !important;
  color: #EF5350;
}

.scan-error-message {
  font-size: 16px;
  color: #89D9B7;
  text-align: center;
}

.scan-retry-btn {
  padding: 14px 32px;
  border: none;
  border-radius: 50px;
  background: #5EBE9A;
  color: #1A2E27;
  font-size: 16px;
  font-weight: 600;
  font-family: "Lexend", sans-serif;
  cursor: pointer;
}

/* Loading Overlay */
.scan-loader-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(26, 46, 39, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.scan-loader-content {
  text-align: center;
  padding: 20px;
}

.scan-pulse-loader {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 30px;
}

.scan-pulse-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  border: 3px solid #5EBE9A;
  border-radius: 50%;
  opacity: 0.6;
  animation: scanPulseRing 2s ease-out infinite;
}

.scan-pulse-ring-2 {
  animation-delay: 0.5s;
}

.scan-pulse-ring-3 {
  animation-delay: 1s;
}

@keyframes scanPulseRing {
  0% {
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.4);
    opacity: 0;
  }
}

.scan-loader-title {
  font-size: 24px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 10px;
}

.scan-loader-subtitle {
  font-size: 14px;
  color: #89D9B7;
  margin-bottom: 30px;
}

.scan-progress-container {
  width: 100%;
  max-width: 300px;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  margin: 0 auto 10px;
  overflow: hidden;
}

.scan-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #5EBE9A, #89D9B7);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.scan-progress-text {
  font-size: 16px;
  font-weight: 600;
  color: #89D9B7;
}

/* Modal */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  justify-content: center;
  align-items: center;
  z-index: 100;
}

.modal-overlay.show {
  display: flex;
}

.modal {
  background: #243d34;
  padding: 32px;
  border-radius: 24px;
  text-align: center;
  max-width: 320px;
  margin: 20px;
}

.modal .material-symbols-outlined {
  font-size: 64px;
  color: #5EBE9A;
}

.modal h3 {
  font-size: 24px;
  margin: 16px 0 8px;
  color: #ffffff;
}

.modal p {
  color: #89D9B7;
  margin-bottom: 24px;
  font-size: 14px;
}

.modal button {
  padding: 14px 32px;
  border: none;
  border-radius: 50px;
  background: #5EBE9A;
  color: #1A2E27;
  font-size: 16px;
  font-weight: 600;
  font-family: "Lexend", sans-serif;
  cursor: pointer;
}

/* Desktop */
@media (min-width: 768px) {
  .scan-section {
    padding: 40px 24px;
  }

  .scan-container {
    min-height: calc(100vh - 80px);
    border-radius: 24px;
    border: 1px solid #3d5a4e;
    overflow: hidden;
  }
}

/* ========== HealthStoryPage ========== */

.story-section {
  width: 100%;
  min-height: 100vh;
  background-color: var(--bg-dark);
  font-family: "Lexend", sans-serif;
  color: var(--story-text-primary);
}

.story-container {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
}

/* Header */
.story-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: rgba(18, 32, 23, 0.9);
  backdrop-filter: blur(8px);
}

.story-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #2a9d5c);
}

.story-header-title {
  flex: 1;
  text-align: center;
  font-size: 18px;
  font-weight: 700;
}

.story-icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  transition: all 0.3s ease;
}

.story-icon-btn.active {
  background: rgba(57, 224, 121, 0.2);
  border-radius: 50%;
}

.story-icon-btn .material-symbols-outlined {
  color: var(--story-text-primary);
  font-size: 24px;
}

.story-icon-btn.active .material-symbols-outlined {
  color: var(--primary);
}

/* Main */
.story-main {
  padding: 0 16px 32px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* Hero Section */
.story-hero {
  position: relative;
  margin: 0 -16px;
  padding: 32px 16px;
  text-align: center;
  background: var(--story-emerald-bg);
  overflow: hidden;
}

.story-hero::after {
  content: '';
  position: absolute;
  bottom: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 250px;
  height: 250px;
  background: rgba(57, 224, 121, 0.15);
  border-radius: 50%;
  filter: blur(60px);
  z-index: -1;
}

.story-hero-title {
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 8px;
}

.story-hero-text {
  color: var(--story-text-primary);
  font-size: 14px;
  line-height: 1.6;
}

/* Video Button in Hero */
.story-video-button {
  background: var(--primary);
  color: var(--bg-dark);
  border: none;
  padding: 12px 24px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  font-family: "Lexend", sans-serif;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(57, 224, 121, 0.3);
}

.story-video-button:hover {
  background: #2ec96a;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(57, 224, 121, 0.4);
}

.story-video-button .material-symbols-outlined {
  font-size: 20px;
  color: var(--bg-dark);
}

/* Section Title */
.story-section-title {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
}

/* Card */
.story-card {
  background: var(--story-card-dark);
  border: 1px solid var(--story-border-dark);
  border-radius: 12px;
  padding: 16px;
  transition: all 0.3s ease;
}

.story-card:hover {
  border-color: rgba(57, 224, 121, 0.3);
  transform: translateY(-2px);
}

.story-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
}

.story-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: rgba(57, 224, 121, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.story-card-icon .material-symbols-outlined {
  color: var(--primary);
  font-size: 22px;
}

.story-card-content {
  flex: 1;
}

.story-card-content p:first-child {
  font-weight: 700;
  color: var(--story-text-primary);
}

.story-card-content p:last-child {
  font-size: 14px;
  color: var(--story-text-secondary);
  margin-top: 2px;
}

.story-card-arrow {
  color: var(--story-text-secondary);
}

/* Expandable Content */
.story-expand-content {
  display: flex;
  margin-top: 16px;
  flex-direction: column;
  gap: 12px;
  animation: expandIn 0.3s ease;
}

@keyframes expandIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.story-info-box {
  background: var(--bg-dark);
  border: 1px solid var(--story-border-dark);
  border-radius: 8px;
  padding: 12px;
}

.story-info-box h4 {
  color: var(--primary);
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 8px;
}

.story-info-box p {
  font-size: 13px;
}

.story-info-box .current-value {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}

.story-info-box .normal {
  color: var(--story-text-primary);
}

.story-info-box .risk {
  color: var(--story-negative);
  font-size: 12px;
  margin-top: 4px;
}

/* Cards List */
.story-cards-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Insights Section */
.story-insights {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Disclaimer */
.story-disclaimer {
  text-align: center;
  font-size: 12px;
  color: var(--story-text-secondary);
  padding: 8px;
  line-height: 1.5;
}

/* Download Button */
.story-download-btn {
  width: 100%;
  height: 56px;
  border: none;
  border-radius: 50px;
  background: var(--primary);
  color: var(--bg-dark);
  font-size: 16px;
  font-weight: 700;
  font-family: "Lexend", sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-shadow: 0 0 20px rgba(57, 224, 121, 0.4);
  transition: opacity 0.2s;
}

.story-download-btn:hover {
  opacity: 0.9;
}

.story-download-btn .material-symbols-outlined {
  color: var(--bg-dark);
}

/* Pattern Connection */
.story-pattern-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 32px 24px;
}

.story-pattern-line {
  position: absolute;
  top: 50%;
  left: 60px;
  right: 60px;
  height: 1px;
  border-top: 2px dashed rgba(57, 224, 121, 0.5);
  transform: translateY(-50%);
}

.story-pattern-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 1;
}

.story-pattern-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  background: var(--bg-dark);
  display: flex;
  align-items: center;
  justify-content: center;
}

.story-pattern-icon.secondary {
  border-color: rgba(57, 224, 121, 0.5);
}

.story-pattern-icon .material-symbols-outlined {
  color: var(--primary);
}

.story-pattern-item span:last-child {
  font-size: 11px;
  color: var(--story-text-secondary);
}

/* Action Strategy */
.story-strategy-card {
  background: var(--story-emerald-bg);
  border: 1px solid #065f46;
  border-radius: 12px;
  padding: 20px;
}

.story-strategy-card h3 {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
}

.story-strategy-section {
  margin-bottom: 16px;
}

.story-strategy-section:last-child {
  margin-bottom: 0;
}

.story-strategy-section h4 {
  color: var(--primary);
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 8px;
}

.story-strategy-section ul {
  padding-left: 20px;
}

.story-strategy-section li {
  color: var(--story-text-primary);
  font-size: 14px;
  margin-bottom: 4px;
  line-height: 1.5;
}

.story-strategy-section li::marker {
  color: var(--primary);
}

.story-strategy-section .exercise-text {
  color: var(--story-text-primary);
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-line;
}

/* Learning Grid */
.story-learning-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.story-learning-item {
  cursor: pointer;
  transition: transform 0.3s ease;
}

.story-learning-item:hover {
  transform: translateY(-4px);
}

.story-learning-img {
  position: relative;
  aspect-ratio: 1;
  background: var(--story-card-dark);
  border-radius: 12px;
  overflow: hidden;
}

.story-learning-img.turmeric {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

.story-learning-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.6);
  padding: 4px 8px;
  border-radius: 20px;
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.story-learning-badge .material-symbols-outlined {
  font-size: 14px;
}

.story-learning-item h4 {
  font-weight: 700;
  color: var(--story-text-primary);
  margin-top: 8px;
  font-size: 14px;
}

.story-learning-item p {
  font-size: 13px;
  color: var(--story-text-secondary);
  margin-top: 2px;
}

/* ========== VIDEO MODAL ========== */

.video-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  animation: modalFadeIn 0.3s ease forwards;
}

.video-modal-overlay.closing {
  animation: modalFadeOut 0.3s ease forwards;
}

.video-modal-content {
  position: relative;
  width: 90%;
  max-width: 800px;
  background: #000;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  animation: modalSlideIn 0.3s ease forwards;
  border: 1px solid rgba(57, 224, 121, 0.2);
}

.video-modal-content.closing {
  animation: modalSlideOut 0.3s ease forwards;
}

.video-close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 20px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 8px 12px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  backdrop-filter: blur(10px);
}

.video-close-btn:hover {
  background: rgba(57, 224, 121, 0.3);
  border-color: var(--primary);
  transform: scale(1.1);
}

.video-close-btn:active {
  transform: scale(0.95);
}

.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
}

.video-wrapper video,
.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Modal Animations */
@keyframes modalFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes modalFadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes modalSlideIn {
  from {
    transform: scale(0.8) translateY(-30px);
    opacity: 0;
  }
  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

@keyframes modalSlideOut {
  from {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
  to {
    transform: scale(0.8) translateY(-30px);
    opacity: 0;
  }
}

/* Desktop */
@media (min-width: 768px) {
  .story-section {
    padding: 40px 24px;
  }

  .story-container {
    min-height: calc(100vh - 80px);
    border-radius: 24px;
    border: 1px solid var(--story-border-dark);
    overflow: hidden;
  }

  .story-hero {
    margin: 0;
    border-radius: 0;
  }
}

/* Mobile Responsive for Video Modal */
@media (max-width: 768px) {
  .video-modal-content {
    width: 95%;
    max-width: none;
  }

  .video-close-btn {
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
  }
}

@media (max-width: 480px) {
  .video-modal-content {
    width: 98%;
    border-radius: 12px;
  }
  
  .story-video-button {
    font-size: 13px;
    padding: 10px 20px;
  }
  
  .story-hero-title {
    font-size: 22px;
  }
  
  .story-hero-text {
    font-size: 13px;
  }
}