/* ==================== RESET & BASE ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background: #f8f9fa;
  color: #2c3e50;
  line-height: 1.6;
}

button,
input,
select,
textarea {
  font: inherit;
}

.app-alert-root {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 2000;
}

.app-alert-root.is-visible {
  display: flex;
}

.app-alert-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 28, 45, 0.44);
  backdrop-filter: blur(5px);
}

.app-alert-card {
  position: relative;
  width: min(460px, 100%);
  padding: 28px 24px 22px;
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: 0 24px 64px rgba(15, 37, 58, 0.22);
  border: 1px solid rgba(44, 103, 148, 0.12);
  text-align: center;
  animation: appAlertEnter 0.22s ease-out;
}

.app-alert-dismiss {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 12px;
  background: rgba(44, 103, 148, 0.08);
  color: #53728e;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.app-alert-dismiss:hover {
  background: rgba(44, 103, 148, 0.16);
  transform: translateY(-1px);
}

.app-alert-icon {
  width: 68px;
  height: 68px;
  margin: 0 auto 16px;
  border-radius: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #ffffff;
  background: linear-gradient(135deg, #2f80ed 0%, #45b7d1 100%);
  box-shadow: 0 16px 28px rgba(47, 128, 237, 0.28);
}

.app-alert-card[data-tone="success"] .app-alert-icon {
  background: linear-gradient(135deg, #27ae60 0%, #6fcf97 100%);
  box-shadow: 0 16px 28px rgba(39, 174, 96, 0.28);
}

.app-alert-card[data-tone="warning"] .app-alert-icon {
  background: linear-gradient(135deg, #f39c12 0%, #f1c40f 100%);
  box-shadow: 0 16px 28px rgba(243, 156, 18, 0.28);
}

.app-alert-card[data-tone="error"] .app-alert-icon {
  background: linear-gradient(135deg, #eb5757 0%, #c0392b 100%);
  box-shadow: 0 16px 28px rgba(192, 57, 43, 0.28);
}

.app-alert-title {
  margin: 0 0 8px;
  font-size: 24px;
  line-height: 1.25;
  color: #17324d;
}

.app-alert-message {
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
  color: #4f6477;
}

.app-alert-button {
  margin-top: 20px;
  min-width: 140px;
  padding: 12px 18px;
  border: none;
  border-radius: 14px;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(135deg, #2f80ed 0%, #45b7d1 100%);
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(47, 128, 237, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.app-alert-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 28px rgba(47, 128, 237, 0.26);
}

.app-confirm-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.app-confirm-button {
  flex: 1 1 0;
  min-height: 48px;
  padding: 12px 16px;
  border-radius: 14px;
  border: none;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.app-confirm-button:hover {
  transform: translateY(-1px);
}

.app-confirm-button.is-secondary {
  background: #edf3f9;
  color: #476179;
}

.app-confirm-button.is-secondary:hover {
  background: #e1ebf4;
}

.app-confirm-button.is-primary {
  color: #ffffff;
  background: linear-gradient(135deg, #f39c12 0%, #f1c40f 100%);
  box-shadow: 0 12px 24px rgba(243, 156, 18, 0.22);
}

.app-confirm-button.is-primary:hover {
  box-shadow: 0 16px 28px rgba(243, 156, 18, 0.28);
}

.app-alert-card[data-tone="success"] .app-alert-button {
  background: linear-gradient(135deg, #27ae60 0%, #6fcf97 100%);
  box-shadow: 0 12px 24px rgba(39, 174, 96, 0.22);
}

.app-alert-card[data-tone="warning"] .app-alert-button {
  background: linear-gradient(135deg, #f39c12 0%, #f1c40f 100%);
  box-shadow: 0 12px 24px rgba(243, 156, 18, 0.22);
}

.app-alert-card[data-tone="error"] .app-alert-button {
  background: linear-gradient(135deg, #eb5757 0%, #c0392b 100%);
  box-shadow: 0 12px 24px rgba(192, 57, 43, 0.22);
}

@keyframes appAlertEnter {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 600px) {
  .app-alert-root {
    padding: 14px;
  }

  .app-alert-card {
    padding: 24px 18px 18px;
    border-radius: 20px;
  }

  .app-alert-icon {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    font-size: 24px;
  }

  .app-alert-title {
    font-size: 22px;
  }

  .app-alert-message {
    font-size: 14px;
  }

  .app-alert-button {
    width: 100%;
  }

  .app-confirm-actions {
    flex-direction: column-reverse;
  }
}

/* ==================== SURVEY PAGE ==================== */
.survey-container {
  max-width: 860px;
  margin: 0 auto;
  padding: 24px 20px 40px;
}

