  /* VARIABLES & RESET */
  :root {
    --bg-main: #0e1429;
    --bg-gradient-1: #0a2540;
    --bg-gradient-2: #0e1429;

    --card-1: #121b2b;
    --card-2: #1f2f48;
    --card-3: #2e3c5d;

    --accent: #61dafb;
    --accent-hover: #4ac0e7;

    --text-main: #e1e6f0;
    --text-light: #f8f7fd;
    --text-muted: #bbb;

    --radius: 8px;
    --shadow: 0 8px 20px rgba(0, 0, 0, 0.55);
  }

/* Reset básico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

/* Scroll */
::-webkit-scrollbar {
    width: 10px; /* o el tamaño que prefieras */
}

::-webkit-scrollbar-thumb {
    background-color: var(--accent); /* Color del "dedo" del scrollbar */
    border-radius: 4px;
}

::-webkit-scrollbar-track {
    background: #000; /* Color del fondo del track */
}

body {
  font-family: "Montserrat", sans-serif;
  background: linear-gradient(135deg, var(--bg-gradient-1), var(--bg-gradient-2));
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  color: var(--text-main);
}

/* CONTENEDOR PRINCIPAL */
.container2 {
  width: 100%;
  max-width: 833px;
  background-color: var(--card-1);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px 30px;
  margin: 40px auto;
}

/* TITULARES */
header {
  text-align: center;
  margin-bottom: 25px;
}

h1, h2 {
  color: var(--accent);
  margin-bottom: 5px;
}

.badge-pro {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: var(--bg-main);
  padding: 2px 10px;
  margin-left: 0px;
  font-size: 0.9em;
  font-weight: 700;
  border-radius: 8px;
  letter-spacing: 1px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
  transform: translateY(-2px);
  text-shadow: 0 0 5px rgba(0,0,0,0.4);
  user-select: none;
}

p,
label {
  color: var(--text-light);
  font-size: 16px;
  margin-bottom: 12px;
}

/* INPUTS & SELECTS */
.input-group {
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

input,
select {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius);
  border: none;
  background-color: var(--card-2);
  color: var(--text-main);
  font-size: 15px;
  transition: 0.25s ease;
}

input:focus,
select:focus {
  background-color: #2a3b5c;
  outline: 2px solid var(--accent);
}

/* CHECKBOX */
.checkbox-container {
  margin: 20px 0;
  text-align: center;
}

.checkbox-container label {
  cursor: pointer;
  font-size: 16px;
}

.checkbox-container input[type="checkbox"] {
  transform: scale(1.2);
  margin-right: 10px;
  cursor: pointer;
}

/* BOTONES */
button {
  background-color: var(--accent);
  color: var(--bg-main);
  padding: 12px 20px;
  border: none;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 600;
  width: 100%;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.1s ease;
  margin-top: 20px;
}

button:hover {
  background-color: var(--accent-hover);
}

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

/* PRECIO FINAL */
#precio-final {
  font-size: 22px;
  font-weight: bold;
  color: var(--accent);
  text-align: center;
  margin-top: 15px;
}

/* RESUMEN DE DATOS */
#resumen-datos {
  background-color: var(--card-3);
  padding: 20px;
  border-radius: var(--radius);
  max-width: 480px;
  margin: 20px auto;
}

#resumen-datos h3,
#resumen-datos h4 {
  border-bottom: 2px solid #444;
  padding-bottom: 6px;
  margin-top: 20px;
  margin-bottom: 12px;
  color: var(--text-light);
}

#resumen-datos ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 15px;
}

#resumen-datos ul li {
  padding: 6px 0;
  border-bottom: 1px solid #444;
  font-size: 14px;
}

#resumen-datos ul li:last-child {
  border-bottom: none;
}

#resumen-datos em {
  color: var(--text-muted);
  font-style: normal;
}

/* RESULTADO COMPARACIÓN */
#resultado-comparacion {
  text-align: center;
  background-color: var(--card-3);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 20px;
  color: var(--text-main);
}

#resultado-comparacion ul li {
  font-size: 16px;
  padding: 12px 0;
}

#resultado-comparacion p {
  font-size: 18px;
  text-align: center;
  margin-top: 20px;
}

/* GRÁFICO DE COSTES */
#grafico-costes-section {
  max-width: 480px;
  margin: 30px auto;
  background-color: var(--card-2);
  padding: 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

#grafico-costes {
  margin-top: 20px;
}

/* ARANCELES */
#aranceles-section section {
  margin-top: 25px;
  width: 100%;
  max-width: 900px;
  background-color: var(--card-3);
  border-radius: var(--radius);
  padding: 20px;
  overflow-x: auto;
}

#aranceles-section table {
  width: 100%;
  border-collapse: collapse;
  color: var(--text-main);
}

#aranceles-section th,
#aranceles-section td {
  padding: 10px 14px;
  border-bottom: 1px solid #3f4a6b;
  text-align: left;
  white-space: normal;
}

#aranceles-section th {
  background-color: #3f4a6b;
  font-weight: 600;
}

/* BOTÓN CERRAR SESIÓN */
#btn-logout {
  height: 37px;
  padding: 10px 22px;
  font-size: 15px;
  font-weight: 700;
  color: var(--bg-main);
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  max-width: 200px;
  width: auto;
  display: block;
  margin: 20px auto 0; /* centrado horizontal y algo de espacio arriba */
  z-index: 1000;
  position: fixed;
  right: 20px;
  top: 20px;
}

#btn-logout:hover {
  background: linear-gradient(90deg, var(--accent-hover), var(--accent));
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.65);
}

