/* --- VARIABLES DE DISEÑO --- */
:root {
    --dark-bg: #0d1117;
    --primary-color: #00e1ff;
    --secondary-color: #ff00c1;
    --glass-bg: rgba(33, 40, 54, 0.6);
    --text-primary: #c9d1d9;
    --text-secondary: #8b949e;
    --border-color: rgba(139, 148, 158, 0.3);
    --font-family: 'Poppins', sans-serif;
    --font-logo: 'Montserrat', sans-serif;
}
html, body { height: 100%; margin: 0; box-sizing: border-box; }
*, *:before, *:after { box-sizing: inherit; }
body {
    font-family: var(--font-family); color: var(--text-primary); min-height: 100%; background: linear-gradient(-45deg, #0d1117, #1f2937, #111827, #0d1b2a); background-size: 400% 400%; animation: gradient-bg 15s ease infinite; display: flex; flex-direction: column;
}
@keyframes gradient-bg { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }

/* --- ¡CÓDIGO AÑADIDO! BARRA DE NOTICIAS ANIMADA --- */
.ticker-bar {
    background-color: var(--dark-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 8px 0;
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    box-sizing: border-box;
}
.ticker-content {
    display: inline-block;
    padding-left: 100%;
    animation: ticker-scroll 40s linear infinite;
}
.ticker-content span {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
    display: inline-block;
}
.ticker-content .separator {
    margin: 0 25px;
    color: var(--primary-color);
}
@keyframes ticker-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-100%); }
}
/* --- FIN DEL CÓDIGO AÑADIDO --- */

main.content-wrapper { display: flex; justify-content: center; align-items: center; flex-grow: 1; width: 100%; padding: 40px 20px; }

