@import url('https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,300;0,400;0,600;0,700;1,400&family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* SafeChat AI Style System */

/* CSS Variables for Premium Calming Palette */
:root {
  --bg-warm-white: #FAF9F6;
  --bg-pure-white: #FFFFFF;
  --color-primary: #0284C7; /* Soft Blue/Ocean */
  --color-primary-light: #E0F2FE;
  --color-primary-dark: #0369A1;
  --color-secondary: #059669; /* Calming Mint Green */
  --color-secondary-light: #ECFDF5;
  --color-secondary-dark: #047857;
  --color-text-dark: #1E293B; /* Slate 800 */
  --color-text-muted: #64748B; /* Slate 500 */
  --color-border: #E2E8F0; /* Slate 200 */
  --color-shadow: rgba(148, 163, 184, 0.08);
  --color-rose: #FDA4AF;
  --color-rose-light: #FFF1F2;
  --color-rose-dark: #BE123C;

  /* Glassmorphism settings */
  --glass-bg: rgba(255, 255, 255, 0.75);
  --glass-border: rgba(255, 255, 255, 0.4);
  --glass-blur: 12px;

  /* Shadows */
  --shadow-sm: 0 2px 8px var(--color-shadow);
  --shadow-md: 0 10px 25px -5px rgba(148, 163, 184, 0.15), 0 8px 16px -8px rgba(148, 163, 184, 0.15);
  --shadow-lg: 0 20px 40px -10px rgba(148, 163, 184, 0.2);
  
  /* Transition durations */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;

  /* Border radius */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
}

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

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

body {
  font-family: 'Nunito', sans-serif;
  background-color: var(--bg-warm-white);
  color: var(--color-text-dark);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  color: var(--color-text-dark);
  line-height: 1.2;
}

a {
  text-decoration: none;
  color: inherit;
}

button, input, textarea, select {
  font-family: inherit;
  font-size: 1rem;
  outline: none;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-warm-white);
}

::-webkit-scrollbar-thumb {
  background: var(--color-primary-light);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary);
}

/* Base Layout */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header & Navigation */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  border-bottom: 1px solid var(--glass-border);
  transition: all var(--transition-normal);
}

header.scrolled {
  box-shadow: var(--shadow-sm);
  padding: 8px 0;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--color-primary-dark);
}

.logo svg {
  width: 32px;
  height: 32px;
  fill: var(--color-primary);
}

.nav-menu {
  display: flex;
  gap: 28px;
  list-style: none;
}

.nav-link {
  font-weight: 600;
  font-size: 1rem;
  color: var(--color-text-muted);
  position: relative;
  padding: 6px 0;
  transition: color var(--transition-fast);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: width var(--transition-normal);
  border-radius: var(--radius-full);
}

.nav-link:hover {
  color: var(--color-primary-dark);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link.active {
  color: var(--color-primary-dark);
  font-weight: 700;
}

/* Config & Actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-settings {
  background: var(--color-primary-light);
  border: none;
  color: var(--color-primary-dark);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-settings:hover {
  transform: rotate(30deg);
  background: var(--color-primary);
  color: var(--bg-pure-white);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text-dark);
  margin: 5px 0;
  transition: all var(--transition-normal);
}

/* Settings Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: var(--bg-pure-white);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 500px;
  padding: 32px;
  box-shadow: var(--shadow-lg);
  transform: scale(0.9);
  transition: transform var(--transition-normal);
  position: relative;
}

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

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
}

.modal-close:hover {
  color: var(--color-text-dark);
}

.modal-title {
  margin-bottom: 16px;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-text-dark);
}

.input-field {
  padding: 12px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--bg-warm-white);
  color: var(--color-text-dark);
  transition: all var(--transition-fast);
}

.input-field:focus {
  border-color: var(--color-primary);
  background: var(--bg-pure-white);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.btn-primary {
  background: var(--color-primary);
  color: var(--bg-pure-white);
  border: none;
  padding: 14px 24px;
  border-radius: var(--radius-md);
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
}

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

/* Warnings/Banner style */
.api-warning-banner {
  background: var(--color-rose-light);
  border: 1px solid var(--color-rose);
  padding: 16px;
  border-radius: var(--radius-md);
  margin-top: 80px; /* Offset for sticky header */
  margin-bottom: -40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
}

.api-warning-banner.hidden {
  display: none;
}

.api-warning-text {
  font-size: 0.95rem;
  color: var(--color-rose-dark);
  font-weight: 500;
}

.btn-warning-action {
  background: var(--color-rose);
  border: none;
  color: var(--color-rose-dark);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-warning-action:hover {
  background: var(--color-rose-dark);
  color: white;
}

/* Main Content Area */
main {
  margin-top: 70px;
}

/* Hero Section */
.hero-section {
  padding: 100px 0 80px 0;
  background: linear-gradient(180deg, var(--color-primary-light) 0%, rgba(250, 249, 246, 0.5) 100%);
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 48px;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 8px;
  background: var(--bg-pure-white);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--color-primary-dark);
}

.hero-badge span {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--color-secondary);
  border-radius: var(--radius-full);
  animation: pulse-dot 1.5s infinite;
}

