/* ============================================
   PawLang – 琥珀专业风格
   ============================================ */

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

:root {
  --bg-primary: #faf7f2;
  --bg-card: #ffffff;
  --bg-input: #f5f0e8;
  --border: #e8e0d0;
  --text-primary: #1a1a16;
  --text-secondary: #8a8578;
  --accent: #f59e0b;
  --accent-light: #d97706;
  --accent-dim: rgba(245, 158, 11, 0.08);
  --radius: 8px;
  --radius-lg: 12px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

html, body { height: 100%; overflow: hidden; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  display: flex;
  justify-content: center;
}

.app-container {
  width: 100%;
  max-width: 480px;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ============================================
   Header
   ============================================ */
.app-header {
  padding: 16px 20px;
  padding-top: max(16px, env(safe-area-inset-top));
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

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

.logo-text h1 {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.beta-badge {
  font-size: 11px;
  font-weight: 500;
  color: var(--accent-light);
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 4px;
  padding: 2px 8px;
  letter-spacing: 0;
}

.subtitle {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* ============================================
   Chat Area
   ============================================ */
.chat-area {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.chat-welcome { text-align: center; }

.welcome-title {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.welcome-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 28px;
  line-height: 1.5;
}

/* Quick Prompts */
.quick-prompts {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quick-prompt {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 14px;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, background 0.15s;
  font-family: inherit;
}

.quick-prompt:hover { border-color: var(--accent); }
.quick-prompt:active {
  background: var(--accent-dim);
  border-color: var(--accent-light);
}

/* Chat Messages */
.chat-message {
  margin-bottom: 16px;
  max-width: 85%;
  animation: fadeIn 0.2s ease;
}

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

.chat-message.user {
  align-self: flex-end;
  background: var(--accent-dim);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: var(--radius-lg) var(--radius-lg) 4px var(--radius-lg);
  padding: 12px 16px;
  font-size: 14px;
  line-height: 1.5;
}

.chat-message.ai {
  align-self: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg) var(--radius-lg) var(--radius-lg) 4px;
  padding: 12px 16px;
  font-size: 14px;
  line-height: 1.6;
}

.chat-message.ai .ai-label {
  font-size: 11px;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 6px;
}

/* ============================================
   Input Area
   ============================================ */
.input-area {
  padding: 12px 16px;
  padding-bottom: calc(12px + var(--safe-bottom));
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--bg-primary);
}

.input-container {
  display: flex;
  gap: 8px;
  align-items: center;
}

.message-input {
  flex: 1;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 15px;
  outline: none;
  font-family: inherit;
  transition: border-color 0.15s;
}

.message-input:focus { border-color: var(--accent); }
.message-input::placeholder { color: #b5b0a5; }

.send-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  border: none;
  background: var(--accent);
  color: #1a1a16;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s;
}

.send-btn:active { background: var(--accent-light); }

/* ============================================
   Pricing Bar
   ============================================ */
.pricing-bar {
  text-align: center;
  padding-top: 10px;
  font-size: 12px;
  color: var(--text-secondary);
}

.pricing-divider { margin: 0 6px; color: #c5c0b5; }

.pricing-trial { color: var(--text-secondary); }

.pricing-clone { color: var(--accent-light); font-weight: 600; }

.footer-links {
  text-align: center;
  padding-top: 6px;
  font-size: 11px;
}

.footer-links a {
  color: #8a8578;
  text-decoration: none;
}

/* ============================================
   Typing Indicator
   ============================================ */
.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 4px 0;
}

.typing-indicator span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-secondary);
  animation: typing 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 typing {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.3; }
  30% { transform: translateY(-4px); opacity: 1; }
}

/* ============================================
   Responsive
   ============================================ */
@media (min-width: 481px) {
  .app-container {
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
  }
}

/* v1.1 */
