/* -- 1. NUEVA PALETA DE COLORES "TEMA CLARO" -- */
:root {
  /* Fondos */
  --background-light: #040b18;   /* Un blanco roto muy sutil para el fondo */
  --background-card: #07132b;   /* Blanco puro para cabeceras y tarjetas */
  --border-color: #0d234b;       /* Un gris claro para bordes y líneas */
  
  /* Acentos y Botones (Tus colores de marca se mantienen) */
  --primary-blue: #237bff;
  --primary-blue-light: #2a86fd;
  --highlight-blue: #227aff;

  /* Texto (Ahora usamos colores oscuros) */
  --text-dark: #FFFFFF;          /* Texto principal casi negro */
  --text-muted: #A0AEC0;         /* Gris medio para texto secundario */
}

/* -------------------------------------- */
/* -- ESTILOS GENERALES CON EL TEMA CLARO -- */
/* -------------------------------------- */

/* Estilos generales */
body {
    font-family: Arial, sans-serif;
    background-color: var(--background-light);
    color: var(--text-dark);
    margin: 0;
    padding: 0;
}

/* Encabezado y Navegación */
header {
    background-color: var(--background-card);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav .logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-dark);
    text-decoration: none;
}

nav ul {
    list-style: none; margin: 0; padding: 0; display: flex;
}

nav ul li {
    margin-left: 1.5rem;
}

nav ul li a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.2s ease;
}
nav ul li a:hover {
    color: var(--primary-blue);
}

/* Sección Hero */
/* -- ESTILOS PARA LA SECCIÓN HERO CON VIDEO Y DEGRADADO -- */

#hero {
  position: relative; /* Crea el contexto para posicionar el video y el overlay */
  overflow: hidden;   /* Asegura que nada se salga del contenedor */
  text-align: center;
  padding: 8rem 1rem; /* Aumentamos un poco el padding para darle más impacto */
  color: white;       /* Forzamos el color del texto a blanco para que resalte */
  z-index: 1;
}

/* Estilo para el video de fondo */
.hero-video-background {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  z-index: -1; /* Envía el video al fondo */
  object-fit: cover; /* Asegura que el video cubra todo el espacio sin deformarse */
}

/* El degradado (overlay) usando un pseudo-elemento */
#hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0; /* Se posiciona encima del video (z-index: -1) pero debajo del texto */
  
  /* El degradado que pediste: de azul en la parte inferior a transparente en la superior */
  background: linear-gradient(to top, #040b18, transparent);
}

/* Asegura que el texto esté por encima del overlay */
#hero h1,
#hero p {
  position: relative; /* Saca el texto del flujo normal para que respete el z-index */
  z-index: 1;
  /* Añadimos una sombra de texto para mejorar la legibilidad sobre el video */
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.6);
}

#hero .brand_img{
    position: relative;
    width: 30%;
    z-index: 2;
}

/* Secciones Generales */
section {
    padding: 4rem 1rem;
}

h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-dark);
}

/*-------------------
    Sección de Tracks
--------------------*/

#tracks {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Barra de Búsqueda */
.search-bar {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.search-bar input {
    width: 50%;
    padding: 25px 25px;
    border: 1px solid var(--border-color);
    background-color: var(--background-card);
    color: var(--text-dark);
    border-radius: 10px 0 0 10px;
    font-size: 15px;
}

.search-bar button {
    padding: 0.8rem 30px;
    background-color: var(--primary-blue);
    color: var(--background-card);
    border: 1px solid var(--primary-blue);
    cursor: pointer;
    border-radius: 0 10px 10px 0;
    transition: background-color 0.2s ease;
    font-size: 15px;
    font-weight: bold;
}
.search-bar button:hover {
    background-color: var(--primary-blue-light);
}

/* Featured Track */
.featured-track {
    display: grid;
    grid-template-columns: 1fr 6fr 3fr;
    align-items: center;
    background-color: var(--background-card);
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.track-cover {
    width: 150px;
    height: 150px;
    margin-right: 1.5rem;
    border-radius: 10px;
    object-fit: cover;
}

.track-info h2 {
    margin: 0.5rem 0;
    font-size: 1.8rem;
    text-align: left;
}

.track-player {
    display: flex;
    align-items: center;
}

.play-button {
    background: none;
    border: none;
    color: var(--text-dark);
    font-size: 2rem;
    cursor: pointer;
    margin-right: 1rem;
}

.track-actions {
    margin-left: auto;       /* Mantiene todo el bloque a la derecha */
    display: flex;          /* Activa Flexbox (dirección 'row' por defecto) */
    align-items: center;    /* ¡LA CLAVE! Alinea verticalmente los elementos en el centro */
    gap: 0.75rem;           /* Espacio HORIZONTAL entre el precio, iconos y tags */
}

/* Las reglas para .icon-group y .tags que ya tienes están perfectas, no las cambies */
.icon-group {
    display: flex;
    gap: 0.5rem;
}

.btn-price{
    border-radius: 6px;
}

.btn-price, .btn-cart {
    background-color: var(--primary-blue);
    color: var(--text-dark);
    border: 1px solid var(--border-color);
    padding: 0.8rem 1.2rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    z-index: 2;
}
.btn-cart {
    background-color: var(--primary-blue);
    border-color: var(--primary-blue);
    color: var(--text-dark);
    border-radius: 6px;
    z-index: 2;
}
.btn-cart:hover {
    background-color: var(--primary-blue-light);
}

.btn-icon, .btn-icon-small {
    background-color: var(--background-light);
    border: 1px solid var(--border-color);
    cursor: pointer;
    margin-left: 0.5rem;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    
    /* Centrado perfecto del SVG dentro del botón */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Estilo para los iconos SVG que están dentro de los botones */
.btn-icon svg, .btn-icon-small svg {
    fill: var(--text-muted); /* Hereda el color de texto secundario */
    transition: fill 0.2s ease;
}

/* Estilos específicos para los botones grandes (Featured Track) */
.btn-icon {
    width: 40px;
    height: 40px;
    border-radius: 5px;
}
.btn-icon svg {
    width: 22px;
    height: 22px;
}

/* Estilos específicos para los botones pequeños (Lista de Tracks) */
.btn-icon-small {
    width: 32px;
    height: 32px;
    border-radius: 5px;
}

.btn-icon-small svg {
    width: 18px;
    height: 18px;
}

/* Efecto Hover: cambia el color del botón y del icono a azul */
.btn-icon:hover, .btn-icon-small:hover {
    background-color: var(--primary-blue-light);
    border-color: var(--primary-blue-light);
}
.btn-icon:hover svg, .btn-icon-small:hover svg {
    fill: var(--background-card); /* El icono se vuelve blanco */
}

.tags {
    display: flex;
    gap: 0.5rem;
    margin-top: 0;
}

.tags span {
    background-color: var(--background-light);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    padding: 10px 15px;
    border-radius: 15px;
    font-size: 0.8rem;
    /* Quitamos el margin-top de aquí, porque ahora lo controla el 'gap' del contenedor .tags */
}

/* Lista de Tracks */
.track-list-header,
.track-item {
    display: grid;
    /* Define 5 columnas: Imagen, Título (flexible), BPM, Tags, Acciones */
    grid-template-columns: 40px 1fr 100px 220px 150px;
    align-items: center;
    gap: 1rem; /* Espacio entre columnas */
    padding: 0 1rem;
}

/* 2. Estilos específicos SOLO para el header */
.track-list-header {
    color: var(--text-muted);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem; /* Pequeño espacio extra abajo */
}

/* 3. Estilos específicos SOLO para los items */
.track-item {
    padding-top: 0.8rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s ease;
    cursor: pointer;
}
.track-item:hover {
    background-color: var(--background-card);
    border-radius: 5px;
}

/* 4. Alineación del CONTENIDO DENTRO de las celdas */
/* Centra el texto de BPM y Tags tanto en el header como en los items */
.track-list-header span:nth-child(3), /* Header BPM */
.track-item .track-bpm,               /* Contenido BPM */
.track-list-header span:nth-child(4), /* Header TAGS */
.track-item .track-tags {             /* Contenido TAGS */
    text-align: center;
}

/* Empuja las acciones del item a la derecha */
.track-item .track-item-actions {
    justify-content: flex-end; /* Alinea los botones a la derecha dentro de su celda */
}
.track-thumb {
    width: 40px;
    height: 40px;
    margin-right: 1rem;
    border-radius: 3px;
    object-fit: cover;
}
.track-tags span {
    background-color: var(--background-light);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    padding: 10px 15px;
    border-radius: 10px;
    font-size: 0.7rem;
    margin-right: 0.5rem;
}

.track-item-actions {
    display: flex;             /* Activa Flexbox para alinear los botones horizontalmente */
    justify-content: flex-end; /* Empuja el grupo de botones hacia la derecha */
    align-items: center;       /* Centra verticalmente los botones en la misma línea */
    gap: 0.5rem;               /* Añade un espacio consistente entre cada botón */
}  

/* AÑADE ESTO A style.css */
#real-waveform {
    width: 350px;
}

/* 1. Define la animación de salto */
@keyframes bass-jump-animation {
  0%, 100% {
    transform: scaleY(1); /* Estado normal */
  }
  10% {
    transform: scaleY(1.1); /* Salto máximo y rápido */
  }
  20% {
    transform: scaleY(0.95); /* Rebote hacia abajo */
  }
  40% {
    transform: scaleY(1.05); /* Segundo rebote más pequeño */
  }
}

/* 2. Aplica la animación cuando tenga la clase '.playing' */
#real-waveform.playing {
  transform-origin: center;
  animation-name: bass-jump-animation;
  animation-duration: 0.8s; /* Ajusta la velocidad del "latido" */
  animation-iteration-count: infinite;
  /* Un timing-function que hace el movimiento más percusivo */
  animation-timing-function: cubic-bezier(0.25, 1, 0.5, 1);
}

/* -- ESTILOS PARA EL REPRODUCTOR STICKY (VERSIÓN FINAL, ANCHA Y DISTRIBUIDA) -- */

#sticky-player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--background-card);
    border-top: 1px solid var(--border-color);
    z-index: 2000;
    transform: translateY(0);
    transition: transform 0.3s ease-in-out;
}
#sticky-player.hidden {
    transform: translateY(100%);
}

