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

:root {
  --background: hsl(0, 0%, 100%);
  --foreground: hsl(215, 25%, 15%);
  --card: hsl(0, 0%, 100%);
  --primary: hsl(211, 65%, 37%);
  --primary-foreground: hsl(0, 0%, 100%);
  --secondary: hsl(211, 30%, 95%);
  --secondary-foreground: hsl(211, 65%, 37%);
  --muted: hsl(210, 20%, 96%);
  --muted-foreground: hsl(215, 12%, 50%);
  --accent: hsl(211, 45%, 90%);
  --border: hsl(214, 20%, 88%);
  --destructive: hsl(0, 72%, 51%);
  --radius: 0.625rem;
}

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

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--background);
  color: var(--foreground);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

h1, h2, h3 { font-family: 'DM Sans', 'Inter', system-ui, sans-serif; }

.container {
  max-width: 672px;
  margin: 0 auto;
  padding: 2.5rem 1rem 1rem;
}

/* Header */
header { text-align: center; margin-bottom: 2.5rem; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  background: var(--secondary);
  color: var(--secondary-foreground);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

header h1 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  line-height: 1.2;
}

header h1 span { color: var(--primary); }

header p {
  margin-top: 1rem;
  color: var(--muted-foreground);
  max-width: 32rem;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

/* Sections */
.dimension-section { margin-bottom: 2rem; }

.dimension-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dimension-title::before {
  content: '';
  width: 4px;
  height: 1.5rem;
  background: var(--primary);
  border-radius: 9999px;
  flex-shrink: 0;
}

/* Question cards */
.question-card {
  padding: 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card);
  margin-bottom: 1.25rem;
  transition: border-color 0.2s;
}

.question-card.unanswered-error {
  border-color: hsla(0, 72%, 51%, 0.5);
  background: hsla(0, 72%, 51%, 0.05);
}

.question-text {
  font-size: 0.875rem;
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

.question-number {
  color: var(--muted-foreground);
  font-weight: 500;
  margin-right: 0.375rem;
}

/* Likert scale */
.likert-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: 0.75rem;
}

.likert-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-foreground);
  font-weight: 600;
}

.likert-buttons {
  display: flex;
  gap: 1rem;
}

@media (min-width: 640px) {
  .likert-buttons { gap: 1.5rem; }
}

.likert-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.likert-box {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 4px;
  border: 2px solid hsla(211, 65%, 37%, 0.5);
  background: transparent;
  transition: all 0.15s;
}

.likert-btn:hover .likert-box { border-color: var(--primary); }

.likert-box.selected {
  background: var(--primary);
  border-color: var(--primary);
}

.likert-num {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  font-weight: 500;
}

/* Buttons */
.btn-row {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 0.5rem 0 1rem;
  flex-wrap: wrap;
}

.btn {
  padding: 0.875rem 2rem;
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--primary);
  color: var(--primary-foreground);
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}

.btn-primary:hover { opacity: 0.9; box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); }

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

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

/* Error */
.error-msg {
  color: var(--destructive);
  font-size: 0.875rem;
  font-weight: 500;
  text-align: center;
  margin-bottom: 1rem;
}

/* Results */
.results-wrapper {
  margin-top: 2.5rem;
  animation: fadeSlideIn 0.5s ease-out;
}

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(1rem); }
  to { opacity: 1; transform: translateY(0); }
}

.results-card {
  background: var(--card);
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  padding: 1.5rem 2rem;
}

.results-title {
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 1.5rem;
}

.chart-container {
  max-width: 400px;
  margin: 0 auto 2rem;
}

.scores-heading {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.scores-list { max-width: 24rem; margin: 0 auto; }

.score-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  background: hsla(210, 20%, 96%, 0.5);
  margin-bottom: 0.5rem;
}

.score-label { font-size: 0.875rem; font-weight: 500; }

.score-right { display: flex; align-items: center; gap: 0.5rem; }

.score-bar-bg {
  width: 6rem;
  height: 0.5rem;
  background: var(--muted);
  border-radius: 9999px;
  overflow: hidden;
}

.score-bar-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 9999px;
  transition: width 0.7s;
}

.score-value {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
  width: 2rem;
  text-align: right;
}

.results-footer {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  text-align: center;
  margin-top: 1.5rem;
}

.download-row {
  display: flex;
  justify-content: center;
  margin-top: 1.5rem;
}

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

footer {
  text-align: center;
  margin-top: 3rem;
  padding-bottom: 1rem;
}

footer p {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}
