﻿:root {
  --primary: #3b82f6;
  --accent: #22c55e;
  --warning: #f97316;
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", "PingFang SC", "Roboto", sans-serif;
  background: var(--bg);
  color: var(--text);
}

.app {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 20px 80px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.header {
  text-align: center;
}

.header h1 {
  font-size: 32px;
  margin-bottom: 8px;
  font-weight: 600;
}

.subtitle {
  color: var(--muted);
  font-size: 14px;
}

.view {
  display: none;
  animation: fade 0.3s ease;
}

.view.active {
  display: block;
}

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

.question-card {
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.question-text {
  font-size: 22px;
  font-weight: 600;
  text-align: center;
}

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 16px;
}

.btn {
  min-width: 120px;
  height: 44px;
  border-radius: 12px;
  border: none;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn.primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.2);
}

.btn.secondary {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
}

.btn.ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid #e2e8f0;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 8px;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0;
  background: var(--primary);
  transition: width 0.3s ease;
}

.hint {
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  margin-top: 12px;
}

.label {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 8px;
}

.result-name {
  font-size: 26px;
  font-weight: 600;
  text-align: center;
}

.input {
  width: 100%;
  height: 44px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  padding: 0 12px;
  margin: 12px 0;
  font-size: 16px;
}

.input:focus {
  outline: 2px solid rgba(59, 130, 246, 0.4);
  border-color: var(--primary);
}

.analysis-text {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
}

.error {
  color: var(--warning);
  font-size: 13px;
  margin-top: 8px;
}

.hidden {
  display: none;
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #0f172a;
  color: #fff;
  padding: 10px 16px;
  border-radius: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.toast.show {
  opacity: 0.9;
}

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