/* Barra de Progreso Superior */
#sticky-progress-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background-color: rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: height 0.2s ease;
}
#sticky-progress-container:hover {
    height: 6px;
}
#sticky-progress-bar {
    width: 0%;
    height: 100%;
    background-color: var(--primary-blue);
    transition: width 0.1s linear;
}

/* Contenido Principal del Reproductor */
.sticky-player-content {
    height: 90px; /* MÁS ALTO */
    margin: auto;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: center;
    justify-content: space-between; /* Mantiene la distribución general */
}

/* Izquierda: Info del Track */
.sticky-track-details {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: flex-start; /* Asegura que el contenido se alinee a la izquierda */
    min-width: 250px; /* Ancho mínimo para que no se comprima demasiado */
}
.sticky-cover {
    width: 60px; /* Más grande */
    height: 60px; /* Más grande */
    border-radius: 6px;
}
.sticky-track-info span { display: block; }
#sticky-title { color: var(--text-dark); font-weight: bold; }
#sticky-artist { color: var(--text-muted); font-size: 0.8rem; }

/* Centro: Controles Principales */
.sticky-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: center;
}
.control-btn { background: none; border: none; cursor: pointer; color: var(--text-muted); padding: 0; display: flex; align-items: center; justify-content: center; }
.control-btn svg { width: 24px; height: 24px; fill: currentColor; }
.control-btn.play {
    width: 48px; /* Más grande */
    height: 48px; /* Más grande */
    background-color: var(--text-dark);
    color: var(--background-card);
    border-radius: 50%;
}
.control-btn.play svg { width: 24px; height: 24px; }

/* Derecha: Controles Secundarios */
.sticky-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end; /* Asegura que el contenido se alinee a la derecha */
    gap: 1rem;
    min-width: 250px; /* Ancho mínimo para que no se comprima demasiado */
}
.control-btn.small svg { width: 20px; height: 20px; }
.volume-control { display: flex; align-items: center; }
#volume-slider { width: 80px; }
#sticky-player .btn-cart {
    background-color: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

/* MUY IMPORTANTE: Aumenta el padding del body para compensar el nuevo tamaño */
body {
    padding-bottom: 90px;
}

/* -- ESTILOS PARA EL MODAL DE LICENCIAS -- */

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7); /* Fondo oscuro semitransparente */
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.3s ease;
}
.modal-backdrop.hidden {
    opacity: 0;
    pointer-events: none; /* Evita interacciones cuando está oculto */
}

.modal-content {
    background-color: var(--background-card);
    color: var(--text-dark);
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 45%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transform: scale(1);
    transition: transform 0.3s ease;

     /* --- ¡CAMBIOS CLAVE AQUÍ! --- */
    display: flex;
    flex-direction: column;
    max-height: 75vh; /* 1. Fija una altura máxima (85% de la altura de la pantalla) */
}
.modal-backdrop.hidden .modal-content {
    transform: scale(0.95);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    margin-bottom: 2rem;

    flex-shrink: 0;
}
.modal-header h2 {
    margin: 0;
}
.close-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}
.close-btn svg {
    width: 24px;
    height: 24px;
    fill: var(--text-muted);
}

