/* === Tema claro y estilo "Apple Support" === */
body {
  font-family: 'Inter', sans-serif;
  background: #ffffff;
  color: #111;
  margin: 0;
}

.test-container {
  max-width: 900px;
  margin: 24px auto;
  padding: 24px;
  background: #f7f7f7;
  border-radius: 12px;
}

.card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  margin-bottom: 20px;
  padding: 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  transition: box-shadow 0.2s ease, transform 0.15s ease;
}

.card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.card:active {
  transform: translateY(1px);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.card h3 {
  color: #111;
  margin-top: 0;
}

.opciones {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
}

/* Ocultar el c¨ªrculo del radio */
.opciones input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* Estilo base del cuadro */
.opciones label {
  display: block;
  padding: 10px 12px;
  border: 1px solid #e1e1e1;
  border-radius: 10px;
  background: #f5f5f5;
  color: #111;
  margin: 8px 0;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.15s ease;
}

.opciones label:hover {
  background: #eaeaea;
}

.opciones input[type="radio"]:checked + label {
  border-color: #0a84ff;
  background: #eaf2ff;
  color: #111;
  box-shadow: 0 0 0 3px rgba(10,132,255,.15);
}

/* === Colores en correcci¨®n === */
.opciones label.correcta {
  background: #d1f2de !important;
  border-color: #27ae60 !important;
  box-shadow: 0 0 0 3px rgba(39,174,96,.2);
}

.opciones label.incorrecta {
  background: #fbe0e3 !important;
  border-color: #e74c3c !important;
  box-shadow: 0 0 0 3px rgba(231,76,60,.2);
}

.msg-correcta {
  color: #1e8e3e !important;
  font-weight: 600;
  margin-top: 12px;
  margin-bottom: 6px;
}

.msg-incorrecta {
  color: #c62828 !important;
  font-weight: 600;
  margin-top: 12px;
  margin-bottom: 6px;
}

/* === Botones === */
button,
.btn {
  background: #0a84ff;
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 12px 18px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.05s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

button:hover,
.btn:hover {
  background: #0066cc;
  box-shadow: 0 4px 10px rgba(0,0,0,0.18);
}

button:active,
.btn:active {
  transform: translateY(2px);
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.btn.btn-sec {
  background: #e1e1e1;
  color: #111;
}

.btn.btn-sec:hover {
  background: #cfcfcf;
}

/* Botones con mismo ancho, centrados y m¨¢s separaci¨®n */
.footer-acciones {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.footer-acciones .btn {
  flex: 0 0 auto;
  min-width: 180px;
  text-align: center;
  padding: 14px 18px;
}

.footer-acciones form { margin: 0; }

/* =========================================================
   RANKING ¨C Lista compacta con avatar (estilo Apple)
   ========================================================= */
.ae-ranking-list{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:14px;
}

.ae-rank-item{
  display:flex;
  align-items:center;
  gap:14px;
  padding:12px 14px;
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:14px;
  box-shadow:0 1px 3px rgba(0,0,0,.06);
  transition:box-shadow .18s ease, transform .08s ease, border-color .18s ease, background .18s ease;
}

.ae-rank-item:hover{
  box-shadow:0 6px 18px rgba(0,0,0,.10);
  border-color:#dfe3ea;
  transform: translateY(-1px);
  background:#fafafa;
}

.ae-rank-pos{
  min-width:34px;
  text-align:center;
  font-weight:700;
  color:#111;
}

.ae-rank-avatar{
  width:32px;
  height:32px;
  border-radius:50%;
  overflow:hidden;
  flex:0 0 32px;
  background:#eef2f7;
  display:flex;
  align-items:center;
  justify-content:center;
}

.ae-rank-avatar img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.ae-rank-user{
  flex:1 1 auto;
  min-width:0;
}

.ae-rank-name{
  font-weight:600;
  color:#0f172a;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.ae-rank-meta{
  font-size:12px;
  opacity:.75;
  color:#334155;
}

.ae-rank-points{
  font-weight:700;
  color:#0f172a;
  padding-left:8px;
  white-space:nowrap;
}

/* Top 3 sutil */
.ae-rank-item.is-top-1{ border-color:#0a84ff33; box-shadow:0 6px 20px rgba(10,132,255,.15); }
.ae-rank-item.is-top-2{ border-color:#64748b33; }
.ae-rank-item.is-top-3{ border-color:#a78bfa33; }

/* Responsive */
@media (max-width:640px){
  .ae-rank-meta{ display:none; }
  .ae-rank-item{ padding:10px 12px; }
  .ae-rank-pos{ min-width:28px; }
  .ae-rank-avatar{ width:28px; height:28px; flex-basis:28px; }
}
