:root {
  --primary: #E91E8C;
  --primary-hover: #C4177A;
  --primary-light: #F472B6;
  --primary-glow: rgba(233, 30, 140, 0.15);
  --bg-main: #f1f5f9;
  --bg-card: #ffffff;
  --text-main: #0f172a;
  --text-dim: #64748b;
  --border-color: #e2e8f0;
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.test-container {
  max-width: 800px;
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
}

/* ---- Logo en el header ---- */
.logo-header {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
  gap: 14px;
}

.logo-header img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.logo-header span {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--primary);
}

/* ---- Test UI ---- */
.section-indicator {
  color: var(--primary);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.progress-container {
  width: 100%;
  height: 6px;
  background: #f1f5f9;
  border-radius: 10px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
  width: 0%;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 10px;
}

#questions-area {
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.question-text {
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 28px;
  color: var(--text-main);
}

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

.option-item {
  background: #ffffff;
  border: 2px solid var(--border-color);
  padding: 16px 20px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 1.05rem;
  color: var(--text-main);
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.option-item:hover {
  background: #fdf2f8;
  border-color: var(--primary-light);
  transform: translateY(-1px);
}

.option-item.selected {
  background: #fdf2f8;
  border-color: var(--primary);
  color: var(--primary-hover);
  font-weight: 600;
  box-shadow: 0 4px 12px var(--primary-glow);
}

/* ---- Controls ---- */
.controls {
  margin-top: 36px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

button {
  padding: 12px 28px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  font-family: inherit;
}

.btn-prev {
  background: #f8fafc;
  color: var(--text-dim);
  border: 1px solid var(--border-color);
}

.btn-prev:hover:not(:disabled) {
  background: #f1f5f9;
  color: var(--text-main);
}

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

.btn-next {
  background: var(--primary);
  color: white;
  min-width: 130px;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-next:hover:not(:disabled) {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(233, 30, 140, 0.25);
}

.btn-next:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ---- Finish Card ---- */
.finish-card {
  text-align: center;
}

.finish-card h2 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 14px;
  color: var(--text-main);
}

.finish-card p {
  color: var(--text-dim);
  margin-bottom: 28px;
  line-height: 1.6;
  font-size: 1.05rem;
}

/* ---- Loader ---- */
.loader {
  border: 4px solid var(--border-color);
  border-top: 4px solid var(--primary);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 0.9s linear infinite;
  margin: 0 auto 16px;
}

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

/* ---- Responsive ---- */
@media (max-width: 600px) {
  .test-container {
    padding: 24px 18px;
    border-radius: 18px;
  }

  .question-text {
    font-size: 1.2rem;
  }

  .logo-header img {
    width: 48px;
    height: 48px;
  }

  .logo-header span {
    font-size: 1.05rem;
  }
}