.modal-body {
    display: flex;
    gap: 2rem;
    overflow-y: auto;
    padding-right: 1rem;

    /* --- ESTILOS PARA LA BARRA DE SCROLL (FIREFOX) --- */
    scrollbar-width: thin; /* Opciones: 'auto', 'thin', 'none' */
    scrollbar-color: var(--border-color) var(--background-card); /* Color del pulgar y del riel */
}

/* --- ESTILOS PARA LA BARRA DE SCROLL (CHROME, SAFARI, EDGE) --- */

/* 1. El riel (la barra de fondo) */
.modal-body::-webkit-scrollbar-track {
    background-color: var(--background-light); /* Fondo oscuro, igual que la tarjeta */
    border-radius: 10px;
}

/* 2. El "pulgar" (la parte que se arrastra) */
.modal-body::-webkit-scrollbar-thumb {
    background-color: var(--text-muted); /* Color gris-azulado sutil */
    border-radius: 10px;
    border: 2px solid var(--border-color); /* Crea un pequeño borde alrededor del pulgar */
}

/* 3. El efecto hover sobre el pulgar */
.modal-body::-webkit-scrollbar-thumb:hover {
    background-color: var(--primary-blue); /* Se ilumina con tu azul de acento */
}

/* 4. El ancho total de la barra de scroll */
.modal-body::-webkit-scrollbar {
    width: 10px; /* Un ancho delgado y moderno */
}

.modal-track-info {
    flex-basis: 30%;
    text-align: center;
}
#modal-track-cover {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 1rem;
}
#modal-track-title {
    font-size: 1.2rem;
    margin: 0;
}
#modal-track-artist {
    color: var(--text-muted);
}

.modal-license-options {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.license-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}
.license-info h4 { margin: 0 0 0.25rem 0; }
.license-info p { margin: 0; color: var(--text-muted); }

/* Usamos la misma clase que los botones de la lista */
.license-option .btn-cart {
    flex-shrink: 0; /* Evita que el botón se encoja */
    margin-left: 1rem;
}

/* -- NUEVOS ESTILOS PARA LOS TÉRMINOS DE LICENCIA -- */

.license-option {
    display: flex;
    flex-wrap: wrap; 
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.license-option-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}
.license-info h4 { margin: 0 0 0.25rem 0; }
.license-info p { margin: 0; color: var(--text-muted); }

.license-option .btn-cart {
    flex-shrink: 0;
    margin-left: 1rem;
}

.toggle-terms-btn {
    width: 100%;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    padding: 1rem 0 0 0;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.toggle-terms-btn svg {
    width: 16px;
    height: 16px;
    fill: var(--text-muted);
    transition: transform 0.3s ease;
}
.toggle-terms-btn.active svg {
    transform: rotate(180deg);
}

.usage-terms {
    width: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    margin-top: 1rem;
}
.usage-terms.visible {
    max-height: 200px; 
}
.usage-terms-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem 1rem; /* Aumenta el gap horizontal para más espacio */
    padding-left: 1.5rem;
    list-style: none;
    margin: 0;
}

/* NUEVOS ESTILOS PARA LOS ICONOS DE LOS TÉRMINOS */
.usage-terms-grid li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-muted);
}
.usage-terms-grid li svg {
    width: 16px;
    height: 16px;
    fill: var(--text-muted);
    flex-shrink: 0;
}

.modal-footer {
    padding-top: 1.5rem;
    margin-top: 1.5rem;
    text-align: center;
    flex-shrink: 0; /* Evita que el footer se encoja */
}
.modal-footer p {
    color: var(--text-muted);
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
}

.negotiate-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem;
    background-color: var(--background-card); /* Usando tu variable */
    color: var(--text-dark);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
}
.negotiate-btn:hover {
    background-color: var(--primary-blue);
    border-color: var(--primary-blue);
    color: white;
}
.negotiate-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor; /* El color del icono será el mismo que el del texto */
}

/* -- ESTILOS PARA LA SECCIÓN DE SOUND KITS -- */

#sound-kits {
    text-align: center; /* Centra el h2 y el botón */
}

.sound-kit-grid {
    display: flex;             /* 1. Cambiamos a Flexbox */
    justify-content: center;   /* 2. Centramos los kits horizontalmente */
    flex-wrap: wrap;           /* 3. Permite que los kits pasen a la siguiente línea si no caben */
    gap: 2rem;
    max-width: 1200px;
    margin: 2rem auto;
    text-align: left;
}

.sound-kit-card {
    flex-basis: 250px;
    /* Estilos para cada tarjeta de producto */
}

.sound-kit-cover {
    width: 100%;
    aspect-ratio: 1 / 1; /* Mantiene la imagen cuadrada */
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}
.sound-kit-cover:hover {
    transform: scale(1.05); /* Efecto de zoom sutil al pasar el ratón */
}

.sound-kit-title {
    font-size: 1rem;
    font-weight: bold;
    margin: 0 0 0.25rem 0;
    color: var(--text-dark);
}

.sound-kit-price {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
}

.browse-all-btn {
    display: inline-block;
    margin-top: 2rem;
    padding: 1rem 2rem;
    background-color: var(--background-card);
    color: var(--text-bright);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.browse-all-btn:hover {
    background-color: var(--primary-blue);
    color: white;
}

/* -- ESTILOS REFACTORIZADOS PARA LICENSING INFO (ADAPTADO A TUS VARIABLES) -- */

#licensing-info {
    padding: 4rem 1rem;
    text-align: center;
}
#licensing-info h2 {
    font-size: 2rem;
    margin-bottom: 3rem;
}

.licensing-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 2rem auto 0 auto;
    text-align: left;
}

.license-card {
    background-color: transparent;
    border: none;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    text-align: left;
}

/* Estilo para la tarjeta POPULAR */
.license-card.popular {
    background-color: var(--background-card); /* Usa tu color para tarjetas */
    border: 1px solid var(--border-color);     /* Usa tu color para bordes */
    border-radius: 8px;
    transform: scale(1.05);
    position: relative;
}
.popular-banner {
    text-align: center;
    color: var(--primary-blue); /* Usa tu color de acento azul */
    font-weight: bold;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}


/* Jerarquía de Texto */
.license-card h4 {
    font-size: 0.9rem;
    text-transform: uppercase;
    color: var(--text-muted); /* Usa tu color para texto secundario */
    margin: 0 0 0.5rem 0;
    letter-spacing: 0.5px;
}

.license-price {
    font-size: 2.5rem;
    font-weight: 900;
    margin: 0 0 1rem 0;
    color: var(--text-dark); /* Usa tu color para texto principal (blanco) */
}
.license-price.offer {
    font-size: 1.8rem;
}

