:root {
  --primary: #2D7D7C;
  --primary-dark: #1F5F5E;
  --primary-light: #4A9E9D;
  --secondary: #FFC72C;
  --secondary-dark: #E6B025;
  --secondary-light: #FFD966;
  --bg: #FFFFFF;
  --bg-soft: #F8FAFA;
  --bg-hover: #F0F5F5;
  --surface: #FFFFFF;
  --text: #111111;
  --text-muted: #6B7280;
  --text-light: #9CA3AF;
  --border: #E5E7EB;
  --border-light: #F3F4F6;
  --success: #10B981;
  --warning: #F59E0B;
  --error: #EF4444;
  --info: #3B82F6;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.1), 0 4px 10px rgba(0,0,0,0.05);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --font-display: 'Alata', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --header-height: 70px;
}

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

html, body {
  height: 100%;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

/* Utility */
.hidden { display: none !important; }
.accent { color: var(--primary); }

/* ========== LANDING ========== */
.landing {
  min-height: 100vh;
  min-height: 100dvh;
  overflow-y: auto;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%);
  padding: 2rem 1rem 3rem;
}

.landing-content {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--secondary);
  color: var(--text);
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: var(--radius-full);
  margin-bottom: 1.5rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.15;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.hero-title .line1,
.hero-title .line2,
.hero-title .line3 {
  display: block;
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

/* Disclaimer Box */
.disclaimer-box {
  background: linear-gradient(135deg, #FFF9E6 0%, #FFF3CC 100%);
  border: 2px solid var(--secondary-light);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2.5rem;
  text-align: left;
}

.disclaimer-box h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.disclaimer-box p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.disclaimer-box strong {
  color: var(--primary);
}

.disclaimer-box em {
  color: var(--primary-dark);
  font-style: normal;
  font-weight: 500;
}

/* Agents Grid */
.agents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.agent-card {
  background: var(--surface);
  border: 2px solid var(--border-light);
  border-radius: var(--radius);
  padding: 1.25rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.agent-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--card-color, var(--primary));
  opacity: 0;
  transition: opacity 0.2s;
}

.agent-card:hover {
  border-color: var(--card-color, var(--primary));
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

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

.agent-card:active {
  transform: translateY(0);
}

.agent-emoji {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  display: block;
}

.agent-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--text);
}

.agent-condition {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.agent-strength {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  font-style: italic;
  display: none;
}

.agent-card:hover .agent-strength {
  display: block;
}

/* Hero Footer */
.hero-footer {
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-light);
}

.hero-footer p {
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.hero-footer .small {
  font-size: 0.8rem;
  color: var(--text-light);
}

/* ========== CHAT SCREEN ========== */
.chat-screen {
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.chat-header {
  height: var(--header-height);
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border-light);
  gap: 0.75rem;
  flex-shrink: 0;
}

.back-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  border: none;
  background: var(--bg-soft);
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.back-btn:hover {
  background: var(--bg-hover);
}

.chat-agent-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
}

.chat-emoji {
  font-size: 1.75rem;
  flex-shrink: 0;
}

.chat-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-condition {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.chat-strength {
  display: none;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: right;
  max-width: 150px;
  line-height: 1.4;
}

@media (min-width: 600px) {
  .chat-strength {
    display: block;
  }
}

/* Messages */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  scroll-behavior: smooth;
}

.message {
  max-width: 85%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-lg);
  line-height: 1.6;
  word-wrap: break-word;
  animation: messageIn 0.25s ease;
}

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

.message-user {
  align-self: flex-end;
  background: var(--primary);
  color: white;
  border-bottom-right-radius: 4px;
}

.message-bot {
  align-self: flex-start;
  background: var(--bg-soft);
  color: var(--text);
  border-bottom-left-radius: 4px;
  border: 1px solid var(--border-light);
}

.message-greeting {
  align-self: flex-start;
  background: linear-gradient(135deg, var(--bg-soft) 0%, #FFF9E6 100%);
  color: var(--text);
  border: 1px solid var(--secondary-light);
  border-bottom-left-radius: 4px;
  padding: 1rem;
  font-size: 0.95rem;
}

.message-time {
  font-size: 0.65rem;
  opacity: 0.6;
  margin-top: 0.25rem;
  text-align: right;
}

.message-bot .message-time {
  text-align: left;
}

/* Typing Indicator */
.typing-indicator {
  align-self: flex-start;
  display: flex;
  gap: 4px;
  padding: 0.75rem 1rem;
  background: var(--bg-soft);
  border-radius: var(--radius-lg);
  border-bottom-left-radius: 4px;
}

.typing-indicator.hidden {
  display: none;
}

.typing-indicator span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-light);
  animation: bounce 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-6px); opacity: 1; }
}

/* Parent Hint */
.parent-hint {
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, #EAF2F2 0%, #F0F9F9 100%);
  border-top: 1px solid var(--border-light);
  text-align: center;
  flex-shrink: 0;
}

.parent-hint .hint-text {
  font-size: 0.8rem;
  color: var(--primary-dark);
  font-style: italic;
}

/* Input Area */
.chat-input-area {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border-top: 1px solid var(--border-light);
  flex-shrink: 0;
}

.chat-input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border-light);
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
  background: var(--bg-soft);
}

.chat-input:focus {
  border-color: var(--primary);
  background: var(--surface);
}

.chat-input::placeholder {
  color: var(--text-light);
}

.send-btn {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  border: none;
  background: var(--primary);
  color: white;
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

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

.send-btn:active {
  transform: scale(0.95);
}

.send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* New Chat Button */
.new-chat-btn {
  position: absolute;
  bottom: 80px;
  right: 1rem;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  border: none;
  background: var(--secondary);
  color: var(--text);
  font-size: 1.25rem;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 10;
}

.new-chat-btn:hover {
  background: var(--secondary-dark);
  transform: scale(1.1);
}

.new-chat-btn:active {
  transform: scale(0.9);
}

/* Responsive */
@media (max-width: 480px) {
  .agents-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  
  .agent-card {
    padding: 1rem 0.75rem;
  }
  
  .agent-emoji {
    font-size: 2rem;
  }
  
  .agent-name {
    font-size: 1rem;
  }
  
  .hero-title {
    font-size: 1.75rem;
  }
  
  .chat-header {
    padding: 0.5rem 0.75rem;
  }
  
  .chat-messages {
    padding: 0.75rem;
  }
  
  .message {
    max-width: 90%;
    font-size: 0.9rem;
  }
  
  .disclaimer-box {
    padding: 1rem;
  }
}

@media (min-width: 768px) {
  .agents-grid {
    grid-template-columns: repeat(5, 1fr);
  }
  
  .chat-screen {
    max-width: 700px;
    margin: 0 auto;
    border-left: 1px solid var(--border-light);
    border-right: 1px solid var(--border-light);
  }
  
  .chat-header {
    border-radius: 0;
  }
}