/* --- HEADER --- */
.main-header {
    background: var(--glass-bg); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border-color); padding: 0 20px; width: 100%; z-index: 1000; position: sticky; top: 0;
}
.header-container { display: flex; justify-content: space-between; align-items: center; max-width: 1200px; margin: 0 auto; height: 60px; }
.logo a {
    font-family: var(--font-logo); font-weight: 700; font-size: 26px; text-decoration: none;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--primary-color));
    background-size: 200% auto;
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
    animation: text-shine 3s linear infinite;
}
@keyframes text-shine { to { background-position: 200% center; } }
.main-nav { display: flex; align-items: center; }
.main-nav a { margin-left: 15px; text-decoration: none; color: var(--text-primary); font-weight: 500; white-space: nowrap; }
.main-nav a.button-link { border: 1px solid var(--primary-color); padding: 8px 15px; border-radius: 5px; color: var(--primary-color); transition: all 0.3s ease; }
.main-nav a.button-link:hover { background-color: var(--primary-color); color: var(--dark-bg); text-decoration: none; box-shadow: 0 0 15px var(--primary-color); }
.user-info { color: var(--text-primary); margin-right: 15px; white-space: nowrap; }
.button-link-special { background-color: var(--primary-color); color: var(--dark-bg) !important; padding: 8px 15px; border-radius: 5px; text-decoration: none; font-weight: 500; transition: all 0.3s ease; }
.button-link-special:hover { box-shadow: 0 0 15px var(--primary-color); transform: translateY(-2px); }
.desktop-only { display: flex; align-items: center; }
.mobile-only { display: none; }
.container { background: var(--glass-bg); padding: 40px; border-radius: 16px; box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2); backdrop-filter: blur(10px); border: 1px solid var(--border-color); text-align: center; width: 100%; max-width: 800px; }
.container h2 { color: white; font-weight: 600; margin-top: 0; }
.container p { color: var(--text-secondary); }
input, select { width: 100%; padding: 15px; margin-bottom: 15px; border: 1px solid var(--border-color); border-radius: 5px; box-sizing: border-box; font-size: 16px; background: rgba(13, 17, 23, 0.8); color: var(--text-primary); font-family: var(--font-family); }
input::placeholder { color: var(--text-secondary); }
select optgroup > option { padding-left: 20px; }
button { background-color: var(--primary-color); color: var(--dark-bg); font-weight: 600; border: none; border-radius: 5px; width: 100%; font-size: 16px; padding: 15px; cursor: pointer; transition: all 0.3s ease; }
button:hover { background-color: var(--primary-color); box-shadow: 0 0 20px var(--primary-color); transform: translateY(-3px); }
.modal-backdrop { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.7); z-index: 2000; padding: 20px; box-sizing: border-box; }
.modal-backdrop.show { display: flex; justify-content: center; align-items: center; }
.modal { background: var(--glass-bg); border: 1px solid var(--border-color); padding: 30px; border-radius: 8px; box-shadow: 0 5px 15px rgba(0,0,0,0.3); width: 100%; max-width: 400px; position: relative; max-height: 90vh; overflow-y: auto; }
.modal-close { position: absolute; top: 10px; right: 15px; font-size: 24px; font-weight: bold; cursor: pointer; color: var(--text-secondary); }
.modal-close:hover { color: white; }
.service-description-box { display: none; background-color: rgba(13, 17, 23, 0.9); border: 1px solid var(--border-color); box-shadow: inset 0 1px 3px rgba(0,0,0,0.4); border-radius: 5px; padding: 15px; margin-bottom: 20px; text-align: left; font-size: 14px; color: var(--text-secondary); transition: all 0.3s ease; }
.service-description-box p { margin: 0; color: var(--text-secondary); }
.whatsapp-flotante { position: fixed; width: 60px; height: 60px; bottom: 30px; right: 30px; background-color: var(--primary-color); color: var(--dark-bg); border-radius: 50px; text-align: center; box-shadow: 0 0 15px rgba(0, 225, 255, 0.7), inset 0 0 8px rgba(0, 225, 255, 0.4); z-index: 100; display: flex; justify-content: center; align-items: center; transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); border: 1px solid rgba(0, 225, 255, 0.6); }
.whatsapp-flotante svg { fill: var(--dark-bg); width: 32px; height: 32px; }
.whatsapp-flotante:hover { transform: scale(1.1) translateY(-3px); box-shadow: 0 0 25px var(--primary-color), 0 0 50px var(--primary-color), inset 0 0 15px rgba(0, 225, 255, 0.6); }
.result-card { background: rgba(13, 17, 23, 0.8); border: 1px solid var(--border-color); border-radius: 8px; padding: 20px; margin-top: 20px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); text-align: left; }
.result-card h3 { margin-top: 0; font-size: 18px; border-bottom: 1px solid var(--border-color); padding-bottom: 10px; margin-bottom: 15px; color: white; }
.result-list { list-style-type: none; padding: 0; margin: 0; border: none; }
.result-list li { padding: 10px 0px; border-bottom: 1px solid var(--border-color); font-size: 13px; }
.result-list li:last-child { border-bottom: none; }
.result-list li strong { color: var(--text-secondary); margin-right: 10px; min-width: 90px; display: inline-block; }
.result-value { font-weight: 500; }
.result-value.text-green { color: #23d18b; }
.result-value.text-red { color: #f85149; }
.result-value.text-blue { color: #00a2ff; }
.history-cards-container { display: flex; flex-direction: column; gap: 20px; margin-top: 20px; text-align: left; }
.history-card { background: rgba(13, 17, 23, 0.8); border: 1px solid var(--border-color); border-radius: 8px; overflow: hidden; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.history-card:nth-child(even) { background-color: rgba(22, 27, 34, 0.8); }
.history-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.3); }
.card-section { padding: 15px 20px; border-bottom: 1px solid var(--border-color); }
.card-section:last-of-type { border-bottom: none; }
.card-label { font-weight: bold; margin-bottom: 8px; color: var(--primary-color); font-size: 11px; text-transform: uppercase; }
.card-section p { margin: 4px 0; font-size: 14px; color: var(--text-secondary); }
.card-section p strong { color: var(--text-primary); }
.card-section .result-list { margin-top: 5px; padding-left: 0; }
.card-action-footer { background-color: rgba(13, 17, 23, 0.5); padding: 10px 20px; text-align: right; border-top: 1px solid var(--border-color); }
.share-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background-color: transparent; border: 1px solid var(--border-color); color: var(--text-secondary); padding: 6px 12px; font-size: 12px; font-weight: 500; border-radius: 6px; cursor: pointer; transition: all 0.3s ease; width: auto; }
.share-button svg { width: 14px; height: 14px; fill: var(--text-secondary); transition: fill 0.3s ease; }
.share-button:hover { background-color: var(--primary-color); color: var(--dark-bg); border-color: var(--primary-color); box-shadow: 0 0 10px var(--primary-color); transform: translateY(-2px); }
.share-button:hover svg { fill: var(--dark-bg); }
.main-footer { width: 100%; padding: 20px; box-sizing: border-box; text-align: center; color: var(--text-secondary); font-size: 14px; background-color: var(--dark-bg); border-top: 1px solid var(--border-color); margin-top: auto; }
.main-footer p { margin: 5px 0; padding: 0; }
.main-footer a { color: var(--primary-color); font-weight: bold; text-decoration: none; transition: color 0.3s ease, text-shadow 0.3s ease; }
.main-footer a:hover { color: white; text-shadow: 0 0 10px var(--primary-color); }

/* --- RESPONSIVO --- */
@media screen and (max-width: 768px) {
    body { font-size: 14px; }
    main.content-wrapper { padding: 20px 10px; align-items: flex-start; }
    .main-header { position: static; }
    .header-container { flex-direction: column; height: auto; padding: 15px 0; }
    .logo { width: 100%; text-align: center; margin-bottom: 15px; }
    .logo a { font-size: 22px; }
    .desktop-only { display: none; }
    .mobile-only { display: flex; flex-direction: column; align-items: center; width: 100%; gap: 15px; }
    .user-display-mobile { padding-bottom: 15px; border-bottom: 1px solid var(--border-color); margin-bottom: 15px; width: 100%; text-align: center; }
    .user-info { font-size: 14px; margin: 0; }
    .nav-buttons-mobile { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
    .nav-buttons-mobile a { margin: 0; padding: 8px 12px; font-size: 13px; }
    .container { padding: 20px; }
    .container h2 { font-size: 22px; }
    input, select, button { font-size: 16px; }
    input, select { padding: 12px; }
    button { padding: 15px; }
    .history-cards-container { gap: 15px; }
    .card-section { padding: 12px 15px; }
    .card-label { font-size: 10px; }
    .card-section p { font-size: 13px; }
    .result-list li { font-size: 12px; }
    .whatsapp-flotante { width: 50px; height: 50px; bottom: 20px; right: 20px; }
    .whatsapp-flotante svg { width: 26px; height: 26px; }
}
/* === EFECTOS FUTURISTAS EXTRA === */

/* ---- Animación holográfica para contenedores ---- */
.container, .modal, .result-card, .history-card {
  position: relative;
  overflow: hidden;
}
.container::before, .modal::before, .result-card::before, .history-card::before {
  content: "";
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: linear-gradient(
    45deg,
    transparent 40%,
    rgba(0,225,255,0.1),
    transparent 60%
  );
  animation: holo-scan 6s linear infinite;
  pointer-events: none;
}
@keyframes holo-scan {
  0% { transform: translateY(-100%) rotate(25deg); }
  100% { transform: translateY(200%) rotate(25deg); }
}

/* ---- Botones neón con pulso ---- */
button {
  position: relative;
  overflow: hidden;
  z-index: 1;
}
button::after {
  content: "";
  position: absolute;
  top: 0; left: -100%;
  width: 200%; height: 100%;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255,255,255,0.3),
    transparent
  );
  transition: 0.5s;
}
button:hover::after {
  left: 100%;
}
button {
  animation: pulse-neon 3s infinite;
}
@keyframes pulse-neon {
  0%, 100% { box-shadow: 0 0 10px var(--primary-color); }
  50% { box-shadow: 0 0 25px var(--secondary-color), 0 0 40px var(--primary-color); }
}