.license-files {
    font-size: 0.8rem;
    font-weight: bold;
    color: var(--text-muted);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.license-terms {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
    font-size: 0.9rem;
    color: var(--text-dark);
    flex-grow: 1;
}
.license-terms li {
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1.2rem;
}
.license-terms li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-blue); /* Usa tu azul de acento para los puntos */
}

/* Botones y Deals */
.license-button {
    display: inline-block;
    padding: 0.8rem 1rem;
    background-color: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    text-decoration: none;
    text-align: center;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.2s ease;
}
.license-button:hover {
    background-color: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}
.license-card.popular .license-button {
    background-color: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}
.license-card.popular .license-button:hover {
    background-color: var(--primary-blue-light);
}


.bulk-deal {
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
}
.bulk-deal p {
    margin: 0 0 0.25rem 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}
.bulk-deal strong {
    font-size: 1rem;
    color: var(--primary-blue);
}

/* -- ESTILOS REFINADOS PARA LA SECCIÓN DE SERVICIOS (DISEÑO PREMIUM) -- */

#services {
    text-align: center;
    padding: 4rem 1rem;
}
#services h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}
.section-subtitle {
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 4rem auto; /* Aumentamos el margen inferior */
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.service-card {
    background-color: var(--background-card);
    /* Borde inicial sutil */
    border: 1px solid var(--border-color); 
    border-radius: 12px; /* Bordes más redondeados */
    padding: 2.5rem; /* Más espaciado interno */
    text-align: left;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, border-color 0.3s ease;
}
.service-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-blue); /* El borde se ilumina al pasar el ratón */
}

.service-icon {
    width: 50px;
    height: 50px;
    margin-bottom: 1.5rem;
    /* Usamos tu color de borde como fondo para el icono */
    background-color: var(--border-color); 
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.service-icon svg {
    width: 28px;
    height: 28px;
    /* El icono ahora es blanco para máximo contraste */
    fill: var(--text-dark); 
}

.service-card h3 {
    font-size: 1.3rem;
    margin: 0 0 0.5rem 0;
    color: var(--text-dark);
}

.service-card p {
    color: var(--text-muted);
    margin: 0 0 1.5rem 0;
    line-height: 1.6;
    flex-grow: 1; /* Empuja el precio y el botón hacia abajo */
}

.service-price {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

.service-button {
    display: block;
    width: 100%;
    text-align: center;
    padding: 0.8rem 1rem;
    background-color: var(--primary-blue);
    color: white;
    border: 1px solid var(--primary-blue);
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.2s ease;
}
.service-button:hover {
    background-color: var(--primary-blue-light);
}

/* -- ESTILOS PARA LA SECCIÓN DE CONTACTO (ADAPTADO A TUS VARIABLES) -- */

#contact {
    text-align: center;
    padding: 4rem 1rem;
    background-color: var(--background-card); /* Usa el color de fondo de tus tarjetas */
}
#contact h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}
#contact .section-subtitle {
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 3rem auto;
}

.contact-form {
    max-width: 600px;
    margin: 2rem auto 0 auto;
    text-align: left;
}

.form-group {
    position: relative;
    margin-bottom: 2.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px 0;
    font-size: 1rem;
    color: var(--text-dark); /* Texto que escribe el usuario (blanco) */
    background-color: transparent;
    border: none;
    border-bottom: 2px solid var(--border-color); /* Línea inferior sutil */
    outline: none;
    transition: border-color 0.2s ease;
}
/* La línea se ilumina en azul al hacer clic */
.form-group input:focus,
.form-group textarea:focus {
    border-bottom-color: var(--primary-blue);
}


.form-group label {
    position: absolute;
    top: 10px;
    left: 0;
    color: var(--text-muted); /* Color inicial del label */
    pointer-events: none;
    transition: all 0.2s ease;
}

/* El efecto "floating label" */
.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:focus + label,
.form-group textarea:not(:placeholder-shown) + label {
    top: -15px;
    font-size: 0.8rem;
    color: var(--primary-blue); /* Color del label cuando está activo */
}

/* -- ESTILOS PARA EL CHECKBOX PERSONALIZADO -- */

.form-consent {
    display: flex;
    align-items: center;
    gap: 0.75rem; /* Aumentamos un poco el espacio */
    margin-bottom: 1.5rem;
    position: relative; /* Necesario para posicionar el checkbox real */
    cursor: pointer; /* Hace que toda la línea sea clickable */
    justify-content: center;
}

/* 1. Ocultamos el checkbox real, pero lo mantenemos funcional */
.form-consent input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

/* 2. Creamos el "falso" checkbox usando un pseudo-elemento en la etiqueta */
.form-consent label {
    color: var(--text-muted);
    font-size: 0.9rem;
    position: relative;
    padding-left: 28px; /* Espacio para nuestro falso checkbox */
}

/* Estilo de la caja del falso checkbox */
.form-consent label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background-color: transparent;
    border: 2px solid var(--border-color); /* Borde con tu color */
    border-radius: 4px;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

/* 3. Estilo del check (la marca de verificación) usando otro pseudo-elemento */
.form-consent label::after {
    content: '';
    position: absolute;
    left: 7px;
    top: 50%;
    transform: translateY(-60%) rotate(45deg);
    width: 6px;
    height: 12px;
    border: solid var(--text-dark); /* Color del check (blanco) */
    border-width: 0 2px 2px 0;
    opacity: 0; /* Oculto por defecto */
    transition: opacity 0.2s ease;
}

/* 4. Estilos para cuando el checkbox real está MARCADO (checked) */
.form-consent input[type="checkbox"]:checked + label::before {
    background-color: var(--primary-blue); /* La caja se llena de tu color de acento */
    border-color: var(--primary-blue);
}

.form-consent input[type="checkbox"]:checked + label::after {
    opacity: 1; /* Hacemos visible el check */
}

/* 5. (Opcional pero recomendado) Efecto de "resplandor" al enfocar con el teclado */
.form-consent input[type="checkbox"]:focus + label::before {
    box-shadow: 0 0 10px rgba(35, 123, 255, 0.5); /* Usa tu --primary-blue con transparencia */
}

