@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* === RESET Y BASE === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', sans-serif;
  background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
  min-height: 100vh;
  color: #e2e8f0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 16px;
}

/* === CONTENEDOR PRINCIPAL === */
.container {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 20px;
  padding: 36px 32px;
  width: 100%;
  max-width: 620px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

/* === ENCABEZADO === */
.header-icon {
  font-size: 2.5rem;
  margin-bottom: 8px;
  display: block;
  text-align: center;
}

h1 {
  font-size: 1.75rem;
  font-weight: 800;
  text-align: center;
  background: linear-gradient(90deg, #a78bfa, #38bdf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 6px;
}

h2 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #94a3b8;
  text-align: center;
  margin-bottom: 24px;
}

h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #a78bfa;
  margin-bottom: 10px;
}

h4 {
  font-size: 0.875rem;
  font-weight: 600;
  color: #38bdf8;
  margin-bottom: 8px;
}

p {
  font-size: 0.95rem;
  color: #cbd5e1;
  text-align: center;
  margin-bottom: 20px;
}

/* === MENÚ DE INICIO === */
.botones {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 10px;
}

/* === DIVIDER === */
.divider {
  height: 1px;
  background: rgba(255,255,255,0.1);
  margin: 20px 0;
}

/* === BOTONES === */
button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 12px;
  border: none;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
}

/* Botón primario */
button, .btn {
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  color: #fff;
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.35);
}

button:hover, .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(124, 58, 237, 0.5);
  filter: brightness(1.1);
}

button:active, .btn:active {
  transform: translateY(0);
}

/* Botón de modo (calcularDefinitiva) */
.menu {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.menu .btn {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.15);
  color: #e2e8f0;
  box-shadow: none;
  font-size: 0.85rem;
}

.menu .btn:hover {
  background: rgba(124, 58, 237, 0.3);
  border-color: #7c3aed;
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.2);
}

/* Botón agregar */
.btn.agregar {
  background: linear-gradient(135deg, #0891b2, #0284c7);
  box-shadow: 0 4px 15px rgba(8, 145, 178, 0.3);
  width: auto;
  padding: 9px 18px;
  font-size: 0.82rem;
}

.btn.agregar:hover {
  box-shadow: 0 8px 20px rgba(8, 145, 178, 0.45);
}

/* Botón eliminar */
.btn.eliminar {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  box-shadow: none;
  width: auto;
  padding: 7px 14px;
  font-size: 0.8rem;
}

.btn.eliminar:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: #ef4444;
  box-shadow: none;
  transform: none;
}

/* Botón volver */
.volver-btn, .volver, button.volver-btn, button.volver {
  background: transparent !important;
  border: 1.5px solid rgba(148, 163, 184, 0.4) !important;
  color: #94a3b8 !important;
  box-shadow: none !important;
  width: 100%;
  margin-top: 16px;
  font-size: 0.85rem;
}

.volver-btn:hover, .volver:hover {
  background: rgba(148, 163, 184, 0.1) !important;
  border-color: #94a3b8 !important;
  transform: none !important;
}

/* === INPUTS === */
input[type="number"],
input[type="text"] {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.07);
  color: #f1f5f9;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  margin: 5px 0 10px 0;
}

input[type="number"]:focus,
input[type="text"]:focus {
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2);
}

input::placeholder {
  color: #64748b;
}

label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #94a3b8;
  margin-bottom: 2px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* === CARDS DE CORTE === */
.corte {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(167, 139, 250, 0.2);
  border-left: 4px solid #7c3aed;
  border-radius: 14px;
  padding: 18px 20px;
  margin: 14px 0;
  position: relative;
}

.corte h3::before {
  content: "📌 ";
}

/* === CARDS DE PARTE === */
.parte {
  background: rgba(56, 189, 248, 0.05);
  border: 1px solid rgba(56, 189, 248, 0.15);
  border-left: 3px solid #38bdf8;
  border-radius: 10px;
  padding: 14px 16px;
  margin: 10px 0;
}

/* === CARDS DE ACTIVIDAD === */
.actividad {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 10px 14px;
  margin: 8px 0;
}

.actividad label {
  margin: 0;
  white-space: nowrap;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.85rem;
}

.actividad input {
  margin: 0;
  width: 90px;
  flex-shrink: 0;
}

.actividad .btn.eliminar {
  margin-left: auto;
  flex-shrink: 0;
}

/* === ÁREA DE TRABAJO === */
#areaTrabajo {
  margin-top: 10px;
}

#areaTrabajo > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#areaTrabajo > div > .btn {
  margin-bottom: 4px;
}

/* === RESULTADO === */
#resultado, .resultado {
  margin-top: 20px;
  padding: 18px 20px;
  border-radius: 14px;
  font-size: 0.95rem;
  line-height: 1.7;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
}

#resultado:empty, .resultado:empty {
  display: none;
}

.resultado-opcion {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(167, 139, 250, 0.2);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 12px;
}

.resultado-opcion h3 {
  margin-bottom: 8px;
}

.resultado-opcion p {
  text-align: left;
  margin-bottom: 6px;
  font-size: 0.9rem;
  color: #e2e8f0;
}

.resultado-opcion strong {
  color: #34d399;
  font-size: 1.1rem;
}

.destacado {
  color: #34d399;
  font-weight: 700;
}

/* === BADGE DE ESTADO === */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-success {
  background: rgba(52, 211, 153, 0.15);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.badge-warning {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.3);
}

/* === CORTESCONTAINER (nota mínima) === */
#cortesContainer .corte {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
  align-items: end;
}

#cortesContainer .corte h3 {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

/* === RESPONSIVO === */
@media (max-width: 600px) {
  body {
    padding: 20px 12px;
    align-items: flex-start;
  }

  .container {
    padding: 24px 18px;
  }

  h1 {
    font-size: 1.4rem;
  }

  .menu {
    flex-direction: column;
  }

  #cortesContainer .corte {
    grid-template-columns: 1fr;
  }

  .actividad {
    flex-wrap: wrap;
  }

  .actividad input {
    width: 100%;
  }
}