/* 全局集中样式（遵循集中化样式系统约定，参考 washine.tech 风格） */
:root {
  --bg: #f0fdf4;
  --bg-light: #f7fef9;
  --bg-gradient: linear-gradient(135deg, #0EB698 0%, #0a8f76 100%);
  --card: #ffffff;
  --text: #0f172a;
  --text-light: #1e293b;
  --muted: #64748b;
  --primary-green: #0EB698;
  --light-green: #F3FFF5;
  --primary: #0EB698;
  --primary-hover: #0a8f76;
  --primary-light: #d1fae5;
  --border: #cbd5e1;
  --border-light: #e2e8f0;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-primary: 0 8px 16px -4px rgba(14, 182, 152, 0.3);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  background-image: linear-gradient(to bottom, #f0fdf4 0%, #ecfdf5 50%, #f0fdf4 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'WenQuanYi Micro Hei', sans-serif;
  line-height: 1.6;
  min-height: 100vh;
}

.container {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 16px;
}
header.container {
  padding: 20px 16px;
}
main.container {
  padding-top: 0;
}
#questionnaire.card {
  margin-top: 0;
  margin-bottom: 24px;
}

header {
  background: var(--bg-gradient);
  color: #ffffff;
  padding: 20px 16px;
  margin: 0 0 16px 0;
  border-radius: 0 0 16px 16px;
  box-shadow: var(--shadow-lg);
}
header h1 {
  margin: 0 0 6px 0;
  font-size: 26px;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.subtitle {
  color: rgba(255, 255, 255, 0.95);
  margin-top: 0;
  font-size: 13px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  line-height: 1.5;
}

.intro-card {
  background: linear-gradient(135deg, var(--primary-light) 0%, #e6fef0 100%);
  border: 1px solid var(--primary);
  border-radius: 12px;
  padding: 12px 20px;
  margin: 16px 0 24px;
  text-align: center;
  font-size: 14px;
  color: var(--text-light);
  box-shadow: 0 2px 8px rgba(14, 182, 152, 0.1);
}
.intro-card p {
  margin: 0;
  line-height: 1.6;
}

.card {
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 32px;
  margin: 24px 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.3s ease, transform 0.2s ease;
  backdrop-filter: blur(10px);
}
.card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.hidden { display: none; }

.question {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  transition: background-color 0.2s ease;
}
.question:last-child { border-bottom: none; }
.question:hover {
  background-color: #f7fafc;
  margin: 0 -24px;
  padding: 16px 24px;
  border-radius: 8px;
}
.q-text {
  margin: 0 0 12px;
  font-weight: 500;
  color: var(--text);
}

.scale {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.scale label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 8px;
  background: #f7fafc;
  border: 2px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  user-select: none;
  position: relative;
  transition: all 0.2s ease;
  font-weight: 500;
  color: var(--text);
}
.scale label:hover {
  background: #edf2f7;
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.scale input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.scale label:has(input:checked) {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(14, 182, 152, 0.4);
  transform: translateY(-2px);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.scale label span {
  pointer-events: none;
}

.legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.actions { margin-top: 16px; display: flex; gap: 12px; }

.btn {
  appearance: none;
  border: none;
  color: #ffffff;
  padding: 14px 32px;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 700;
  font-size: 16px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  position: relative;
  overflow: hidden;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}
.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}
.btn:hover::before {
  width: 300px;
  height: 300px;
}
.btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}
.btn:active {
  transform: translateY(-1px) scale(0.98);
}
.btn.primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  border: 2px solid var(--primary);
}
.btn.primary:hover {
  background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary) 100%);
  box-shadow: var(--shadow-primary);
}
.btn.secondary {
  background: #718096;
  border-color: #718096;
}
.btn.secondary:hover {
  background: #4a5568;
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Progress bar */
.progress-bar {
  position: relative;
  height: 36px;
  background: var(--primary-light);
  border-radius: 18px;
  margin-bottom: 32px;
  overflow: hidden;
  border: 2px solid var(--primary);
  box-shadow: 0 2px 8px rgba(14, 182, 152, 0.15);
}
.progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: var(--bg-gradient);
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(14, 182, 152, 0.3);
}
.progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  z-index: 1;
}