.contact-submit-btn {
    display: block;
    width: 100%;
    padding: 1rem;
    background-color: var(--primary-blue); /* Botón con tu color de acento principal */
    color: var(--text-dark); /* Texto del botón (blanco) */
    border: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.contact-submit-btn:hover {
    background-color: var(--primary-blue-light); /* Usa tu color de hover */
}

/* -- ESTILOS PARA EL MENSAJE DE RESPUESTA DEL FORMULARIO -- */

.form-message {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.form-message.visible {
    opacity: 1;
}

.form-message.success {
    background-color: rgba(35, 123, 255, 0.15); /* Fondo azulado sutil */
    color: var(--primary-blue);
    border: 1px solid var(--primary-blue);
}

.form-message.error {
    background-color: rgba(255, 107, 107, 0.15); /* Fondo rojizo sutil */
    color: #FF6B6B;
    border: 1px solid #FF6B6B;
}

/* -- ESTILOS PARA EL NUEVO FOOTER PROFESIONAL (ADAPTADO A TUS VARIABLES) -- */

footer {
    background-color: var(--background-light); /* Usa tu color de fondo principal */
    border-top: 1px solid var(--border-color); /* Usa tu color de borde */
    padding: 3rem 1rem 2rem 1rem;
    color: var(--text-muted); /* Usa tu color para texto secundario */
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding-bottom: 2rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color); /* Usa tu color de borde */
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-dark); /* Usa tu color para texto principal (blanco) */
}

.footer-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1.5rem;
}

.footer-nav ul li a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.2s ease;
}
.footer-nav ul li a:hover {
    color: var(--primary-blue); /* Usa tu color de acento azul */
}

.footer-socials {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.footer-socials a svg {
    width: 24px;
    height: 24px;
    fill: var(--text-muted);
    transition: all 0.2s ease;
}

.footer-socials a:hover svg {
    fill: var(--primary-blue); /* Usa tu color de acento azul */
    transform: translateY(-2px);
}

.footer-bottom {
    text-align: center;
    font-size: 0.9rem;
}

/* -- ESTILOS PARA EL DROPDOWN DEL CARRITO DE COMPRA -- */

.header-actions {
    display: flex;
    align-items: center;
}

.cart-container {
    position: relative; /* Contenedor ancla para el dropdown */
}

.cart-button {
    background: none; border: none; cursor: pointer; position: relative;
    padding: 0.5rem;
}
.cart-button svg {
    width: 26px; height: 26px; fill: var(--text-muted); transition: fill 0.2s ease;
}
.cart-button:hover svg {
    fill: var(--text-dark);
}
#cart-counter {
    position: absolute; top: 0; right: 0;
    background-color: var(--primary-blue);
    color: white; width: 18px; height: 18px;
    border-radius: 50%; font-size: 0.7rem; font-weight: bold;
    display: flex; align-items: center; justify-content: center;
    display: none; /* Se muestra con JS */
}

/* Estilos del Dropdown del Carrito */
.cart-dropdown {
    position: absolute;
    top: calc(100% + 10px); /* 100% (debajo del botón) + 10px de espacio */
    right: 0;
    width: 380px;
    background-color: var(--background-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 2000;
    
    /* Animación de entrada/salida */
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}
.cart-dropdown.hidden {
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
}
.cart-header { padding: 1rem; border-bottom: 1px solid var(--border-color); }
.cart-header h3 { margin: 0; font-size: 1.1rem; }

.cart-items {
    display: flex; flex-direction: column; gap: 1rem;
    padding: 1rem;
    max-height: 300px; /* Altura máxima antes de que aparezca el scroll */
    overflow-y: auto;
}
.cart-item { display: flex; align-items: center; gap: 1rem; }
.cart-item-cover { width: 50px; height: 50px; border-radius: 4px; }
.cart-item-details { flex-grow: 1; }
.cart-item-title { display: block; font-weight: bold; color: var(--text-dark); }
.cart-item-license { display: block; font-size: 0.8rem; color: var(--text-muted); }
.cart-item-price { font-weight: bold; }
.cart-item-remove { background: none; border: none; font-size: 1.5rem; color: var(--text-muted); cursor: pointer; }
.cart-empty-message { text-align: center; color: var(--text-muted); padding: 2rem 0; }


.cart-footer {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
}
.cart-total {
    display: flex; justify-content: space-between;
    font-size: 1.2rem; font-weight: bold; margin-bottom: 1rem;
}
.checkout-btn {
    width: 100%; padding: 1rem;
    background-color: var(--primary-blue); color: white;
    border: none; border-radius: 8px; font-weight: bold; font-size: 1rem; cursor: pointer;
}

/* EN style.css */
.payment-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}
.payment-btn {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: transform 0.2s ease;
}
.payment-btn:hover {
    transform: scale(1.02);
}
.payment-btn svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.payment-btn.stripe {
    background-color: #635bff; /* Color de Stripe */
    color: white;
}
.payment-btn.paypal {
    background-color: #ffc439; /* Color de PayPal */
    color: #003087;
}

/* -- ESTILOS PARA PÁGINAS DE CHECKOUT, CUENTA, ETC. -- */

/* Contenedor principal para estas páginas */
.page-container {
    max-width: 800px;
    margin: 5rem auto;
    padding: 2.5rem;
    background-color: var(--surface-card);
    border: 1px solid var(--border-glow);
    border-radius: 12px;
    box-shadow: 0 0 40px rgba(67, 120, 232, 0.1);
}
.page-container h1, .page-container h2 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 2rem;
}

/* Formularios de autenticación */
.auth-forms {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}
.form-wrapper h2 {
    font-size: 1.5rem;
    border-bottom: 1px solid var(--border-glow);
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}
.form-field {
    width: 100%;
    padding: 0.8rem 1rem;
    background-color: var(--background-deep-space);
    border: 1px solid var(--border-glow);
    border-radius: 6px;
    color: var(--text-bright);
    font-size: 1rem;
    margin-bottom: 1rem;
    box-sizing: border-box; /* Importante para que el padding no afecte el ancho */
}
.form-field:focus {
    outline: none;
    border-color: var(--accent-glow-blue);
}

/* Resumen de la Orden */
.order-summary {
    margin-bottom: 3rem;
}
.order-items {
    border-top: 1px solid var(--border-glow);
    border-bottom: 1px solid var(--border-glow);
    padding: 1rem 0;
}
.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
}
.order-item span:last-child {
    font-weight: bold;
}
.order-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.5rem;
    font-weight: bold;
    margin-top: 1.5rem;
}