/* ---- Inputs futuristas con glow ---- */
input:focus, select:focus {
  outline: none;
  border-color: var(--secondary-color);
  box-shadow: 0 0 15px var(--secondary-color);
  background: rgba(13,17,23,0.95);
}

/* ---- Fade-in suave en secciones ---- */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 1s forwards;
}
@keyframes fadeInUp {
  to { opacity: 1; transform: translateY(0); }
}

/* ---- Encabezado futurista con subrayado dinámico ---- */
.container h2 {
  position: relative;
  display: inline-block;
  font-size: 28px;
  letter-spacing: 1px;
}
.container h2::after {
  content: "";
  position: absolute;
  left: 0; bottom: -8px;
  width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  animation: underline-glow 3s linear infinite;
}
@keyframes underline-glow {
  0% { box-shadow: 0 0 5px var(--primary-color); }
  50% { box-shadow: 0 0 15px var(--secondary-color); }
  100% { box-shadow: 0 0 5px var(--primary-color); }
}

/* ---- WhatsApp flotante con pulso ---- */
.whatsapp-flotante {
  animation: pulse-whatsapp 2.5s infinite;
}
@keyframes pulse-whatsapp {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}
/* === BOTONES FUTURISTAS DE ACCIÓN === */
button,
.btn-action {
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  color: #fff;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  width: 100%;
  font-size: 16px;
  padding: 14px 18px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 15px rgba(0,225,255,0.5);
}

