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

:root {
  --jade-primary: #10b981;
  --jade-dark: #059669;
  --coral-accent: #fb923c;
  --bg-warm: #fafaf9;
  --surface-white: #ffffff;
  --text-dark: #1f2937;
  --text-gray: #6b7280;
  --bubble-gray: #f3f4f6;
  --correction-bg: #fff7ed;
  --correction-border: #fed7aa;
}

body {
  font-family: 'Inter', system-ui, 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-warm);
  color: var(--text-dark);
  line-height: 1.6;
}

/* Landing Page Styles */
.landing-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.landing-content {
  max-width: 600px;
  width: 100%;
  text-align: center;
}

.hero h1 {
  font-size: 48px;
  font-weight: 700;
  color: var(--jade-primary);
  margin-bottom: 16px;
}

.subtitle {
  font-size: 20px;
  color: var(--text-gray);
  margin-bottom: 48px;
}

.features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-bottom: 48px;
}

@media (min-width: 640px) {
  .features {
    grid-template-columns: repeat(3, 1fr);
  }
}

.feature {
  background: var(--surface-white);
  padding: 24px;
  border-radius: 18px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.feature-icon {
  font-size: 32px;
  margin-bottom: 12px;
}

.feature h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-dark);
}

.feature p {
  font-size: 14px;
  color: var(--text-gray);
}

.cta-button {
  display: inline-block;
  background: var(--jade-primary);
  color: white;
  padding: 16px 48px;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s, transform 0.2s;
}

.cta-button:hover {
  background: var(--jade-dark);
  transform: translateY(-2px);
}

.cta-button:active {
  transform: translateY(0);
}

/* Chat Interface Styles */
.chat-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  max-width: 600px;
  margin: 0 auto;
  background: var(--surface-white);
}

.chat-header {
  background: var(--jade-primary);
  color: white;
  padding: 16px 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 10;
}

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

.chat-header h1 {
  font-size: 24px;
  font-weight: 600;
}

.new-chat-btn {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

.new-chat-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.new-chat-btn:active {
  background: rgba(255, 255, 255, 0.15);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: var(--bg-warm);
}

.message {
  display: flex;
  margin-bottom: 16px;
  animation: slideIn 0.3s ease-out;
}

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

.message.user {
  justify-content: flex-end;
}

.message.assistant {
  justify-content: flex-start;
}

.message-bubble {
  max-width: 75%;
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 16px;
  line-height: 1.5;
  word-wrap: break-word;
}

.message-bubble.chinese {
  font-size: 18px;
}

.message.user .message-bubble {
  background: var(--jade-primary);
  color: white;
  border-bottom-right-radius: 4px;
}

.message.assistant .message-bubble {
  background: var(--bubble-gray);
  color: var(--text-dark);
  border-bottom-left-radius: 4px;
}

.typing-indicator {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background: var(--bubble-gray);
  border-radius: 18px;
  border-bottom-left-radius: 4px;
  max-width: 75%;
}

.typing-dot {
  width: 8px;
  height: 8px;
  margin: 0 2px;
  background: var(--text-gray);
  border-radius: 50%;
  animation: typing 1.4s infinite;
}

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

.typing-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typing {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.7;
  }
  30% {
    transform: translateY(-10px);
    opacity: 1;
  }
}

.chat-input-container {
  padding: 16px 20px;
  background: var(--surface-white);
  border-top: 1px solid #e5e7eb;
  position: sticky;
  bottom: 0;
}

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

.message-input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 16px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.message-input:focus {
  border-color: var(--jade-primary);
}

.send-button {
  background: var(--jade-primary);
  color: white;
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.2s;
}

.send-button:hover {
  background: var(--jade-dark);
}

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

.send-button:disabled {
  background: #d1d5db;
  cursor: not-allowed;
}

/* Mobile optimization */
@media (max-width: 640px) {
  .hero h1 {
    font-size: 36px;
  }

  .subtitle {
    font-size: 18px;
  }

  .chat-header h1 {
    font-size: 20px;
  }

  .message-bubble {
    max-width: 85%;
  }
}
