* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
:root {
  --primary: #2563eb;
  --primary-light: #eff6ff;
  --border-color: #e2e8f0;
  --text-dark: #1e293b;
  --text-gray: #64748b;
  --bg-body: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

body {
  font-family: "Segoe UI", system-ui, sans-serif;
  background: var(--bg-body);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 20px 10px;
  color: var(--text-dark);
}

.container {
  background: white;
  width: 100%;
  max-width: 700px;
  padding: 30px;
  border-radius: 24px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  animation: fadeIn 0.5s ease;
}

.progress-container {
  background: #f1f5f9;
  border-radius: 50px;
  height: 12px;
  margin: 15px 0 30px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
}

#progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #2563eb, #60a5fa);
  transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

#progress-bar::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  animation: shine 3s infinite;
}

.card {
  background: white;
  padding: 25px;
  margin-bottom: 25px;
  border-radius: 16px;
  border: 2px solid var(--border-color);
  transition: all 0.3s ease;
  animation: slideUp 0.4s ease-out;
}

.card.card-selected {
  border-color: var(--primary);
  background: #fcfdff;
  box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.1);
}

.card strong {
  display: block;
  font-size: 1.15rem;
  margin-bottom: 20px;
  line-height: 1.4;
}

label {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  margin: 12px 0;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 1rem;
}

label:hover {
  background: #f1f5f9;
}

label.selected {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 600;
}

input[type="radio"] {
  width: 20px;
  height: 20px;
  margin-right: 15px;
  accent-color: var(--primary);
}

.nav {
  display: flex;
  gap: 15px;
  margin-top: 40px;
}

button {
  flex: 1;
  padding: 18px;
  border: none;
  border-radius: 15px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: 0.3s;
}

.btn-primary {
  background: var(--primary);
  color: white;
}
.btn-secondary {
  background: #f1f5f9;
  color: var(--text-gray);
}

button:active {
  transform: scale(0.95);
}

.nav-buttons-vertical {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 30px;
}

.btn-logout {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.btn-logout:hover {
  background: #fecaca;
  transform: translateY(-2px);
}

@media (max-width: 480px) {
  .nav {
    flex-direction: column;
    width: 100%;
  }

  button {
    width: 100%;
    padding: 16px;
  }
}

.card-error {
  border: 2px solid #fecaca !important;
  background-color: #fef2f2 !important;
}

.main-login {
  text-align: center;
  max-width: 450px;
}

.logo-area {
  font-size: 3.5rem;
  color: var(--primary);
  margin-bottom: 15px;
  animation: bounce 2s infinite alternate;
}

.subtitle {
  color: var(--text-gray);
  margin-bottom: 30px;
  font-size: 0.95rem;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 25px;
}

.input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.input-group i {
  position: absolute;
  left: 15px;
  color: var(--text-gray);
}

input#ci {
  width: 100%;
  padding: 16px 16px 16px 45px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  outline: none;
}

input#ci:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
  background: #fcfdff;
}

.score-badge {
  background: #fff9eb;
  border: 1px solid #fef3c7;
  padding: 15px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-bottom: 25px;
  color: #92400e;
}

.score-badge i {
  font-size: 1.8rem;
  color: #f59e0b;
}

.score-badge small {
  display: block;
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 1px;
}

.score-badge p {
  font-size: 1.3rem;
  font-weight: 800;
  margin: 0;
}

.btn-primary {
  width: 100%;
  background: var(--primary);
  color: white;
  padding: 16px;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
  background: #0284c7;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(37, 99, 235, 0.3);
}

@keyframes bounce {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-10px);
  }
}

@media (max-width: 480px) {
  .container {
    padding: 40px 20px;
  }
}

.menu-header {
  text-align: center;
  margin-bottom: 30px;
}

.menu-options {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.menu-btn {
  display: flex;
  align-items: center;
  padding: 20px;
  border: 2px solid #e2e8f0;
  border-radius: 18px;
  background: white;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: left;
}

.menu-btn:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.menu-btn .icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-right: 15px;
}

.menu-btn.start .icon {
  background: #dcfce7;
  color: #16a34a;
}
.menu-btn.study .icon {
  background: #e0f2fe;
  color: #0284c7;
}

.menu-btn .text strong {
  display: block;
  font-size: 1.1rem;
  color: var(--text-dark);
}

.menu-btn .text span {
  font-size: 0.85rem;
  color: var(--text-gray);
}

.menu-btn.logout {
  justify-content: center;
  background: #fff1f2;
  border: none;
  color: #e11d48;
  font-weight: 600;
  margin-top: 10px;
}

.score-badge {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  padding: 20px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 25px;
  border: 1px solid #fde68a;
}

.score-badge i {
  font-size: 2rem;
  color: #d97706;
}

@media (max-width: 480px) {
  .container {
    padding: 30px 20px;
    margin: 10px;
  }

  .menu-btn {
    padding: 15px;
  }
}