/* Botones de Pago */
.payment-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}
.payment-btn {
    width: 100%; padding: 1rem; border: none; border-radius: 8px; font-weight: bold;
    font-size: 1rem; cursor: pointer; display: flex; align-items: center; justify-content: center;
    gap: 0.75rem; transition: transform 0.2s ease;
}
.payment-btn:hover { transform: scale(1.02); }
.payment-btn svg { width: 24px; height: 24px; fill: currentColor; }
.payment-btn.stripe { background-color: #635bff; color: white; }
.payment-btn.paypal { background-color: #ffc439; color: #003087; }

/* Página de Éxito */
.success-message { text-align: center; }
.success-icon {
    width: 80px; height: 80px; margin: 0 auto 1.5rem auto;
    background-color: rgba(4, 217, 128, 0.1);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
}
.success-icon svg { width: 40px; height: 40px; fill: #04D980; }
.success-message p { color: var(--text-muted-glow); }
.success-message a {
    display: inline-block; margin-top: 1.5rem; padding: 0.8rem 2rem;
    background-color: var(--accent-glow-blue); color: white;
    text-decoration: none; font-weight: bold; border-radius: 6px;
}

/* Página de Mi Cuenta */
.order-history-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1rem; border-radius: 8px;
    border: 1px solid var(--border-glow); margin-bottom: 1rem;
}
.download-link {
    padding: 0.5rem 1rem; background-color: var(--accent-glow-blue);
    color: white; text-decoration: none; font-weight: bold; border-radius: 6px;
}

.auth-body {
    background-color: var(--background-light); /* O tu variable de fondo oscuro */
}

/* El nuevo contenedor <main> es el que se encarga de centrar */
.auth-main {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 160px); /* 100% de la altura menos un aprox. del header y footer */
    padding: 2rem 0;
}

.auth-container {
    max-width: 500px;
    width: 100%;
    padding: 2rem;
}

.auth-card {
    background-color: var(--background-card); /* Fondo de la tarjeta */
    border: 1px solid var(--border-color);     /* Borde de la tarjeta */
    border-radius: 12px;
    padding: 3rem;
    /* Sombra de resplandor usando tu color de acento azul */
    box-shadow: 0 0 50px rgba(35, 123, 255, 0.1); 
    transition: height 0.3s ease; 
}
.auth-card h1 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 3rem;
    color: var(--text-dark); /* Texto principal (blanco) */
}

/* Lógica de transición para ocultar/mostrar */
#login-view, #register-view {
    transition: opacity 0.3s ease, visibility 0.3s;
}
.hidden {
    opacity: 0;
    visibility: hidden;
    position: absolute;
}

/* Estilo para los campos de formulario */
.form-group {
    position: relative;
    margin-bottom: 2.5rem;
}
.form-group input {
    width: 100%; 
    padding: 10px 0; 
    font-size: 1rem; 
    color: var(--text-dark); /* Texto que se escribe (blanco) */
    background-color: transparent; 
    border: none; 
    border-bottom: 2px solid var(--border-color); /* Línea inferior */
    outline: none;
}
.form-group label {
    position: absolute; 
    top: 10px; 
    left: 0; 
    color: var(--text-muted); /* Color del texto secundario */
    pointer-events: none; 
    transition: all 0.2s ease;
}
.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label {
    top: -15px; 
    font-size: 0.8rem; 
    color: var(--primary-blue); /* Color de acento al activar */
}
/* La línea del input también cambia de color al hacer foco */
.form-group input:focus {
    border-bottom-color: var(--primary-blue);
}


/* Enlace para cambiar entre vistas */
.auth-switch {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}
.auth-switch a {
    color: var(--primary-blue);
    font-weight: bold;
    text-decoration: none;
}

/* Mensaje de error */
.auth-error {
    text-align: center; 
    color: #FF6B6B; /* Mantenemos un rojo estándar para errores */
    margin-bottom: 2rem;
    background-color: rgba(255, 107, 107, 0.1); 
    padding: 1rem; 
    border-radius: 8px;
}



/* -- ESTILOS PARA PÁGINAS DE CHECKOUT, CUENTA, ETC. (ADAPTADO A TUS VARIABLES) -- */

.checkout-body {
    background-color: var(--background-light); /* Fondo principal de tu sitio */
}
.checkout-header {
    text-align: center;
    padding: 3rem 1rem;
}
.checkout-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto 5rem auto;
    padding: 0 1rem;
}

/* Tarjeta base */
.card {
    background-color: var(--background-card); /* Fondo de la tarjeta */
    border: 1px solid var(--border-color);     /* Borde de la tarjeta */
    border-radius: 12px;
}
.card-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}
.card-header h3 { margin: 0; font-size: 1.1rem; color: var(--text-dark); }
.edit-btn { 
    background-color: var(--border-color); /* Usamos el color de borde para un botón secundario */
    color: var(--text-dark); 
    border: none; 
    padding: 0.5rem 1rem; 
    border-radius: 6px; 
    cursor: pointer; 
}

/* Detalles de Facturación */
.billing-details .card-body { padding: 1.5rem; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.info-item span { 
    display: block; 
    font-size: 0.7rem; 
    color: var(--text-muted); /* Texto secundario */
    margin-bottom: 0.25rem; 
    text-transform: uppercase; 
}
.info-item {
    color: var(--text-dark); /* Texto principal */
}

/* Lista de Productos */
.checkout-product-list { margin-top: 2rem; }
.product-list-header { 
    display: flex; 
    justify-content: space-between; 
    color: var(--text-muted); 
    padding: 0 1rem 0.5rem 1rem; 
}
.product-item {
    display: grid;
    grid-template-columns: auto 6fr 3fr;
    align-items: center;
    gap: 20px;
    padding: 1rem; 
    border-bottom: 1px solid var(--border-color);
}
.product-item-cover { width: 50px; height: 50px; border-radius: 4px; }
.product-item-details { flex-grow: 1; }
.product-item-title { display: block; font-weight: bold; color: var(--text-dark); }
.product-item-actions { display: grid; align-items: center; justify-content: center; grid-template-columns: 1fr 1fr; gap: 10px;}
.product-item-license { font-size: 0.8rem; color: var(--text-muted); }
.product-item-price { font-weight: bold; color: var(--text-dark); text-align: center;}

/* Sidebar de Resumen */
.order-summary-card { padding: 1.5rem; }
.summary-item, .summary-total { display: flex; justify-content: space-between; margin-bottom: 1rem; color: var(--text-dark); }
.summary-total { font-size: 1.5rem; font-weight: bold; padding-top: 1rem; border-top: 1px solid var(--border-color); }
.payment-buttons { margin-top: 1.5rem; }
.summary-footer { font-size: 0.8rem; color: var(--text-muted); text-align: center; margin-top: 1.5rem; }
.summary-footer a { color: var(--primary-blue); } /* Usa tu color de acento para enlaces */

/* -- ESTILOS PARA LA PÁGINA DE ÉXITO -- */

.success-message { 
    text-align: center; 
    padding: 2rem 0;
}

.success-icon {
    width: 80px; 
    height: 80px; 
    margin: 0 auto 2rem auto;
    /* Usamos un verde de éxito con el efecto "glow" */
    background-color: rgba(4, 217, 128, 0.1);
    border: 1px solid rgba(4, 217, 128, 0.3);
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center;
}
.success-icon svg { 
    width: 40px; 
    height: 40px; 
    fill: #04D980; 
}

.success-message h1 {
    color: var(--text-dark); /* Tu blanco principal */
}

.success-message p { 
    color: var(--text-muted); /* Tu texto secundario */
    max-width: 450px;
    margin: 0 auto 2rem auto;
    line-height: 1.6;
}

.success-message .service-button {
    display: inline-block;
    width: auto; /* Para que no ocupe el 100% */
}

/* -- ESTILOS REFINADOS PARA EL DASHBOARD DE "MI CUENTA" -- */

.page-container h1 {
    margin-top: 0;
    margin-bottom: 2rem;
}

/* Tarjeta de Facturación */
.billing-details {
    margin-bottom: 3rem;
}
.card {
    background-color: var(--background-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}
.card-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-dark);
}
.edit-btn {
    background-color: var(--border-color);
    color: var(--text-dark);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
    transition: background-color 0.2s ease;
}
.edit-btn:hover {
    background-color: var(--primary-blue);
    color: white;
}
.card-body {
    padding: 1.5rem;
}
.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}
.info-item span {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
    text-transform: uppercase;
}
.info-item {
    color: var(--text-dark);
    font-weight: bold;
}