/* Dimension container */
.dimension-container {
  min-height: 400px;
}
.dimension-header-section {
  margin-bottom: 32px;
}
.questions-list {
  display: flex;
  flex-direction: column;
  gap: 32px;
  margin-bottom: 32px;
}
.question-item {
  padding: 24px;
  margin-bottom: 24px;
  background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.question-item:hover:not(.disabled) {
  border-color: var(--primary-light);
  box-shadow: 0 4px 16px rgba(14, 182, 152, 0.1);
  transform: translateY(-2px);
}
.question-item.disabled {
  opacity: 0.5;
  pointer-events: none;
}
.question-item.disabled .question-text {
  color: var(--muted);
}
.question-item:last-child {
  margin-bottom: 0;
}
.scale-container {
  margin-top: 16px;
}
.q-text {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 32px;
  color: var(--text);
  line-height: 1.5;
}
.dimension-header {
  margin-bottom: 24px;
  padding: 20px 24px;
  background: linear-gradient(135deg, var(--primary-light) 0%, #e6fef0 100%);
  border-radius: 16px;
  border: 2px solid var(--primary);
  box-shadow: 0 4px 12px rgba(14, 182, 152, 0.15);
}
.dimension-header strong {
  font-size: 22px;
  color: var(--primary);
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}
.dimension-desc {
  font-size: 15px;
  color: var(--muted);
  font-weight: 500;
}
.question-text {
  font-size: 19px;
  font-weight: 500;
  line-height: 1.7;
  margin: 0 0 20px;
  color: var(--text-light);
  letter-spacing: 0.01em;
}

/* Scale options for single question */
.scale-options {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.scale-option {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 10px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 2px solid var(--border-light);
  border-radius: 16px;
  cursor: pointer;
  user-select: none;
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 700;
  font-size: 20px;
  color: var(--text);
  min-height: 70px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}
.scale-option::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.scale-option:hover {
  background: linear-gradient(135deg, var(--primary-light) 0%, #e6fef0 100%);
  border-color: var(--primary);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 6px 20px rgba(14, 182, 152, 0.25);
}
.scale-option:hover::before {
  opacity: 0.1;
}
.scale-option:active {
  transform: translateY(-1px) scale(0.98);
}
.scale-option input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.scale-option:has(input:checked) {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: var(--shadow-primary);
  transform: translateY(-3px) scale(1.05);
  z-index: 1;
}
.scale-option:has(input:checked)::before {
  opacity: 0;
}
.scale-option:has(input:checked) span {
  position: relative;
  z-index: 1;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  font-weight: 700;
  color: #ffffff;
}
.scale-option span {
  pointer-events: none;
  position: relative;
  z-index: 1;
  transition: all 0.3s ease;
}
.scale-option.disabled {
  background: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
  color: #94a3b8 !important;
  cursor: not-allowed !important;
  opacity: 0.6;
  transform: none !important;
  box-shadow: none !important;
}
.scale-option.disabled:hover {
  background: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
  transform: none !important;
  box-shadow: none !important;
}
.scale-option.disabled::before {
  display: none;
}
.scale-options.disabled {
  pointer-events: none;
}

.question-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 32px;
}
.question-nav .btn {
  flex: 1;
  max-width: 200px;
}

/* Analysis content */
.analysis-content {
  line-height: 1.8;
  color: var(--text);
  margin-top: 32px;
  padding-top: 32px;
  border-top: 2px solid var(--border-light);
}
.save-image-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 40px;
  padding-top: 32px;
  width: 100%;
}
.save-image-container .btn {
  min-width: 200px;
  padding: 14px 32px;
  font-size: 16px;
  font-weight: 600;
}
.tool-recommendation-images {
  display: flex;
  flex-direction: row;
  gap: 16px;
  margin: 20px 0;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: nowrap;
}
.tool-recommendation-image {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px;
  background: linear-gradient(135deg, rgba(14, 182, 152, 0.05) 0%, rgba(255, 255, 255, 0.5) 100%);
  border-radius: 16px;
  flex: 0 1 45%;
  max-width: 45%;
}
.tool-recommendation-image img {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(14, 182, 152, 0.15);
  transition: transform 0.3s ease;
  object-fit: contain;
}
.tool-recommendation-image img:hover {
  transform: scale(1.02);
}
.analysis-content h3 {
  font-size: 24px;
  font-weight: 700;
  margin: 24px 0 16px;
  color: var(--primary);
  border-bottom: 2px solid var(--border);
  padding-bottom: 8px;
}
.analysis-content h3:first-child {
  margin-top: 0;
}
.analysis-content h4 {
  font-size: 20px;
  font-weight: 600;
  margin: 20px 0 12px;
  color: var(--primary);
}
.analysis-content p {
  margin: 12px 0;
  line-height: 1.8;
}
.analysis-content ul {
  margin: 12px 0;
  padding-left: 24px;
}
.analysis-content li {
  margin: 8px 0;
  line-height: 1.7;
}
.analysis-content strong {
  color: var(--primary);
  font-weight: 600;
}
.analysis-content .loading {
  text-align: center;
  padding: 40px;
  color: var(--muted);
  font-size: 16px;
}
.analysis-content .error {
  padding: 20px;
  background: #fed7d7;
  color: #c53030;
  border-radius: 8px;
  border-left: 4px solid #c53030;
}
.analysis-content hr {
  border: none;
  border-top: 2px solid var(--border);
  margin: 24px 0;
}

.type-summary {
  margin-bottom: 24px;
}
.type-badge {
  font-size: 48px;
  font-weight: 700;
  color: var(--primary);
  text-align: center;
  margin-bottom: 12px;
  padding: 20px;
  background: var(--light-green);
  border-radius: 16px;
  border: 3px solid var(--primary);
}
.type-description {
  font-size: 18px;
  color: var(--muted);
  text-align: center;
  line-height: 1.6;
}
.dimension-breakdown {
  margin-top: 24px;
  display: flex;
  justify-content: center;
  width: 100%;
  overflow: visible;
}
#result-content {
  width: 100%;
  max-width: 100%;
  overflow: visible;
  box-sizing: border-box;
}
.radar-chart-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  width: 100%;
  max-width: 100%;
  padding: 20px;
  background: linear-gradient(135deg, rgba(14, 182, 152, 0.03) 0%, rgba(255, 255, 255, 0.5) 100%);
  border-radius: 20px;
  backdrop-filter: blur(10px);
  box-sizing: border-box;
  overflow: visible;
}
.radar-chart {
  display: block;
  margin: 0 auto;
  overflow: visible;
  filter: drop-shadow(0 4px 12px rgba(14, 182, 152, 0.1));
  max-width: 100%;
  height: auto;
}
.radar-bg-circle {
  animation: pulseBg 3s ease-in-out infinite;
}
@keyframes pulseBg {
  0%, 100% {
    opacity: 0.2;
    transform: scale(1);
  }
  50% {
    opacity: 0.3;
    transform: scale(1.02);
  }
}
.radar-polygon {
  animation: fadeInPolygon 1s cubic-bezier(0.34, 1.56, 0.64, 1);
  transition: all 0.3s ease;
}
.radar-polygon:hover {
  filter: drop-shadow(0 6px 16px rgba(14, 182, 152, 0.25));
  transform: scale(1.02);
  transform-origin: center;
}
@keyframes fadeInPolygon {
  from {
    opacity: 0;
    transform: scale(0.85);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
.data-point {
  animation: fadeInPoint 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation-fill-mode: both;
  cursor: pointer;
  transition: transform 0.3s ease;
}
.data-point:hover {
  transform: scale(1.15);
}
.data-point circle:last-of-type {
  transition: r 0.3s ease;
}
.data-point:hover circle:last-of-type {
  r: 9;
}
@keyframes fadeInPoint {
  from {
    opacity: 0;
    transform: scale(0) rotate(-180deg);
  }
  to {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}
.dimension-label-group {
  animation: fadeInLabel 0.6s ease-out;
  animation-fill-mode: both;
  cursor: pointer;
  transition: transform 0.3s ease;
}
.dimension-label-group:hover {
  transform: scale(1.1);
}
@keyframes fadeInLabel {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.radar-legend {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  width: 100%;
  max-width: 450px;
}
.legend-item {
  display: flex;
  flex-direction: column;
  padding: 16px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(243, 255, 245, 0.8) 100%);
  border-radius: 12px;
  border: 1px solid rgba(14, 182, 152, 0.15);
  box-shadow: 0 2px 8px rgba(14, 182, 152, 0.08);
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}
.legend-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(14, 182, 152, 0.15);
  border-color: rgba(14, 182, 152, 0.3);
}
.legend-label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
  font-weight: 500;
  letter-spacing: 0.3px;
}
.legend-value {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.2px;
}
.dimension-scores {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.dimension-item {
  background: #f7fafc;
  padding: 20px;
  border-radius: 12px;
  border-left: 4px solid var(--primary);
}
.dimension-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.dimension-label strong {
  font-size: 18px;
  color: var(--text);
  font-weight: 600;
}
.dimension-level {
  font-size: 16px;
  font-weight: 700;
  padding: 4px 12px;
  background: rgba(14, 182, 152, 0.1);
  border-radius: 12px;
}
.dimension-bar-container {
  margin-bottom: 12px;
}
.dimension-bar {
  height: 12px;
  background: #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 8px;
  position: relative;
}
.dimension-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.dimension-fill.positive {
  background: var(--primary);
}
.dimension-fill.negative {
  background: var(--primary);
  opacity: 0.7;
}
.dimension-indicator {
  display: flex;
  justify-content: center;
  margin-top: 4px;
}
.dimension-type {
  font-size: 14px;
  font-weight: 600;
  padding: 4px 16px;
  border-radius: 12px;
  background: var(--primary-light);
  color: var(--primary);
}
.dimension-type.negative {
  background: #fef3c7;
  color: #d97706;
}
.dimension-result {
  font-size: 15px;
  color: var(--text-light);
  line-height: 1.7;
  margin-top: 8px;
}

.analysis-content, .recommendation {
  white-space: pre-wrap;
  line-height: 1.8;
  color: var(--text);
}
.analysis-content {
  background: #f7fafc;
  padding: 20px;
  border-radius: 12px;
  border-left: 4px solid var(--primary);
}
.recommendation {
  background: linear-gradient(135deg, #edf2f7, #e8ecf1);
  padding: 20px;
  border-radius: 12px;
  margin-top: 16px;
  border: 2px solid var(--primary);
}

.footer {
  color: var(--muted);
  text-align: center;
  padding: 32px 16px 24px;
  font-size: 14px;
}

@media (max-width: 640px) {
  .container {
    padding: 12px;
  }
  
  header {
    padding: 16px 12px;
    margin-bottom: 12px;
  }
  header h1 {
    font-size: 22px;
    margin-bottom: 4px;
  }
  .subtitle {
    font-size: 12px;
  }
  
  .intro-card {
    padding: 10px 16px;
    font-size: 13px;
    margin: 12px 0 16px;
  }
  
  .card {
    padding: 20px 16px;
    margin: 16px 0;
    border-radius: 16px;
  }
  
  .dimension-header {
    padding: 16px 20px;
  }
  .dimension-header strong {
    font-size: 18px;
  }
  .dimension-desc {
    font-size: 13px;
  }
  
  .question-item {
    padding: 16px;
    margin-bottom: 20px;
  }
  .question-text {
    font-size: 17px;
    margin-bottom: 16px;
  }
  
  .scale-options {
    gap: 6px;
    margin-bottom: 12px;
  }
  .scale-option {
    padding: 14px 6px;
    font-size: 16px;
    min-height: 56px;
    border-radius: 12px;
  }
  
  .legend {
    font-size: 11px;
    margin-top: 4px;
  }
  
  .question-nav {
    margin-top: 24px;
    flex-direction: column;
  }
  .question-nav .btn {
    max-width: none;
    width: 100%;
    padding: 12px 24px;
  }
  
  .progress-bar {
    height: 28px;
    margin-bottom: 20px;
  }
  .progress-text {
    font-size: 12px;
  }
  
  .type-badge {
    font-size: 36px;
    padding: 16px;
  }
  .type-description {
    font-size: 16px;
  }
  
  .dimension-item {
    padding: 16px;
  }
  .dimension-label strong {
    font-size: 16px;
  }
  .dimension-level {
    font-size: 14px;
    padding: 3px 10px;
  }
  .dimension-bar {
    height: 10px;
  }
  .dimension-result {
    font-size: 14px;
  }
  
  .analysis-content {
    margin-top: 24px;
    padding-top: 24px;
  }
  .analysis-content h3 {
    font-size: 20px;
  }
  .analysis-content h4 {
    font-size: 18px;
  }
  
  .radar-chart-container {
    gap: 20px;
    padding: 16px;
    border-radius: 16px;
  }
  .radar-chart {
    width: 320px;
    height: 320px;
  }
  .radar-legend {
    grid-template-columns: 1fr;
    max-width: 100%;
    gap: 12px;
  }
  .legend-item {
    padding: 14px;
  }
  
  .save-image-container {
    margin-top: 32px;
    padding-top: 24px;
  }
  .save-image-container .btn {
    min-width: 180px;
    width: 100%;
    max-width: 300px;
    padding: 12px 24px;
    font-size: 15px;
  }
  
  .tool-recommendation-images {
    flex-direction: column;
    margin: 20px 0;
    gap: 16px;
  }
  .tool-recommendation-image {
    padding: 12px;
    width: 100%;
  }
  .tool-recommendation-image img {
    width: 100%;
    max-width: 100%;
    border-radius: 10px;
  }
}