.hero-title {
  font-size: 3.5rem;
  line-height: 1.1;
}

.hero-title span {
  background: linear-gradient(90deg, var(--color-primary-dark), var(--color-secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

.hero-cta {
  display: flex;
  gap: 16px;
  margin-top: 10px;
}

.btn-secondary {
  background: var(--bg-pure-white);
  border: 1px solid var(--color-border);
  color: var(--color-text-dark);
  padding: 14px 24px;
  border-radius: var(--radius-md);
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-secondary:hover {
  background: var(--color-primary-light);
  border-color: var(--color-primary);
  transform: translateY(-2px);
}

.hero-illustration {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.hero-illustration svg {
  width: 100%;
  max-width: 420px;
  height: auto;
  filter: drop-shadow(0 15px 30px rgba(2, 132, 199, 0.15));
  animation: float 6s ease-in-out infinite;
}

/* Problem Section - Masalah 3M */
.problem-section {
  padding: 100px 0;
  background-color: var(--bg-pure-white);
}

.section-header {
  text-align: center;
  max-width: 650px;
  margin: 0 auto 60px auto;
}

.section-title {
  font-size: 2.2rem;
  margin-bottom: 16px;
}

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

.problem-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.problem-card {
  background: var(--bg-warm-white);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  border: 1px solid var(--color-border);
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  overflow: hidden;
}

.problem-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--color-primary);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.problem-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  background: var(--bg-pure-white);
}

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

.problem-card.level-2::before {
  background: var(--color-secondary);
}

.problem-card.level-3::before {
  background: var(--color-rose-dark);
}

.problem-badge {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  align-self: flex-start;
}

.problem-card.level-1 .problem-badge {
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
}

.problem-card.level-2 .problem-badge {
  background: var(--color-secondary-light);
  color: var(--color-secondary-dark);
}

.problem-card.level-3 .problem-badge {
  background: var(--color-rose-light);
  color: var(--color-rose-dark);
}

.problem-icon-wrapper {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.problem-card.level-1 .problem-icon-wrapper {
  background: var(--color-primary-light);
}

.problem-card.level-2 .problem-icon-wrapper {
  background: var(--color-secondary-light);
}

.problem-card.level-3 .problem-icon-wrapper {
  background: var(--color-rose-light);
}

.problem-card-title {
  font-size: 1.4rem;
}

.problem-card-desc {
  color: var(--color-text-muted);
}

.problem-impact-card {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-secondary-light) 100%);
  border: none;
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 16px;
  box-shadow: var(--shadow-sm);
}

.problem-impact-content {
  max-width: 700px;
}

.problem-impact-title {
  font-size: 1.3rem;
  color: var(--color-primary-dark);
  margin-bottom: 8px;
  font-weight: 700;
}

.problem-impact-desc {
  color: var(--color-text-dark);
  font-weight: 500;
}

.problem-impact-icon {
  font-size: 3rem;
}

/* Feature Base Section */
.feature-section {
  padding: 100px 0;
  border-bottom: 1px solid var(--color-border);
}

.feature-section:nth-of-type(even) {
  background-color: var(--bg-warm-white);
}

.feature-section:nth-of-type(odd) {
  background-color: var(--bg-pure-white);
}

/* Feature 1: SafeChat AI */
.chat-container-wrapper {
  max-width: 800px;
  margin: 0 auto;
  background: var(--bg-pure-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 600px;
}

.chat-header {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  padding: 20px 24px;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-bot-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--color-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  border: 2px solid var(--bg-pure-white);
  box-shadow: var(--shadow-sm);
}

.chat-bot-details h3 {
  font-size: 1.1rem;
}

.chat-bot-status {
  font-size: 0.85rem;
  color: var(--color-secondary);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.chat-bot-status::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--color-secondary);
  border-radius: var(--radius-full);
}

.btn-chat-reset {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-muted);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.btn-chat-reset:hover {
  background: var(--color-rose-light);
  color: var(--color-rose-dark);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: radial-gradient(circle at top left, var(--color-primary-light) 0%, rgba(255, 255, 255, 0.4) 100%);
}

.chat-msg {
  display: flex;
  flex-direction: column;
  max-width: 75%;
}

.chat-msg.bot {
  align-self: flex-start;
}

.chat-msg.user {
  align-self: flex-end;
}

.chat-bubble {
  padding: 14px 20px;
  border-radius: var(--radius-lg);
  font-size: 1rem;
  line-height: 1.5;
  box-shadow: var(--shadow-sm);
}

.chat-msg.bot .chat-bubble {
  background: var(--bg-pure-white);
  color: var(--color-text-dark);
  border-bottom-left-radius: 4px;
  border: 1px solid var(--color-border);
}

.chat-msg.user .chat-bubble {
  background: var(--color-primary);
  color: var(--bg-pure-white);
  border-bottom-right-radius: 4px;
}

.chat-meta {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 4px;
  align-self: flex-start;
}

.chat-msg.user .chat-meta {
  align-self: flex-end;
}

/* Typing indicator */
.typing-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  background: var(--bg-pure-white);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  align-self: flex-start;
  box-shadow: var(--shadow-sm);
  display: none;
}

.typing-indicator.active {
  display: flex;
}

.typing-dot {
  width: 6px;
  height: 6px;
  background: var(--color-text-muted);
  border-radius: var(--radius-full);
  animation: typing-bounce 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

.chat-input-area {
  padding: 16px 24px;
  border-top: 1px solid var(--color-border);
  background: var(--bg-pure-white);
  display: flex;
  gap: 12px;
  align-items: center;
}

.chat-input {
  flex: 1;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  resize: none;
  height: 50px;
  max-height: 100px;
  background: var(--bg-warm-white);
  transition: all var(--transition-fast);
}

.chat-input:focus {
  border-color: var(--color-primary);
  background: var(--bg-pure-white);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.btn-send {
  background: var(--color-primary);
  color: var(--bg-pure-white);
  border: none;
  width: 50px;
  height: 50px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-send:hover {
  background: var(--color-primary-dark);
  transform: scale(1.05);
}

.btn-send svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  transform: translateX(1px);
}

/* Feature 2: Love Mirror & Affirmation */
.love-mirror-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.love-mirror-card {
  background: var(--bg-pure-white);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.mirror-textarea {
  width: 100%;
  height: 120px;
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--bg-warm-white);
  resize: none;
  transition: all var(--transition-fast);
}

.mirror-textarea:focus {
  border-color: var(--color-primary);
  background: var(--bg-pure-white);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.mirror-output-card {
  background: linear-gradient(135deg, #FFF, var(--color-primary-light));
  border: 1px solid var(--color-primary-light);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-md);
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  min-height: 380px;
  position: relative;
  overflow: hidden;
}

.mirror-illustration-bg {
  font-size: 4rem;
  opacity: 0.1;
  position: absolute;
  top: 20px;
  right: 20px;
}

.mirror-output-placeholder {
  color: var(--color-text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.mirror-output-placeholder svg {
  width: 64px;
  height: 64px;
  stroke: var(--color-text-muted);
}

.mirror-result {
  display: none;
  flex-direction: column;
  gap: 24px;
  animation: fadeIn 0.8s ease forwards;
}

.mirror-result.active {
  display: flex;
}

.mirror-result-quote {
  font-size: 1.25rem;
  font-style: italic;
  color: var(--color-primary-dark);
  font-weight: 600;
  line-height: 1.6;
}

.mirror-result-reframed {
  font-size: 1.15rem;
  line-height: 1.7;
}

.mirror-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
}

/* Affirmation Gallery */
.gallery-section {
  margin-top: 48px;
  width: 100%;
}

.gallery-title {
  font-size: 1.4rem;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--color-text-dark);
}

.gallery-title span {
  font-size: 1.5rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.gallery-card {
  background: var(--bg-pure-white);
  border-left: 4px solid var(--color-secondary);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  animation: scaleIn 0.3s ease forwards;
}

.gallery-card-text {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--color-text-dark);
}

.gallery-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.btn-delete-card {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
}

.btn-delete-card:hover {
  color: var(--color-rose-dark);
}

.gallery-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px;
  color: var(--color-text-muted);
  background: rgba(255,255,255,0.5);
  border-radius: var(--radius-md);
  border: 1px dashed var(--color-border);
}

/* Feature 3: Micro Challenges */
.challenges-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
}

.slider-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 10px;
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  padding: 0 4px;
}

.range-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--color-border);
  outline: none;
  transition: background var(--transition-fast);
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--color-secondary);
  cursor: pointer;
  border: 2px solid var(--bg-pure-white);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: all var(--transition-fast);
}

