/* 热爱东西启示录 - 清新可爱风格 */
:root {
  --bg: #faf9f7;
  --card: #ffffff;
  --text: #2d2a26;
  --text-muted: #6b6560;
  --accent: #e8b4bc;
  --accent-deep: #d4a0a8;
  --green: #a8d5ba;
  --green-deep: #8bc4a0;
  --yellow: #f5e6b8;
  --yellow-deep: #e8d49e;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 4px 20px rgba(45, 42, 38, 0.06);
  --shadow-hover: 0 8px 28px rgba(45, 42, 38, 0.1);
  --font: 'Noto Sans SC', -apple-system, sans-serif;
  --font-display: 'ZCOOL KuaiLe', 'Noto Sans SC', sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
}

.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 20px 48px;
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 28px;
}

.title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 8px;
  letter-spacing: 0.02em;
}

.subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0;
  font-weight: 400;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  background: var(--card);
  padding: 6px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.tab {
  flex: 1;
  padding: 12px 16px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

.tab:hover {
  color: var(--text);
  background: var(--yellow);
}

.tab.active {
  color: var(--text);
  background: var(--accent);
  box-shadow: 0 2px 8px rgba(232, 180, 188, 0.4);
}

/* Panel */
.panel {
  display: none;
}

.panel.active {
  display: block;
}

.panel-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 6px;
}

.panel-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0 0 20px;
}

/* Questions */
.questions {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.q-item {
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s;
}

.q-item:hover {
  box-shadow: var(--shadow-hover);
}

.q-item label {
  display: block;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.q-item label .q-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--green);
  color: var(--text);
  font-size: 0.75rem;
  margin-right: 8px;
  flex-shrink: 0;
}

.q-item textarea {
  width: 100%;
  min-height: 72px;
  padding: 10px 12px;
  border: 1px solid #eee;
  border-radius: 8px;
  font-family: var(--font);
  font-size: 0.9rem;
  color: var(--text);
  resize: vertical;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.q-item textarea::placeholder {
  color: #bbb;
}

.q-item textarea:focus {
  outline: none;
  border-color: var(--accent-deep);
  box-shadow: 0 0 0 3px rgba(232, 180, 188, 0.25);
}

/* Actions */
.actions {
  margin-top: 32px;
  text-align: center;
}

.btn {
  padding: 14px 32px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(212, 160, 168, 0.4);
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(212, 160, 168, 0.5);
}

.btn-secondary {
  background: var(--green);
  color: var(--text);
}

.btn-secondary:hover {
  background: var(--green-deep);
}

.hint {
  margin-top: 12px;
  color: var(--text-muted);
  font-size: 0.85rem;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

.api-settings {
  margin-top: 20px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.api-settings summary {
  cursor: pointer;
  color: var(--accent-deep);
}

.api-settings-inner {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.api-settings-inner label {
  width: 100%;
  max-width: 100%;
}

.api-settings-inner input {
  flex: 1;
  min-width: 180px;
  padding: 8px 12px;
  border: 1px solid #eee;
  border-radius: 8px;
  font-family: var(--font);
}

.api-settings-inner input:focus {
  outline: none;
  border-color: var(--accent-deep);
}

.btn-small {
  padding: 8px 16px;
  font-size: 0.9rem;
}

/* Report */
.report-section {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 2px dashed var(--accent);
}

.report-section[hidden] {
  display: none !important;
}

.report-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--text);
  margin: 0 0 20px;
  text-align: center;
}

.report-loading {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.report-loading[hidden] {
  display: none !important;
}

.spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto 16px;
  border: 3px solid var(--yellow);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.report-content {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.report-content[hidden] {
  display: none !important;
}

.report-block {
  margin-bottom: 24px;
}

.report-block:last-of-type {
  margin-bottom: 0;
}

.report-block h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-deep);
  margin: 0 0 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--yellow);
}

.report-text {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.7;
  white-space: pre-wrap;
}

.report-actions {
  margin-top: 24px;
  text-align: center;
}

/* Footer */
.footer {
  margin-top: 48px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
}

@media (max-width: 600px) {
  .page {
    padding: 16px 14px 32px;
  }

  .title {
    font-size: 1.6rem;
  }

  .tabs {
    flex-direction: column;
  }

  .q-item textarea {
    min-height: 60px;
  }
}
