:root {
  --bg-gradient: linear-gradient(135deg, #f6f8fd 0%, #f1f5f9 100%);
  --card-bg: rgba(255, 255, 255, 0.95);
  --primary-color: #4f46e5;
  --primary-hover: #4338ca;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border-color: rgba(255, 255, 255, 0.5);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

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

body {
  font-family: 'Pretendard', -apple-system, sans-serif;
  background: var(--bg-gradient);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.app-container {
  width: 100%;
  max-width: 480px;
  height: 100vh;
  max-height: 800px;
  position: relative;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--card-bg);
  box-shadow: var(--shadow);
  border-radius: 24px;
}

@media (max-width: 480px) {
  .app-container {
    height: 100vh;
    border-radius: 0;
    max-height: 100vh;
  }
}

.screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  min-height: 100%;
  padding: 40px 24px;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px) scale(0.98);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.screen.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  position: relative;
}

#home-screen {
  justify-content: center;
  align-items: center;
  text-align: center;
}
#result-screen {
  align-items: center;
  height: auto;
}

.main-title {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.4;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #1e293b 0%, #3b82f6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: 40px;
  word-break: keep-all;
}

.primary-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 16px 32px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  max-width: 300px;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.4);
}

.primary-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.5);
}

.primary-btn.outline {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  box-shadow: none;
}

.primary-btn.outline:hover {
  background: rgba(79, 70, 229, 0.05);
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  margin-bottom: 40px;
  overflow: hidden;
  flex-shrink: 0;
}

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

.question-title {
  font-size: 18px; /* Reduced to fit better */
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
  word-break: keep-all;
  overflow-wrap: break-word;
  margin-top: 10px;
  margin-bottom: 24px;
}

.question-list-container {
  display: flex;
  flex-direction: column;
  gap: 32px;
  margin-bottom: 32px;
}

.question-item {
  background: rgba(255, 255, 255, 0.4);
  padding: 24px 12px;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 4px 12px rgba(0,0,0,0.02);
}

.pagination-buttons {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
  padding-bottom: 20px;
}

.nav-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  flex: 1;
}

.nav-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
}

.nav-btn.outline {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.nav-btn.outline:hover {
  background: rgba(79, 70, 229, 0.05);
}

.nav-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* 5-Point Scale Circles */
.scale-options {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 100%;
  padding: 20px 0;
}

@media (max-width: 400px) {
  .scale-options {
    gap: 8px;
  }
}

.scale-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
}
.agree-label { color: #10b981; }
.disagree-label { color: #f43f5e; }

.circles-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
@media (max-width: 400px) {
  .circles-container {
    gap: 8px;
  }
}

.circle-btn {
  border-radius: 50%;
  border: 3px solid transparent;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  background-color: transparent;
}
.agree-strong { width: 56px; height: 56px; border-color: #10b981; }
.agree-soft { width: 44px; height: 44px; border-color: #34d399; }
.neutral { width: 34px; height: 34px; border-color: #94a3b8; }
.disagree-soft { width: 44px; height: 44px; border-color: #fb7185; }
.disagree-strong { width: 56px; height: 56px; border-color: #f43f5e; }

.circle-btn:hover { transform: scale(1.15); }
.circle-btn.selected { transform: scale(1.1); box-shadow: 0 0 10px rgba(0,0,0,0.1); }
.agree-strong.selected { background-color: #10b981; }
.agree-soft.selected { background-color: #34d399; }
.neutral.selected { background-color: #94a3b8; }
.disagree-soft.selected { background-color: #fb7185; }
.disagree-strong.selected { background-color: #f43f5e; }


/* Result Card */
.result-card {
  background: white;
  padding: 40px 24px;
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  border: 1px solid #f1f5f9;
  width: 100%;
}

.result-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  letter-spacing: 2px;
  margin-bottom: 12px;
}

.result-title {
  font-size: 42px;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 24px;
  letter-spacing: 2px;
}

.result-desc {
  font-size: 16px;
  line-height: 1.6;
  color: #334155;
  margin-bottom: 24px;
  word-break: keep-all;
}

/* Result Bars */
.result-bars-container {
  margin-top: 10px;
  margin-bottom: 30px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.bar-row {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.bar-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
  min-height: 38px;
}
.label-left { color: #2563eb; }
.label-right { color: #ef4444; }

.label-left, .label-right {
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  padding: 6px 12px;
  border-radius: 8px;
  display: inline-block;
}

.highlight-blue {
  background: rgba(59, 130, 246, 0.15);
  color: #1d4ed8 !important;
  font-weight: 800;
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
  transform: scale(1.08);
}

.highlight-red {
  background: rgba(239, 68, 68, 0.15);
  color: #b91c1c !important;
  font-weight: 800;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.3);
  transform: scale(1.08);
}

.dimmed {
  opacity: 0.3;
  font-weight: 500;
  color: #64748b !important;
}

.label-pct {
  font-size: 13px;
  color: inherit;
  font-weight: inherit;
  margin-left: 6px;
  margin-right: 6px;
}

.bar-track {
  width: 100%;
  height: 12px;
  background: transparent;
  border-radius: 6px;
  position: relative;
  overflow: hidden;
}

.bar-fill-left {
  height: 100%;
  background: #3b82f6;
  position: absolute;
  left: 0;
  top: 0;
  width: 0%;
  transition: width 1.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bar-fill-right {
  height: 100%;
  background: #ef4444;
  position: absolute;
  right: 0;
  top: 0;
  width: 0%;
  transition: width 1.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
