@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;600;700&display=swap');

:root {
  --primary: #6366f1;
  --primary-light: #818cf8;
  --primary-dark: #4f46e5;
  --bg-gradient: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 50%, #f3e8ff 100%);
  --card-bg: rgba(255, 255, 255, 0.95);
  --card-bg-solid: #ffffff;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 10px 40px rgba(99, 102, 241, 0.12);
  --shadow-sm: 0 4px 16px rgba(99, 102, 241, 0.08);
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-light: #94a3b8;
  --border: #e2e8f0;
  --success: #10b981;
  --ad-bg: linear-gradient(135deg, #f59e0b, #f97316);
}

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

body {
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-gradient);
  min-height: 100vh;
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px;
  min-height: 100vh;
}

header {
  text-align: center;
  padding: 30px 0 20px;
}

header h1 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.hero {
  background: var(--card-bg-solid);
  border-radius: var(--radius);
  padding: 40px 30px;
  text-align: center;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

.hero-icon {
  font-size: 4rem;
  margin-bottom: 16px;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.hero h2 {
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.hero p {
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.stats {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
}

.stat-num {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-light);
}

.start-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 40px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.start-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
}

.quiz-page {
  display: none;
}

.quiz-page.active {
  display: block;
  animation: fadeIn 0.4s ease;
}

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

.progress-container {
  margin-bottom: 24px;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.progress-bar {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: 4px;
  transition: width 0.4s ease;
}

.question-card {
  background: var(--card-bg-solid);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.question-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.question-text {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 24px;
  line-height: 1.5;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.option {
  position: relative;
  padding: 16px 20px;
  padding-right: 50px;
  background: #f8fafc;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.25s ease;
  font-size: 0.95rem;
  color: var(--text-secondary);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.option:hover {
  background: #f1f5f9;
  border-color: var(--primary-light);
}

.option.selected {
  background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
  border-color: var(--primary);
  color: var(--primary-dark);
  font-weight: 500;
}

.check-icon {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border: 2px solid #cbd5e1;
  border-radius: 50%;
  transition: all 0.25s ease;
  pointer-events: none;
}

.option.selected .check-icon {
  background: var(--primary);
  border-color: var(--primary);
}

.option.selected .check-icon::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  background: white;
  border-radius: 50%;
}

.nav-buttons {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.btn {
  flex: 1;
  padding: 14px 24px;
  border: none;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-prev {
  background: #f1f5f9;
  color: var(--text-secondary);
}

.btn-prev:hover {
  background: #e2e8f0;
}

.btn-prev:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-next {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-next:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.25);
}

.result-page {
  display: none;
}

.result-page.active {
  display: block;
  animation: fadeIn 0.5s ease;
}

.result-card {
  background: var(--card-bg-solid);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  text-align: center;
  margin-bottom: 20px;
}

.result-emoji {
  font-size: 5rem;
  margin-bottom: 16px;
  animation: bounce 0.6s ease;
}

@keyframes bounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.result-type {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.result-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.result-subtitle {
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.result-desc {
  text-align: left;
  background: #f8fafc;
  padding: 20px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  line-height: 1.8;
  color: var(--text-secondary);
}

.result-section {
  margin-bottom: 20px;
  text-align: left;
}

.result-section h4 {
  color: var(--text-primary);
  font-size: 1rem;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  background: #e0e7ff;
  color: var(--primary-dark);
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 0.85rem;
}

.placeholder-text {
  color: var(--text-light);
  font-size: 0.9rem;
  font-style: italic;
}

.ad-unlock-section {
  background: var(--card-bg-solid);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  text-align: center;
}

.ad-unlock-section h3 {
  color: var(--text-primary);
  margin-bottom: 8px;
}

.ad-unlock-section p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.ad-unlock-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 18px;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  animation: pulse 2s infinite;
}

.ad-unlock-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(249, 115, 22, 0.4);
}

.ad-unlock-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  animation: none;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 4px 16px rgba(249, 115, 22, 0.3); }
  50% { box-shadow: 0 8px 28px rgba(249, 115, 22, 0.5); }
}

.share-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  background: white;
  color: var(--primary);
  border: 2px solid var(--primary);
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.share-btn:hover {
  background: var(--primary);
  color: white;
}

.home-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  background: #f1f5f9;
  color: var(--text-secondary);
  border: none;
  border-radius: 50px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.home-btn:hover {
  background: #e2e8f0;
}

.home-page {
  display: none;
}

.home-page.active {
  display: block;
}

.home-page.hidden {
  display: none;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 16px;
  cursor: pointer;
}

.back-link:hover {
  color: var(--primary);
}

@media (max-width: 480px) {
  .container { padding: 16px; }
  header h1 { font-size: 1.5rem; }
  .hero { padding: 30px 20px; }
  .hero-icon { font-size: 3rem; }
  .question-card { padding: 24px 20px; }
  .question-text { font-size: 1.05rem; }
  .result-card { padding: 24px 20px; }
  .result-emoji { font-size: 4rem; }
}