@media (max-width: 600px) {
  .container {
    padding: 20px 15px;
    border-radius: 20px;
  }

  .card {
    padding: 20px 15px;
    margin-bottom: 30px;
  }

  label {
    padding: 20px;
  }

  .nav {
    gap: 10px;
  }
}

@keyframes shine {
  to {
    left: 100%;
  }
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounce {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-10px);
  }
}

.card-error {
  border: 2px solid #fecaca !important;
  background-color: #fef2f2 !important;
}

.card-error b {
  color: #dc2626;
}

#resumen-puntaje h2 {
  margin: 0;
  line-height: 1;
}

.menu-main .menu-header h1 {
  font-size: 1.8rem;
  margin-bottom: 25px;
  background: linear-gradient(90deg, #1e293b, #3b82f6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.menu-main .user-welcome {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 1.5px;
  margin-bottom: 8px;
}

.menu-main .gold-premium {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1px solid #fde68a;
  padding: 20px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 30px;
  box-shadow: 0 10px 20px rgba(217, 119, 6, 0.08);
}

.menu-main .gold-premium i {
  font-size: 2.2rem;
  color: #d97706;
}

.menu-main .menu-card {
  width: 100%;
  display: flex;
  align-items: center;
  padding: 18px;
  margin-bottom: 15px;
  border: 2px solid #f1f5f9;
  background: white;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.menu-main .menu-card:hover {
  transform: translateY(-5px) scale(1.02);
  border-color: var(--primary);
  box-shadow: 0 12px 25px rgba(37, 99, 235, 0.1);
}

.menu-main .icon-wrap {
  width: 54px;
  height: 54px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-right: 15px;
  flex-shrink: 0;
}

.menu-main .btn-simulacro .icon-wrap {
  background: #dcfce7;
  color: #16a34a;
}
.menu-main .btn-estudiar .icon-wrap {
  background: #e0f2fe;
  color: #0284c7;
}

.menu-main .info {
  text-align: left;
  flex-grow: 1;
}
.menu-main .info strong {
  display: block;
  font-size: 1.1rem;
  color: #1e293b;
}
.menu-main .info span {
  font-size: 0.85rem;
  color: #64748b;
}

.menu-main .arrow-hit {
  color: #cbd5e1;
  transition: 0.3s;
}

.menu-main .menu-card:hover .arrow-hit {
  color: var(--primary);
  transform: translateX(5px);
}

.menu-main .btn-logout-simple {
  background: none;
  border: none;
  color: #94a3b8;
  font-weight: 700;
  margin-top: 20px;
  padding: 10px;
  width: 100%;
  transition: 0.3s;
}

.menu-main .btn-logout-simple:hover {
  color: #e11d48;
  background: #fff1f2;
  border-radius: 12px;
}

.menu-main .logout-wrapper {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #f1f5f9;
}

.menu-main .btn-logout-modern {
  width: 100%;
  background: #ffffff;
  border: 2px solid #fee2e2;
  color: #ef4444;
  padding: 14px;
  border-radius: 16px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.menu-main .logout-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.menu-main .btn-logout-modern i {
  font-size: 1.1rem;
  transition: transform 0.3s ease;
}

.menu-main .btn-logout-modern:hover {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
  box-shadow: 0 10px 15px -3px rgba(239, 68, 68, 0.2);
}

.menu-main .btn-logout-modern:hover i {
  transform: rotate(90deg);
}

.menu-main .btn-logout-modern:active {
  transform: scale(0.95);
}

.search-box {
  position: relative;
  margin-bottom: 25px;
  display: flex;
  align-items: center;
}

.search-box i {
  position: absolute;
  left: 15px;
  color: var(--text-gray);
  font-size: 1rem;
}

.search-box input {
  width: 100%;
  padding: 14px 14px 14px 45px;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  font-size: 1rem;
  outline: none;
  transition: all 0.3s ease;
  background: #f8fafc;
}

.search-box input:focus {
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08);
}

#lista-preguntas {
  margin-top: 10px;
  animation: fadeIn 0.4s ease-out;
}

.result-page {
  text-align: center;
  padding-bottom: 40px;
}

.feedback-text {
  font-weight: 700;
  font-size: 1.1rem;
  margin-top: -10px;
  margin-bottom: 20px;
  animation: fadeInDown 0.5s ease;
}

.score-main {
  background: #f8fafc;
  padding: 30px;
  border-radius: 20px;
  margin-bottom: 30px;
  border: 2px solid #e2e8f0;
}

.score-main h2 {
  font-size: 3.5rem;
  color: var(--primary);
  margin: 0;
}

.btn-interactive {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  position: relative;
  top: 0;
}

.btn-interactive:hover {
  top: -3px;
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
  filter: brightness(1.1);
}

.btn-interactive:active {
  top: 0;
  transform: scale(0.98);
}

.btn-logout {
  background: #fff1f2;
  color: #e11d48;
  border: 1px solid #fecaca;
  padding: 12px 20px;
  border-radius: 12px;
  font-weight: 700;
}

.btn-logout:hover {
  background: #e11d48;
  color: white;
}

.details-container {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 2px solid #f1f5f9;
  animation: slideUp 0.4s ease-out;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