/* Sección de Descargas */
.downloads-section h2 {
    text-align: left;
    margin-bottom: 1.5rem;
}
.order-history {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.order-history-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background-color: var(--background-card);
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: transform 0.3s ease, border-color 0.3s ease;
}
.order-history-item:hover {
    transform: translateY(-3px);
    border-color: var(--primary-blue);
}

.order-item-cover {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}
.order-item-info {
    flex-grow: 1;
}
.order-title {
    display: block;
    font-weight: bold;
    color: var(--text-dark);
}
.order-license {
    display: block;
    font-size: 0.9rem;
    color: var(--text-muted);
}
.download-link {
    background-color: var(--primary-blue);
    color: white;
    text-decoration: none;
    font-weight: bold;
    border-radius: 6px;
    padding: 0.8rem 1.5rem;
    text-align: center;
    transition: background-color 0.2s ease;
    white-space: nowrap;
}
.download-link:hover {
    background-color: var(--primary-blue-light);
}
.no-orders-message {
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    background-color: var(--background-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}


/* -- ESTILOS REFINADOS PARA EL MENÚ DE CUENTA -- */

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.account-container {
    position: relative;
}

.account-button {
    background: none;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.2s ease;
}
.account-button:hover {
    border-color: var(--primary-blue);
}
.account-button svg {
    width: 22px;
    height: 22px;
    fill: var(--text-muted);
}

/* -- ESTILO REFINADO PARA EL BOTÓN DE LOGIN EN EL HEADER -- */

.login-header-btn {
    display: flex; /* Activa Flexbox para alinear el icono y el texto */
    align-items: center;
    gap: 0.5rem; /* Espacio entre el icono y el texto */
    
    background-color: var(--primary-blue);
    color: white;
    padding: 0.6rem 1.2rem;
    border: none; /* Quitamos el borde si existía */
    border-radius: 8px; /* Bordes más redondeados */
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem; /* Un tamaño de fuente ligeramente más ajustado */
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.login-header-btn:hover {
    background-color: var(--primary-blue-light);
    transform: translateY(-2px); /* Efecto de "levantarse" sutil */
}

/* Estilos para el icono SVG dentro del botón */
.login-header-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor; /* El icono hereda el color del texto (blanco) */
}

/* Estilos del Dropdown de Cuenta */
.account-dropdown {
    position: absolute;
    top: calc(100% + 15px); /* Más espacio */
    right: 0;
    width: 250px;
    background-color: var(--background-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 2000;
    
    opacity: 1; visibility: visible;
    transform: translateY(0);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    overflow: hidden; /* Para que los bordes redondeados se apliquen bien */
}
.account-dropdown.hidden {
    opacity: 0; visibility: hidden; transform: translateY(10px);
}

.account-dropdown-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-dark);
    background-color: var(--background-light); /* Un fondo ligeramente diferente para el header */
}

/* Contenedor de los enlaces */
.account-dropdown-menu {
    padding: 0.5rem;
}

/* Estilo de cada enlace del menú */
.account-dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 1rem; /* Espacio entre el icono y el texto */
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 6px;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.account-dropdown-menu a:hover {
    background-color: var(--background-light);
    color: var(--primary-blue);
}

.account-dropdown-menu svg {
    width: 20px;
    height: 20px;
    fill: currentColor; /* El icono hereda el color del texto del enlace */
    transition: fill 0.2s ease;
}

/* Separador */
.dropdown-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 0.5rem 0;
}

/* Estilo especial para el enlace de "Cerrar Sesión" */
.logout-link:hover {
    background-color: rgba(255, 107, 107, 0.1); /* Fondo rojo sutil */
    color: #FF6B6B; /* Color de texto rojo */
}


/* -- ESTILOS FINALES PARA EL MODAL DE LICENCIA (CON SCROLL Y FORMATO) -- */

/* Estilos para el botón "Review License" (sin cambios) */
.review-license-btn {
    background-color: var(--surface-secondary);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    white-space: nowrap;
    transition: all 0.2s ease;
}
.review-license-btn:hover {
    background-color: var(--border-color);
    color: var(--text-dark);
}

/* Estilos para el cuerpo del modal de texto (¡LA CLAVE!) */
.license-text-body {
    /* Reseteamos el display para un flujo de texto normal */
    display: block; 
    
    /* ¡LA CLAVE DEL SCROLL! */
    overflow-y: auto;  /* Muestra el scroll vertical SOLO si es necesario */
    max-height: 60vh;  /* Altura máxima antes de que aparezca el scroll */
    padding-right: 1rem; /* Espacio para la barra de scroll */

    /* Estilos de texto */
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--text-muted);
}

/* Jerarquía de Títulos dentro del contrato */
.license-text-body h3 {
    text-align: center;
    text-transform: uppercase;
    color: var(--text-muted);
    font-size: 0.9rem;
    letter-spacing: 1px;
    margin-bottom: 2rem;
}
.license-text-body h2 {
    font-size: 1.1rem;
    color: var(--text-dark);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
}
.license-text-body h4 {
    font-size: 1rem;
    color: var(--text-dark);
    margin-top: 1.5rem;
}

/* Párrafos y Listas dentro del contrato */
.license-text-body p {
    margin-bottom: 1rem;
}
.license-text-body strong {
    color: var(--text-dark);
}
.license-text-body ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 1rem;
}
.license-text-body li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
}
.license-text-body li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-blue);
}

/* EN style.css, al final */
.alert {
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    font-weight: bold;
    text-align: center;
    
    /* Estado inicial (oculto) */
    opacity: 0;
    transform: translateY(-20px);
    visibility: hidden;
    transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s;
}