.range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  background: var(--color-secondary-dark);
}

.comfort-level-display {
  text-align: center;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-secondary-dark);
  background: var(--color-secondary-light);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  align-self: center;
  margin-bottom: 8px;
}

.challenge-output-card {
  background: var(--bg-pure-white);
  border-radius: var(--radius-lg);
  padding: 40px;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-height: 300px;
  justify-content: center;
  position: relative;
}

.challenge-placeholder {
  text-align: center;
  color: var(--color-text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.challenge-placeholder svg {
  width: 64px;
  height: 64px;
  stroke: var(--color-text-muted);
}

.challenge-content {
  display: none;
  flex-direction: column;
  gap: 20px;
  animation: fadeIn 0.8s ease forwards;
}

.challenge-content.active {
  display: flex;
}

.challenge-header-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px;
  background: var(--color-secondary-light);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--color-secondary);
}

.challenge-check-container {
  display: flex;
  align-items: center;
}

/* Customized Checkbox */
.checkbox-custom {
  position: relative;
  display: inline-block;
  width: 28px;
  height: 28px;
  cursor: pointer;
}

.checkbox-custom input {
  opacity: 0;
  width: 0;
  height: 0;
}

.checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 28px;
  width: 28px;
  background-color: var(--bg-pure-white);
  border: 2px solid var(--color-secondary);
  border-radius: 8px;
  transition: all var(--transition-fast);
}

