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

:root {
  /* Paleta oficial de la Guía de Trading Juvenil — mismos colores del libro y su sitio,
     para que los estudiantes reconozcan la herramienta como parte del mismo material. */
  --bg-main: #0B1046;
  --bg-panel: #0B1E6F;
  --bg-input: #03050F;
  --border-color: #22306B;
  --accent: #3E74C2;
  --accent-hover: #6FA3E8;
  --gold: #F3D26B;
  --gold-dim: #C9A24C;
  --text-main: #E9EEFB;
  --text-muted: #A9B3D0;
  --danger: #E36565;
  --danger-hover: #C94747;
  --success: #2FD97C;
  --warning: #F3D26B;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  margin: 0;
  padding: 30px 15px;
  line-height: 1.6;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  border-bottom: 2px solid var(--gold);
  padding-bottom: 15px;
}

h2 {
  color: var(--gold);
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.header-marca { display: flex; align-items: center; gap: 12px; }
.logo-app {
  height: 44px;
  width: 44px;
  border-radius: 10px;
  filter: drop-shadow(0 0 10px rgba(243, 210, 107, 0.45));
}

.btn-volver-guia {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 25px;
  padding: 10px 18px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9em;
  color: var(--gold);
  background: linear-gradient(135deg, rgba(243,210,107,0.14), rgba(62,116,194,0.14));
  border: 1px solid rgba(243,210,107,0.5);
  transition: all 0.25s ease;
  animation: pulso-guia 2.6s ease-in-out infinite;
}
.btn-volver-guia:hover {
  background: var(--gold);
  color: #03050F;
  transform: translateY(-2px);
  animation: none;
}
@keyframes pulso-guia {
  0%, 100% { box-shadow: 0 0 0 rgba(243,210,107,0); }
  50% { box-shadow: 0 0 16px rgba(243,210,107,0.5); }
}

h3 {
  color: var(--accent);
  font-weight: 600;
  margin-top: 0;
}

.panel {
  background: var(--bg-panel);
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.3);
  margin-bottom: 25px;
  border: 1px solid var(--border-color);
}

.input-group {
  margin-bottom: 15px;
}

.input-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-muted);
  font-size: 0.9em;
  font-weight: 600;
}

.bloque {
  border: 1px solid var(--border-color);
  padding: 20px;
  margin-bottom: 20px;
  border-radius: 8px;
  background-color: rgba(0, 0, 0, 0.15);
}

.bloque-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
  margin-bottom: 15px;
}

.inputs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 15px;
}

input, select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background-color: var(--bg-input);
  color: var(--text-main);
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
  font-size: 0.95em;
  transition: border-color 0.3s ease;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(35, 183, 178, 0.2);
}

button {
  padding: 12px 20px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95em;
  transition: all 0.3s ease;
  font-family: 'Inter', sans-serif;
}

.btn-primary {
  background-color: var(--accent);
  color: #E9EEFB;
}
.btn-primary:hover {
  background-color: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-success {
  background-color: var(--gold);
  color: #03050F;
  border: 2px solid var(--gold);
  font-weight: 800;
}
.btn-success:hover {
  background-color: var(--gold-dim);
  border-color: var(--gold-dim);
  transform: translateY(-1px);
}

.btn-danger { background-color: transparent; color: var(--danger); border: 1px solid var(--danger); padding: 8px 15px; font-size: 0.85em;}
.btn-danger:hover { background-color: var(--danger); color: white; }

.btn-eliminar { background-color: var(--danger); color: white; padding: 6px 12px; font-size: 0.85em; border-radius: 4px; }
.btn-eliminar:hover { background-color: var(--danger-hover); }

.hidden { display: none; }
.mt-10 { margin-top: 15px; }

.res-operacion {
  padding: 15px;
  background: rgba(0, 0, 0, 0.2);
  border-left: 4px solid var(--accent);
  margin-bottom: 15px;
  border-radius: 4px;
}

.res-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 15px;
  margin-top: 10px;
}

.lbl { font-size: 0.85em; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px;}
.riesgo-txt { color: var(--danger); font-weight: 800; font-size: 1.1em;}
.ganancia-txt { color: var(--success); font-weight: 800; font-size: 1.1em;}

.advisor-panel {
  padding: 20px;
  border-radius: 8px;
  font-size: 1.05em;
  margin-top: 25px;
  line-height: 1.5;
}

/* Barra de Calor Premium */
.heat-bar-container {
  width: 100%;
  height: 12px;
  background-color: var(--bg-input);
  border-radius: 20px;
  margin: 20px 0 8px 0;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border-color);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.5);
}

.heat-bar {
  height: 100%;
  width: 0%;
  border-radius: 20px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.8s ease;
}

.heat-bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.85em;
  color: var(--text-muted);
  margin-bottom: 15px;
  font-weight: 600;
}

.nota { font-size: 0.85em; color: var(--text-muted); margin-top: 25px; text-align: center; border-top: 1px solid var(--border-color); padding-top: 15px;}
