/* VivaSpanish — estilos del test de nivel
   Hereda variables CSS de styles.css */

.test-page {
  background: linear-gradient(180deg, var(--bg) 0%, #fff 100%);
  min-height: 100vh;
  padding: 3rem 0 5rem;
}

#test-root {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.test-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.test-eyebrow {
  display: inline-block;
  font-size: .8rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-soft);
  padding: .35rem .85rem;
  border-radius: 1rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 1rem;
}

.test-card h1 {
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  margin-bottom: 1rem;
  line-height: 1.2;
}

.test-intro {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
  line-height: 1.6;
}

.test-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: .9rem;
  margin-bottom: 2rem;
  padding: 1.25rem;
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.test-feature {
  font-size: .92rem;
  color: var(--text);
}
.test-feature span {
  font-size: 1.15rem;
  margin-right: .35rem;
}

.test-label {
  display: block;
  font-size: .9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: .5rem;
  font-family: 'DM Sans', sans-serif;
}

.test-input {
  width: 100%;
  padding: .85rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  color: var(--text);
  background: var(--bg);
  transition: border-color .2s, box-shadow .2s;
  margin-bottom: 1.5rem;
}
.test-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.test-cta {
  width: 100%;
  margin-bottom: 1rem;
}

.test-disclaimer {
  font-size: .82rem;
  color: var(--text-muted);
  text-align: center;
  margin: 0;
  line-height: 1.4;
}

/* ---------- Pregunta ---------- */
.test-question-card {
  position: relative;
}

.test-progress-wrap {
  margin-bottom: 1.75rem;
}
.test-progress-text {
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: .5rem;
}
.test-progress-bar {
  height: 6px;
  background: var(--bg);
  border-radius: 3px;
  overflow: hidden;
}
.test-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width .4s ease;
}

.test-level-tag {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  background: var(--secondary);
  color: var(--text-muted);
  padding: .25rem .6rem;
  border-radius: .35rem;
  letter-spacing: .05em;
  margin-bottom: .85rem;
}

.test-question {
  font-size: clamp(1.2rem, 2.6vw, 1.55rem);
  line-height: 1.4;
  margin-bottom: 1.75rem;
  font-family: 'Playfair Display', serif;
  color: var(--text);
  font-weight: 600;
}

.test-options {
  display: grid;
  gap: .75rem;
  margin-bottom: 2rem;
}

.test-option {
  display: block;
  width: 100%;
  text-align: left;
  padding: 1rem 1.25rem;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  color: var(--text);
  cursor: pointer;
  transition: all .15s ease;
}
.test-option:hover {
  border-color: var(--primary);
  background: #fff;
  transform: translateX(2px);
}
.test-option.selected {
  border-color: var(--primary);
  background: var(--primary-soft);
  font-weight: 600;
  color: var(--primary-dark);
}

.test-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.test-nav-btn { min-width: 130px; }
.test-nav-btn.disabled {
  opacity: .4;
  cursor: not-allowed;
  pointer-events: none;
}

/* ---------- Resultado ---------- */
.test-result h1 {
  text-align: center;
  margin-bottom: 1.75rem;
}

.test-level-display {
  text-align: center;
  background: linear-gradient(135deg, var(--primary-soft) 0%, var(--accent-soft) 100%);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 1.5rem;
  border: 2px solid var(--primary);
}
.test-level-label {
  font-size: .85rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: .12em;
  margin-bottom: .5rem;
}
.test-level-value {
  font-family: 'Playfair Display', serif;
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 800;
  color: var(--primary-dark);
  line-height: 1;
}
.test-level-desc {
  text-align: center;
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 2rem;
}

.test-result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
.test-result-col {
  background: var(--bg);
  padding: 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.test-result-col h3 {
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: .75rem;
  color: var(--text);
}
.test-result-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.test-result-col li {
  font-size: .92rem;
  color: var(--text-muted);
  padding: .35rem 0;
  border-bottom: 1px dashed var(--border);
}
.test-result-col li:last-child { border-bottom: none; }
.test-result-col li.muted { font-style: italic; }

.test-score {
  text-align: center;
  font-size: .92rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.test-cta-block {
  background: var(--bg);
  border: 2px solid var(--primary);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  text-align: center;
  margin-bottom: 1.5rem;
}
.test-cta-block h3 {
  font-size: 1.3rem;
  margin-bottom: .5rem;
}
.test-cta-block p {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  font-size: .98rem;
}
.test-cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: .85rem;
  justify-content: center;
}

.test-restart {
  text-align: center;
  margin-top: 1.5rem;
}
.test-link {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: .9rem;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: var(--border);
}
.test-link:hover { color: var(--primary); text-decoration-color: var(--primary); }

/* Responsive */
@media (max-width: 640px) {
  .test-page { padding: 1.5rem 0 3rem; }
  .test-card { padding: 1.75rem 1.25rem; }
  .test-result-grid { grid-template-columns: 1fr; }
  .test-cta-buttons { flex-direction: column; }
  .test-cta-buttons .btn { width: 100%; }
  .test-nav-btn { min-width: auto; flex: 1; }
}