/* RESPONSIVO: en móviles, botón fijo arriba y contenedor se desplaza */
@media (max-width: 1300px) {
  #btn-logout {
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    width: 90%;
    max-width: 280px;
    z-index: 99999;
  }

  .container2 {
    margin-top: 115px; /* deja espacio para el botón fijo */
  }
}

/* BOTÓN VOLVER */
#btn-volver {
  height: 37px;
  padding: 10px 22px;
  font-size: 15px;
  font-weight: 700;
  color: var(--bg-main);
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  max-width: 280px;
  width: auto;
  display: block;
  text-decoration: none;   
  text-align: center;
  z-index: 1000;
  
  position: fixed;
  left: 20px;
  top: 40px;
}

#btn-volver:hover {
  background: linear-gradient(90deg, var(--accent-hover), var(--accent));
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.65);
}

@media (max-width: 1300px) {
  #btn-volver {
    top: 70px; /* debajo del de logout */
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    width: 90%;
    max-width: 280px;
    z-index: 99999;
  }
}

@media (max-width: 700px) {
  #btn-logout {
    position: absolute;
  }
    #btn-volver {
    position: absolute;
  }
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* RESPONSIVIDAD */
@media (max-width: 480px) {
  .container2 {
    padding: 25px 20px;
  }

  input,
  select {
    font-size: 14px;
    padding: 9px 12px;
  }

  button {
    font-size: 15px;
    padding: 10px 16px;
  }

  #resumen-datos {
    padding: 15px;
  }
}

@media (max-width: 700px) {

  #modal-pro-content {
    padding: 25px 18px !important;
    width: 92% !important;
    max-width: 380px !important;
    border-radius: 16px !important;
  }

  #modal-pro-content h2 {
    font-size: 22px !important;
  }

  #modal-pro-content p {
    font-size: 13px !important;
  }

  /* Tarjetas más pequeñas */
  .pro-plan-card {
    width: 160px !important;
    padding: 18px !important;
    border-radius: 12px !important;
  }

  .pro-plan-card h3 {
    font-size: 17px !important;
  }

  .pro-plan-card p {
    font-size: 22px !important;
  }

  /* Precio mensual debajo */
  .pro-plan-card p:nth-child(3) {
    font-size: 14px !important;
  }

  /* Botón dentro de la tarjeta */
  .pro-plan-card .plan-btn {
    padding: 10px !important;
    font-size: 14px !important;
    border-radius: 10px !important;
  }

  /* Sello "Recomendado" más pequeño */
  .pro-plan-card.recomendado div {
    font-size: 10px !important;
    padding: 3px 8px !important;
    top: -6px !important;
    right: -6px !important;
  }
}

@media (max-width: 400px) {

  #modal-pro {
    overflow-y: auto;               /* habilita scroll */
    -webkit-overflow-scrolling: touch; /* scroll suave en iOS */
    padding: 40px 0;                 /* espacio para subir/bajar */
  }

  #modal-pro-content {
    margin: auto;                    /* centrado cuando se hace scroll */
    transform: none !important;      /* evita que la animación corte el scroll */
  }
}

/* Políticas */
.footer-legal {     
    text-align: center;
    padding: 15px;
    width: 100%;
    background-color: transparent;
    z-index: 1;              
}

.footer-legal a, #cookie-settings-btn {
    color: #007bff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    margin: 0 5px;
}

.footer-legal a:hover, #cookie-settings-btn:hover {
    text-decoration: underline;
}

/* Modal general */
.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.7);
}

/* Contenido del modal */
.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    position: relative;
}

.modal-text {
    max-height: 70vh;
    overflow-y: auto;
    font-size: 14px;
    color: #333;
    line-height: 1.5;
}

/* Botón cerrar */
.close {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 24px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
}

.close:hover {
    color: #333;
}

.modal-text h2,
.modal-text h3 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    color: #222;
}

.modal-text p {
    margin-bottom: 1em;
    color: #444;
    line-height: 1.6;
    font-size: 15px;
}

.modal-text ul {
    margin: 0 0 1.5em 1.5em;
    color: #444;
    font-size: 15px;
    line-height: 1.6;
}

.modal-text ul li {
    margin-bottom: 0.5em;
}

#cookie-banner {
    display: none;
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 18px 22px;
    max-width: 520px;
    width: 90%;
    z-index: 10000;
    font-size: 14px;
    color: #333;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

#cookie-banner .cookie-text {
    flex: 1 1 60%;
    min-width: 220px;
}

#cookie-banner .cookie-text p {
    margin: 0;
    line-height: 1.5;
    font-weight: 500;
}

.cookie-buttons {
    flex: 0 1 auto;
    display: flex;
    gap: 10px;
}

#cookie-banner button {
    padding: 6px 14px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: background-color 0.25s ease;
}

#accept-cookies {
    background-color: #007bff;
    color: white;
}

#accept-cookies:hover {
    background-color: #0056b3;
}

#reject-cookies {
    background-color: #f0f0f0;
    color: #333;
}

#reject-cookies:hover {
    background-color: #dcdcdc;
}

#modal-preferencias .modal-text label {
    display: block;
    margin: 12px 0 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 15px;
    color: #222;
}

#modal-preferencias .modal-text input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
}

.botones {
    display: flex;
    justify-content: center;
}

#modal-preferencias button {
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
}

#modal-preferencias button:first-of-type {
    background-color: #007bff;
    color: white;
}

#modal-preferencias button:first-of-type:hover {
    background-color: #0056b3;
}

#modal-preferencias button:last-of-type {
    background-color: #aaa;
    margin-left: 10px;
}

#modal-preferencias button:last-of-type:hover {
    background-color: #777
}