.checkbox-custom:hover input ~ .checkmark {
  background-color: var(--color-secondary-light);
}

.checkbox-custom input:checked ~ .checkmark {
  background-color: var(--color-secondary);
}

.checkmark::after {
  content: "";
  position: absolute;
  display: none;
}

.checkbox-custom input:checked ~ .checkmark::after {
  display: block;
}

.checkbox-custom .checkmark::after {
  left: 9px;
  top: 4px;
  width: 6px;
  height: 12px;
  border: solid white;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

.challenge-details h4 {
  font-size: 1.15rem;
  color: var(--color-secondary-dark);
  margin-bottom: 4px;
}

.challenge-details p {
  font-size: 0.95rem;
  color: var(--color-text-dark);
}

.challenge-explanation {
  background: var(--bg-warm-white);
  padding: 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

.challenge-explanation-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--color-text-dark);
  margin-bottom: 6px;
}

.challenge-explanation-desc {
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

/* Progress Tracker Dashboard */
.progress-card {
  background: var(--bg-pure-white);
  border-radius: var(--radius-lg);
  padding: 32px;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.progress-title {
  font-size: 1.2rem;
  font-weight: 700;
}

.progress-stats {
  font-weight: 800;
  color: var(--color-secondary);
}

.progress-bar-bg {
  background: var(--color-border);
  height: 12px;
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar-fill {
  background: linear-gradient(90deg, var(--color-secondary) 0%, var(--color-primary) 100%);
  height: 100%;
  width: 0%;
  border-radius: var(--radius-full);
  transition: width var(--transition-slow) cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-milestones {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  text-align: center;
}

.milestone-item {
  background: var(--bg-warm-white);
  padding: 12px 8px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.milestone-icon {
  font-size: 1.4rem;
}

.milestone-label {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  font-weight: 600;
}

.milestone-item.active {
  background: var(--color-secondary-light);
  border-color: var(--color-secondary);
}

.milestone-item.active .milestone-label {
  color: var(--color-secondary-dark);
}

/* Footer Section */
footer {
  background-color: var(--color-text-dark);
  color: var(--bg-warm-white);
  padding: 60px 0 30px 0;
  text-align: center;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  max-width: 600px;
  margin: 0 auto;
}

.footer-logo {
  color: var(--bg-pure-white);
  font-size: 1.5rem;
}

.footer-text {
  font-size: 1.05rem;
  color: rgba(250, 249, 246, 0.7);
}

.footer-divider {
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 20px 0;
}

.footer-copyright {
  font-size: 0.9rem;
  color: rgba(250, 249, 246, 0.5);
}

/* Loader Animation */
.api-loader {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px;
  margin: 0 auto;
}

.api-loader.active {
  display: flex;
}

.loader-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--color-primary-light);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 1s infinite linear;
}

.loader-text {
  font-size: 0.95rem;
  color: var(--color-primary-dark);
  font-weight: 600;
}

/* Animations Definitions */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes pulse-dot {
  0% { transform: scale(0.9); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.5; }
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-15px); }
  100% { transform: translateY(0px); }
}

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

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes typing-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* Scroll reveal helper classes */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive Breakpoints */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 32px;
  }

  .hero-badge {
    align-self: center;
  }

  .hero-cta {
    justify-content: center;
  }

  .hero-title {
    font-size: 2.8rem;
  }

  .problem-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .love-mirror-grid, .challenges-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .mirror-output-card, .challenge-output-card {
    min-height: auto;
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .nav-menu {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background: var(--bg-pure-white);
    flex-direction: column;
    align-items: center;
    padding-top: 40px;
    gap: 32px;
    transition: left var(--transition-normal);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
  }

  .nav-menu.active {
    left: 0;
  }

  .menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .hero-title {
    font-size: 2.2rem;
  }

  .chat-container-wrapper {
    height: 500px;
  }

  .love-mirror-card, .mirror-output-card, .challenge-output-card, .progress-card {
    padding: 24px;
  }
}