/* Efecto glow en hover */
button:hover,
.btn-action:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 0 20px var(--secondary-color), 0 0 40px var(--primary-color);
}

/* Reflejo animado que cruza */
button::after,
.btn-action::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 200%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255,255,255,0.4),
    transparent
  );
  transition: 0.5s;
}
button:hover::after,
.btn-action:hover::after {
  left: 100%;
}

/* Pulso sutil */
button {
  animation: pulse-btn 3s infinite;
}
@keyframes pulse-btn {
  0%, 100% { box-shadow: 0 0 10px var(--primary-color); }
  50% { box-shadow: 0 0 25px var(--secondary-color); }
}
/* ==== HEADER FUTURISTA ==== */
.main-header {
  background: rgba(13, 17, 23, 0.7);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,225,255,0.2);
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

/* Logo con brillo dinámico */
.logo a {
  font-size: 28px;
  font-weight: 700;
  text-decoration: none;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  background-size: 300% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: logo-glow 6s linear infinite;
}
@keyframes logo-glow {
  0% { background-position: 0% center; }
  50% { background-position: 100% center; }
  100% { background-position: 0% center; }
}

/* ==== BOTONES DE NAVEGACIÓN ==== */
.main-nav a {
  margin-left: 12px;
  text-decoration: none;
  font-weight: 500;
  color: var(--text-primary);
  padding: 8px 15px;
  border-radius: 6px;
  position: relative;
  overflow: hidden;
  transition: 0.3s;
}

/* Botones base */
.button-link {
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
}
.button-link:hover {
  background: var(--primary-color);
  color: #0d1117;
  box-shadow: 0 0 15px var(--primary-color), 0 0 30px var(--primary-color);
}

/* Botón especial (Añadir Saldo, Registro, Login) */
.button-link-special {
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  color: #fff !important;
  border: none;
  box-shadow: 0 0 10px var(--primary-color);
  transition: 0.4s ease;
}
.button-link-special:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 0 20px var(--secondary-color), 0 0 40px var(--primary-color);
}

/* ==== INFO DEL USUARIO ==== */
.user-info {
  background: rgba(0,225,255,0.08);
  border: 1px solid rgba(0,225,255,0.25);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 14px;
  color: var(--text-primary);
  transition: 0.3s;
}
.user-info strong {
  color: var(--primary-color);
}
.user-info:hover {
  background: rgba(0,225,255,0.15);
  box-shadow: 0 0 12px rgba(0,225,255,0.2);
}
.ticker-bar {
  position: sticky;   /* o fixed */
  top: 0;
  z-index: 3000;
}
/* Asegurar que la barra siempre se vea entera */
.ticker-bar {
  position: relative;       /* no fixed */
  z-index: 3000;            /* encima de otros elementos */
  height: 35px;             /* fuerza una altura uniforme */
  line-height: 35px;        /* centra verticalmente el texto */
  overflow: hidden;
}

/* Que los modales nunca la tapen */
.modal-backdrop {
  z-index: 4000;            /* encima del header y contenido */
}
.ticker-bar {
  position: relative;
  z-index: 3000;
  height: 40px;        /* alto fijo */
  line-height: 40px;   /* alinea verticalmente el texto */
  overflow: hidden;
}
.main-header {
  margin-top: 0;   /* evita que se monte encima */
  position: relative;
  z-index: 2500;
}
body {
  margin: 0;
  padding-top: 0;  /* sin padding innecesario */
}
/* ✅ Evitar salto blanco en móviles */
@media screen and (max-width: 768px) {
    body {
        padding-top: 35px; /* igual a la altura de la ticker-bar */
    }
}