/* Estado visible (cuando tiene esta clase) */
.alert.visible {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

.alert.success {
    background-color: rgba(4, 217, 128, 0.1);
    color: #04D980;
    border: 1px solid rgba(4, 217, 128, 0.3);
}

/* -- ESTILOS REFINADOS PARA LA PÁGINA DE AUTENTICACIÓN (DISEÑO PROFESIONAL) -- */

/* Fondo oscuro y centrado vertical */
.auth-body {
    background-color: var(--background-light); /* O tu variable de fondo oscuro */
}

/* El nuevo contenedor <main> es el que se encarga de centrar */
.auth-main {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 160px); /* 100% de la altura menos un aprox. del header y footer */
    padding: 2rem 0;
}

.auth-container {
    max-width: 600px; /* Ancho por defecto para el login */
    width: 100%;
    padding: 2rem;
    margin: auto;
}

.auth-card {
    background-color: var(--background-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 3rem;
    box-shadow: 0 0 50px rgba(35, 123, 255, 0.1);
    transition: height 0.3s ease; 
}
.auth-card h1 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 3rem;
}

/* Lógica de transición para ocultar/mostrar */
#login-view, #register-view {
    transition: opacity 0.3s ease, visibility 0.3s;
}
.hidden {
    display: none; /* Usamos display:none para el cambio de formulario */
}

/* Estilo para los campos de formulario */
.form-group {
    position: relative;
    margin-bottom: 2rem;
}
.form-group input {
    width: 100%; padding: 10px 0; font-size: 1rem; color: var(--text-dark);
    background-color: transparent; border: none; border-bottom: 1px solid var(--border-color);
    outline: none;
    box-sizing: border-box;
}
.form-group label {
    position: absolute; top: 10px; left: 0; color: var(--text-muted);
    pointer-events: none; transition: all 0.2s ease;
}
.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label {
    top: -15px; font-size: 0.8rem; color: var(--primary-blue);
}
.form-group input:focus {
    border-bottom-color: var(--primary-blue);
}

/* Rejilla para los campos secundarios del registro */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Dos columnas */
    gap: 1.5rem 2rem;
}

/* Enlace para cambiar entre vistas */
.auth-switch {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}
.auth-switch a {
    color: var(--primary-blue);
    font-weight: bold;
    text-decoration: none;
}

/* -- ESTILOS PARA ACCIONES DE FORMULARIO -- */
.form-actions {
    display: flex;
    justify-content: flex-end; /* Alinea los botones a la derecha */
    gap: 1rem;
    margin-top: 2rem;
}

.cancel-btn {
    padding: 0.8rem 1.5rem;
    background-color: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.2s ease;
}
.cancel-btn:hover {
    border-color: var(--text-dark);
    color: var(--text-dark);
}

.forgot-password { font-size: 0.8rem; margin-top: 1rem; }

/* -- ESTILOS PARA EL PRELOADER -- */
#preloader {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: var(--background-deep-space); /* Tu color de fondo oscuro */
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease, visibility 0.5s;
}
#preloader.hidden {
    opacity: 0;
    visibility: hidden;
}
.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--border-glow); /* Color de borde sutil */
    border-top-color: var(--accent-glow-blue); /* Tu color de acento */
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}


/* -- =================================================================== -- */
/* -- ========== ESTILOS RESPONSIVE PARA MÓVILES (768px o menos) ========== -- */
/* -- =================================================================== -- */

@media (max-width: 768px) {

    /* --- AJUSTES GENERALES --- */
    body {
        padding-bottom: 70px; /* Mantiene el espacio para el sticky player */
    }
    .page-container, .auth-main {
        padding: 1rem;
        min-height: calc(100vh - 140px);
    }
    
    /* --- HEADER Y NAVEGACIÓN --- */
    header nav ul {
        display: none; /* Oculta el menú de navegación principal */
    }
    nav {
        padding: 0 1rem;
    }

    /* --- SECCIÓN HERO (CORREGIDA) --- */
    #hero {
        height: 10vh; /* Hacemos el hero más corto para que no cubra la búsqueda */
        padding: 4rem 1rem; /* Reducimos el padding vertical */
    }
    #hero .brand_img {
        width: 60%; /* Hacemos el logo un poco más pequeño en proporción */
        max-width: 250px;
    }
    
    /* --- SECCIÓN DE TRACKS --- */
    #tracks {
        margin-top: -5rem; /* Ajustamos el margen negativo para que la búsqueda quede visible */
        padding: 1.5rem;
    }
    .search-bar {
        width: 100%;
        position: relative;
        flex-direction: column;
    }
    .search-bar input, .search-bar button {
        width: auto;
        border-radius: 8px;
        z-index: 10; /* Bordes redondeados para ambos */
    }
    .search-bar button {
        margin-top: 0.5rem;
    }

    /* --- FEATURED TRACK (CORREGIDO) --- */
    .featured-track {
        grid-template-columns: 100px 1fr; /* Hacemos la portada un poco más pequeña */
        gap: 15px;
    }
    .featured-track .track-info {
        min-width: 0; /* ¡LA CLAVE! Permite que el contenedor se encoja */
    }
    .featured-track .track-info p {
        font-size: 11px;
    }
    .featured-track .track-info h2 {
        font-size: 15px;
        word-break: break-word; /* Fuerza el texto a romperse para que no se desborde */
    }
    .featured-track .track-cover {
        width: 100%;
        height: auto;
        margin-right: 1.5rem;
        border-radius: 10px;
        object-fit: cover;
    }

    /* --- TRACK LIST (REDISEÑADO) --- */
    .track-list-header {
        display: none;
    }
    .track-item {
        display: flex; /* Cambiamos a Flexbox para un layout más simple */
        align-items: center;
        gap: 1rem;
        grid-template-columns: none; /* Reseteamos la cuadrícula de escritorio */
        padding: 1rem 5px;
        height: 80px;
    }
    .track-item-details {
        flex-grow: 1; /* Ocupa el espacio del medio */
        min-width: 0; /* Permite que el texto se encoja y se ajuste */
    }
    .track-title {
        font-weight: bold;
        display: block;
        font-size: 13px;
    }
    .track-license {
        font-size: 0.8rem;
        color: var(--text-muted);
        font-size: 10px;
    }
    .track-item .track-bpm,
    .track-item .track-tags {
        display: none; /* Ocultamos BPM y Tags para un look más limpio */
    }
    .track-item-actions {
        margin-left: auto; /* Empuja las acciones a la derecha */
    }

    /* --- OTRAS SECCIONES (LICENSING, SERVICES, ETC.) --- */
    .licensing-grid, .services-grid {
        grid-template-columns: 1fr;
    }
    .license-card.popular {
        transform: scale(1);
    }
    .footer-top {
        flex-direction: column; text-align: center;
    }
    .footer-nav ul {
        flex-direction: column; gap: 1rem;
    }
    .checkout-layout {
        grid-template-columns: 1fr;
    }
}