/* Header */
.survey-header {
  background: rgba(255, 255, 255, 0.94);
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 14px 32px rgba(31, 53, 85, 0.08);
  border: 1px solid rgba(52, 152, 219, 0.08);
  backdrop-filter: blur(10px);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.logo-icon {
  font-size: 48px;
  flex-shrink: 0;
}

.logo-text h1 {
  font-size: 24px;
  font-weight: 700;
  color: #2c3e50;
  margin: 0;
  line-height: 1.2;
}

.logo-text p {
  font-size: 14px;
  color: #6c757d;
  margin: 0;
}

/* Timer */
.timer-container {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  position: fixed;
  top: calc(18px + env(safe-area-inset-top));
  right: 20px;
  z-index: 80;
}

.timer {
  min-width: 120px;
  justify-content: center;
  background: rgba(239, 246, 255, 0.94);
  padding: 12px 18px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 700;
  color: #24557c;
  transition: all 0.3s ease;
  border: 1px solid rgba(52, 152, 219, 0.16);
  box-shadow:
    0 16px 32px rgba(31, 53, 85, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(14px);
}

.timer-warning {
  background: #dc3545;
  color: white;
  animation: pulse 1s infinite;
}

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

/* Progress Bar */
.progress-wrapper {
  margin-bottom: 28px;
  background: white;
  border-radius: 18px;
  padding: 18px 20px;
  box-shadow: 0 10px 30px rgba(31, 53, 85, 0.06);
}

.progress-bar {
  background: #e9ecef;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  background: linear-gradient(90deg, #4caf50 0%, #45b7d1 100%);
  height: 100%;
  transition: width 0.3s ease;
}

.progress-text {
  text-align: center;
  margin-top: 10px;
  font-size: 14px;
  color: #6c757d;
  font-weight: 600;
}

/* Section Card */
.section-card {
  background: white;
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.section-title {
  font-size: 28px;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 8px;
}

.section-description {
  font-size: 16px;
  color: #6c757d;
  margin-bottom: 32px;
}

/* Form Elements */
.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #495057;
  margin-bottom: 8px;
}

.required {
  color: #dc3545;
}

.form-input,
.form-select {
  width: 100%;
  padding: 12px 16px;
  font-size: 16px;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  transition: all 0.3s ease;
  font-family: inherit;
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: #4caf50;
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

/* Question Card */
.question-card {
  background: white;
  border-radius: 12px;
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  display: none;
}

.question-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid #e9ecef;
}

.question-number {
  font-size: 14px;
  font-weight: 600;
  color: #6c757d;
}

.question-dimension {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #4caf50 0%, #45b7d1 100%);
  padding: 4px 12px;
  border-radius: 12px;
}

.dimension-header {
  margin-bottom: 24px;
}

.dimension-title {
  font-size: 24px;
  font-weight: 700;
  color: #2c3e50;
  padding-bottom: 12px;
  border-bottom: 3px solid #4caf50;
}

.question-title {
  font-size: 20px;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 12px;
}

/* Aspect Description */
.aspect-description {
  background: #f0f7ff;
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  border-left: 4px solid #4caf50;
}

.aspect-description p {
  font-size: 14px;
  color: #495057;
  line-height: 1.6;
  margin: 0;
}

/* Behavior Item */
.behavior-item {
  background: white;
  padding: 22px;
  border-radius: 20px;
  margin-bottom: 18px;
  border: 1px solid #e3edf6;
  box-shadow: 0 10px 26px rgba(31, 53, 85, 0.06);
}

.behavior-text {
  font-size: 17px;
  color: #2f4356;
  margin-bottom: 18px;
  font-weight: 600;
  line-height: 1.65;
}

/* Scale Container */
.scale-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.scale-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.scale-hint {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #7d8fa1;
}

.scale-label {
  font-size: 13px;
  color: #6c757d;
  font-weight: 500;
  min-width: 104px;
}

/* Scale Buttons with Gradient Colors */
.scale-buttons {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}

.scale-btn {
  min-height: 48px;
  padding: 10px 0;
  border: 2px solid #dee2e6;
  background: white;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #495057;
  touch-action: manipulation;
}

.scale-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.scale-btn:focus-visible {
  outline: 3px solid rgba(69, 183, 209, 0.28);
  outline-offset: 2px;
}

/* Color gradient from red (1) to green (10) */
.scale-btn[data-value="1"].selected {
  background: #d32f2f;
  border-color: #d32f2f;
  color: white;
}

.scale-btn[data-value="2"].selected {
  background: #e53935;
  border-color: #e53935;
  color: white;
}

.scale-btn[data-value="3"].selected {
  background: #f44336;
  border-color: #f44336;
  color: white;
}

.scale-btn[data-value="4"].selected {
  background: #ff5722;
  border-color: #ff5722;
  color: white;
}

.scale-btn[data-value="5"].selected {
  background: #ff9800;
  border-color: #ff9800;
  color: white;
}

.scale-btn[data-value="6"].selected {
  background: #ffc107;
  border-color: #ffc107;
  color: white;
}

.scale-btn[data-value="7"].selected {
  background: #cddc39;
  border-color: #cddc39;
  color: #333;
}

.scale-btn[data-value="8"].selected {
  background: #8bc34a;
  border-color: #8bc34a;
  color: white;
}

.scale-btn[data-value="9"].selected {
  background: #4caf50;
  border-color: #4caf50;
  color: white;
}

.scale-btn[data-value="10"].selected {
  background: #2e7d32;
  border-color: #2e7d32;
  color: white;
}

/* Buttons */
.btn {
  padding: 12px 32px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
  text-decoration: none;
  display: inline-block;
}

.btn-primary {
  background: #4caf50;
  color: white;
}

.btn-primary:hover {
  background: #45a049;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.btn-secondary {
  background: #6c757d;
  color: white;
}

.btn-secondary:hover {
  background: #5a6268;
  transform: translateY(-2px);
}

.btn-success {
  background: #28a745;
  color: white;
}

.btn-success:hover {
  background: #218838;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.form-actions {
  margin-top: 32px;
  text-align: center;
}

/* Navigation Buttons */
.navigation-buttons {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 32px;
}

.navigation-buttons .btn {
  min-height: 52px;
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.loading-spinner {
  text-align: center;
  color: white;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top: 4px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* ==================== ADMIN DASHBOARD ==================== */
.admin-container {
  min-height: 100vh;
  background: #f8f9fa;
}

/* Admin Header */
.admin-header {
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
  color: white;
  padding: 24px 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.admin-header-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-title {
  font-size: 28px;
  font-weight: 700;
  margin: 0;
}

.admin-subtitle {
  font-size: 14px;
  opacity: 0.9;
  margin-top: 4px;
}

.logout-btn {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  padding: 10px 24px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}

.logout-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Admin Content */
.admin-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 24px;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
  border-bottom: 2px solid #e9ecef;
}

.tab-btn {
  padding: 12px 24px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  font-size: 16px;
  font-weight: 600;
  color: #6c757d;
  cursor: pointer;
  transition: all 0.3s ease;
}

.tab-btn.active {
  color: #4caf50;
  border-bottom-color: #4caf50;
}

.tab-btn:hover {
  color: #4caf50;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Stats Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.stat-card {
  background: white;
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  text-align: center;
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.stat-icon {
  font-size: 36px;
  margin-bottom: 12px;
}

.stat-value {
  font-size: 32px;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 14px;
  color: #6c757d;
  font-weight: 600;
}

/* Chart Container */
.chart-container {
  background: white;
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  margin-bottom: 24px;
}

.chart-title {
  font-size: 20px;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 16px;
}

/* Table */
.data-table {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.table-header {
  padding: 20px 24px;
  border-bottom: 2px solid #e9ecef;
}

.table-title {
  font-size: 20px;
  font-weight: 700;
  color: #2c3e50;
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead {
  background: #f8f9fa;
}

th {
  padding: 16px;
  text-align: left;
  font-size: 14px;
  font-weight: 700;
  color: #495057;
  border-bottom: 2px solid #e9ecef;
}

td {
  padding: 16px;
  font-size: 14px;
  color: #495057;
  border-bottom: 1px solid #e9ecef;
}

tr:hover {
  background: #f8f9fa;
}

/* Login Page */
.login-container {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.login-card {
  background: white;
  padding: 48px;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  max-width: 500px;
  width: 100%;
}

.login-header {
  text-align: center;
  margin-bottom: 32px;
}

.login-icon {
  font-size: 60px;
  display: block;
  margin-bottom: 16px;
}

.login-title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #2c3e50;
}

.login-subtitle {
  font-size: 16px;
  color: #6c757d;
  margin: 0;
}

.login-form .form-group {
  margin-bottom: 24px;
}

.form-help {
  display: block;
  font-size: 12px;
  color: #6c757d;
  margin-top: 4px;
}

.btn-block {
  width: 100%;
}

.login-info {
  margin-top: 32px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
}

.login-info p {
  margin: 0 0 12px 0;
  font-size: 14px;
  font-weight: 600;
  color: #495057;
}

.login-info ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.login-info li {
  padding: 6px 0;
  font-size: 14px;
  color: #6c757d;
}

/* Result Page */
.result-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 32px 24px;
}

.result-header {
  background: white;
  padding: 32px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  text-align: center;
  margin-bottom: 32px;
}

.result-title {
  font-size: 32px;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 16px;
}

.result-subtitle {
  font-size: 16px;
  color: #6c757d;
}

.result-card {
  background: white;
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  margin-bottom: 24px;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* New Result Header */
.result-header-new {
  background: linear-gradient(135deg, #4caf50 0%, #45b7d1 100%);
  color: white;
  padding: 32px;
  border-radius: 12px;
  margin-bottom: 24px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.result-header-content {
  display: flex;
  align-items: center;
  gap: 24px;
}

.result-icon {
  font-size: 48px;
  opacity: 0.8;
}

.result-title-new {
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
}

.result-subtitle-new {
  font-size: 1rem;
  opacity: 0.9;
  margin: 4px 0 0 0;
}

/* Respondent Info Card */
.respondent-info-card .info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.respondent-info-card .info-item {
  background: #f8f9fa;
  padding: 16px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.respondent-info-card .info-label {
  font-size: 0.85rem;
  color: #6c757d;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.respondent-info-card .info-value {
  font-size: 1rem;
  font-weight: 600;
  color: #2c3e50;
}

.dimension-score {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: #f8f9fa;
  border-radius: 8px;
  margin-bottom: 12px;
}

.dimension-name {
  font-size: 18px;
  font-weight: 600;
  color: #2c3e50;
}

.dimension-value {
  font-size: 24px;
  font-weight: 700;
  color: #4caf50;
}

.aspect-list {
  list-style: none;
}

.aspect-item {
  padding: 12px;
  background: #f8f9fa;
  border-radius: 6px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.aspect-name {
  font-size: 16px;
  color: #495057;
}

.aspect-score {
  font-size: 18px;
  font-weight: 700;
  color: #4caf50;
}

/* Legend Styles */
.legend-container {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legend-color {
  width: 20px;
  height: 20px;
  border-radius: 4px;
}

.legend-text {
  font-weight: 600;
}

/* Expander styles */
.expander-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.expander-item {
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
}

.expander-header {
  width: 100%;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #f7f7f7;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  transition: background-color 0.3s;
}

.expander-header:hover {
  opacity: 0.9;
}

.expander-title {
  text-align: left;
}

.expander-icon {
  font-size: 1.5rem;
  font-weight: bold;
  transition: transform 0.3s;
}

.expander-content {
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  transition:
    max-height 0.4s ease-out,
    padding 0.4s ease-out;
  background-color: #fff;
}

.expander-content p {
  margin: 10px 0;
}

.expander-content ul {
  list-style-type: disc;
  padding-left: 20px;
}

/* Dimension Colors */
.dimension-motivation {
  background-color: #ff6b6b; /* Red */
}
.dimension-relation {
  background-color: #4caf50; /* Green */
}
.dimension-impact {
  background-color: #45b7d1; /* Blue */
}

/* ==================== HOME PAGE (NEW) ==================== */
.hero-section {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh; /* Changed to fill the full viewport height */
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  background-size: 200% 200%; /* Required for animation */
  padding: 40px 20px;
  color: white;
  position: relative; /* Needed for blob positioning */
  overflow: hidden; /* Hide blob parts that go outside */
  animation: gradient-animation 15s ease infinite; /* Added animation */
}

.hero-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 60px;
  max-width: 1200px;
  width: 100%;
  flex-wrap: wrap;
  z-index: 2; /* Ensure content is above blobs */
  position: relative;
}

.hero-text {
  flex: 1;
  min-width: 300px;
  text-align: left;
  animation: slideInFromLeft 1s ease-out;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
}

.hero-subtitle {
  font-size: 1.5rem;
  font-weight: 300;
  opacity: 0.9;
}

.hero-card {
  flex: 1;
  min-width: 320px;
  max-width: 450px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  padding: 40px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  animation: fadeIn 1.5s ease-out;
}

.card-title-custom {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: white;
}

.card-text-custom {
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 32px;
  opacity: 0.95;
}

.home-actions {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.btn-custom {
  padding: 15px 25px;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 12px;
  text-align: center;
  text-decoration: none; /* Removed underline */
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.btn-custom:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.btn-custom.btn-primary {
  background: #f0932b;
  border: none;
}

.btn-custom.btn-primary:hover {
  background: #e67e22;
}

.btn-custom.btn-secondary {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.btn-custom.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.3);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideInFromLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes gradient-animation {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Animated Blobs */
.blob {
  position: absolute;
  background: linear-gradient(45deg, rgba(240, 147, 43, 0.3), rgba(230, 126, 34, 0.4));
  border-radius: 50%;
  filter: blur(40px);
  z-index: 1;
  animation: move-blob 20s infinite alternate;
}

.blob1 {
  width: 400px;
  height: 400px;
  top: -100px;
  left: -150px;
  animation-duration: 25s;
}

.blob2 {
  width: 300px;
  height: 300px;
  bottom: -50px;
  right: -100px;
  animation-duration: 18s;
  animation-delay: -5s;
  background: linear-gradient(45deg, rgba(118, 75, 162, 0.4), rgba(102, 126, 234, 0.3));
}

.blob3 {
  width: 250px;
  height: 250px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-duration: 30s;
  animation-delay: -10s;
  background: linear-gradient(45deg, rgba(230, 126, 34, 0.3), rgba(102, 126, 234, 0.4));
}

@keyframes move-blob {
  from {
    transform: translate(0, 0) scale(1);
  }
  to {
    transform: translate(100px, 50px) scale(1.2);
  }
}

/* ==================== MODAL STYLES ==================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: white;
  padding: 32px;
  border-radius: 16px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  max-width: 650px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

.modal-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 16px;
  text-align: center;
}

.modal-body p {
  font-size: 1rem;
  line-height: 1.7;
  color: #495057;
  margin-bottom: 16px;
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 2rem;
  color: #6c757d;
  cursor: pointer;
  transition: color 0.2s ease;
}

.modal-close-btn:hover {
  color: #2c3e50;
}

#understandBtn {
  display: block;
  width: 50%;
  margin: 24px auto 0;
}

/* Animated Blobs */
.blob {
  position: absolute;
  background: linear-gradient(45deg, rgba(240, 147, 43, 0.3), rgba(230, 126, 34, 0.4));
  border-radius: 50%;
  filter: blur(40px);
  z-index: 1;
  animation: move-blob 20s infinite alternate;
}

.blob1 {
  width: 400px;
  height: 400px;
  top: -100px;
  left: -150px;
  animation-duration: 25s;
}

.blob2 {
  width: 300px;
  height: 300px;
  bottom: -50px;
  right: -100px;
  animation-duration: 18s;
  animation-delay: -5s;
  background: linear-gradient(45deg, rgba(118, 75, 162, 0.4), rgba(102, 126, 234, 0.3));
}

.blob3 {
  width: 250px;
  height: 250px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-duration: 30s;
  animation-delay: -10s;
  background: linear-gradient(45deg, rgba(230, 126, 34, 0.3), rgba(102, 126, 234, 0.4));
}

@keyframes move-blob {
  from {
    transform: translate(0, 0) scale(1);
  }
  to {
    transform: translate(100px, 50px) scale(1.2);
  }
}

/* Animated Blobs */
.blob {
  position: absolute;
  background: linear-gradient(45deg, rgba(240, 147, 43, 0.3), rgba(230, 126, 34, 0.4));
  border-radius: 50%;
  filter: blur(40px);
  z-index: 1;
  animation: move-blob 20s infinite alternate;
}

.blob1 {
  width: 400px;
  height: 400px;
  top: -100px;
  left: -150px;
  animation-duration: 25s;
}

.blob2 {
  width: 300px;
  height: 300px;
  bottom: -50px;
  right: -100px;
  animation-duration: 18s;
  animation-delay: -5s;
  background: linear-gradient(45deg, rgba(118, 75, 162, 0.4), rgba(102, 126, 234, 0.3));
}

.blob3 {
  width: 250px;
  height: 250px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-duration: 30s;
  animation-delay: -10s;
  background: linear-gradient(45deg, rgba(230, 126, 34, 0.3), rgba(102, 126, 234, 0.4));
}

@keyframes move-blob {
  from {
    transform: translate(0, 0) scale(1);
  }
  to {
    transform: translate(100px, 50px) scale(1.2);
  }
}

/* ==================== MODAL STYLES ==================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: white;
  padding: 32px;
  border-radius: 16px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  max-width: 650px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

.modal-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 16px;
  text-align: center;
}

.modal-body p {
  font-size: 1rem;
  line-height: 1.7;
  color: #495057;
  margin-bottom: 16px;
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 2rem;
  color: #6c757d;
  cursor: pointer;
  transition: color 0.2s ease;
}

.modal-close-btn:hover {
  color: #2c3e50;
}

#understandBtn {
  display: block;
  width: 50%;
  margin: 24px auto 0;
}

/* ==================== MODAL STYLES ==================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: white;
  padding: 32px;
  border-radius: 16px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  max-width: 650px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

.modal-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 16px;
  text-align: center;
}

.modal-body p {
  font-size: 1rem;
  line-height: 1.7;
  color: #495057;
  margin-bottom: 16px;
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 2rem;
  color: #6c757d;
  cursor: pointer;
  transition: color 0.2s ease;
}

.modal-close-btn:hover {
  color: #2c3e50;
}

#understandBtn {
  display: block;
  width: 50%;
  margin: 24px auto 0;
}

@keyframes gradient-animation {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* ==================== HOME PAGE (NEW) ==================== */
.hero-section {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh; /* Changed to fill the full viewport height */
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  background-size: 200% 200%; /* Required for animation */
  padding: 40px 20px;
  color: white;
  position: relative; /* Needed for blob positioning */
  overflow: hidden; /* Hide blob parts that go outside */
  animation: gradient-animation 15s ease infinite; /* Added animation */
}

.hero-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 60px;
  max-width: 1200px;
  width: 100%;
  flex-wrap: wrap;
  z-index: 2; /* Ensure content is above blobs */
  position: relative;
}

.hero-text {
  flex: 1;
  min-width: 300px;
  text-align: left;
  animation: slideInFromLeft 1s ease-out;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
}

.hero-subtitle {
  font-size: 1.5rem;
  font-weight: 300;
  opacity: 0.9;
}

.hero-card {
  flex: 1;
  min-width: 320px;
  max-width: 450px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  padding: 40px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  animation: fadeIn 1.5s ease-out;
}

.card-title-custom {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: white;
}

.card-text-custom {
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 32px;
  opacity: 0.95;
}

.home-actions {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.btn-custom {
  padding: 15px 25px;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 12px;
  text-align: center;
  text-decoration: none; /* Removed underline */
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.btn-custom:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.btn-custom.btn-primary {
  background: #f0932b;
  border: none;
}

.btn-custom.btn-primary:hover {
  background: #e67e22;
}

.btn-custom.btn-secondary {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.btn-custom.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.3);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideInFromLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Active state for expander */
.expander-item.active .expander-icon {
  transform: rotate(45deg);
}

.expander-item.active .expander-content {
  max-height: 500px; /* Adjust as needed */
  padding: 20px;
}

/* Expander styles */
.expander-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.expander-item {
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
}

.expander-header {
  width: 100%;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #f7f7f7;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  transition: background-color 0.3s;
}

.expander-header:hover {
  opacity: 0.9;
}

.expander-title {
  text-align: left;
}

.expander-icon {
  font-size: 1.5rem;
  font-weight: bold;
  transition: transform 0.3s;
}

.expander-content {
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  transition:
    max-height 0.4s ease-out,
    padding 0.4s ease-out;
  background-color: #fff;
}

.expander-content p {
  margin: 10px 0;
}

.expander-content ul {
  list-style-type: disc;
  padding-left: 20px;
}

/* Dimension Colors */
.dimension-motivation {
  background-color: #ff6b6b; /* Red */
}
.dimension-relation {
  background-color: #4caf50; /* Green */
}
.dimension-impact {
  background-color: #45b7d1; /* Blue */
}

/* Active state for expander */
.expander-item.active .expander-icon {
  transform: rotate(45deg);
}

.expander-item.active .expander-content {
  max-height: 500px; /* Adjust as needed */
  padding: 20px;
}

/* Responsive */
@media (max-width: 768px) {
  body {
    background:
      radial-gradient(circle at top left, rgba(69, 183, 209, 0.1), transparent 34%),
      linear-gradient(180deg, #f4f8fb 0%, #eef4f9 100%);
  }

  .survey-container {
    padding: 14px 12px calc(44px + env(safe-area-inset-bottom));
  }

  .survey-header {
    padding: 18px 16px;
    border-radius: 18px;
    margin-bottom: 18px;
  }

  .header-content {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .logo {
    align-items: flex-start;
    gap: 12px;
  }

  .logo-text h1 {
    font-size: 22px;
  }

  .timer-container {
    width: auto;
    top: calc(12px + env(safe-area-inset-top));
    right: 12px;
  }

  .timer {
    width: auto;
    min-width: 108px;
    padding: 10px 14px;
    font-size: 18px;
    border-radius: 16px;
  }

  .progress-wrapper {
    padding: 14px 16px;
    margin-bottom: 20px;
  }

  .scale-buttons {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
  }

  .scale-btn {
    min-height: 52px;
    font-size: 15px;
  }

  .behavior-item {
    padding: 18px 16px;
    border-radius: 18px;
    margin-bottom: 14px;
  }

  .behavior-text {
    font-size: 16px;
    margin-bottom: 14px;
  }

  .scale-meta {
    flex-wrap: wrap;
    justify-content: center;
  }

  .scale-label {
    min-width: 0;
    font-size: 12px;
  }

  .scale-hint {
    width: 100%;
    text-align: center;
  }

  .question-page {
    padding-bottom: 28px;
  }

  .behavior-item:last-child {
    margin-bottom: 0;
  }

  .navigation-buttons {
    position: static;
    flex-direction: column;
    margin-top: 72px;
    gap: 12px;
    padding: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }

  .navigation-buttons .btn {
    flex: 1 1 auto;
    width: 100%;
    padding: 14px 18px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .survey-container {
    padding-left: 10px;
    padding-right: 10px;
    padding-bottom: calc(72px + env(safe-area-inset-bottom));
  }

  .navigation-buttons {
    margin-top: 88px;
  }

  .logo-text h1 {
    font-size: 20px;
  }

  .logo-text p,
  .progress-text {
    font-size: 13px;
  }

  .scale-buttons {
    gap: 8px;
  }

  .scale-btn {
    min-height: 48px;
  }

  .btn {
    font-size: 15px;
  }

  .timer {
    min-width: 100px;
    padding: 9px 12px;
    font-size: 16px;
  }

  .navigation-buttons {
    margin-top: 56px;
  }
}
