/* Fondo a pantalla completa centrado con flex (ayudado por clases de Bootstrap) */
body {
  --fs-orange: #ff5a00;
  --fs-gold: #ffb300;
  --fs-red: #e52d00;
  --fs-panel: rgba(10, 11, 16, .92);
  background:
    radial-gradient(circle at 16% 18%, rgba(255, 90, 0, .20), transparent 30%),
    radial-gradient(circle at 84% 75%, rgba(255, 179, 0, .11), transparent 28%),
    linear-gradient(145deg, #050507, #0b0c12 56%, #160a06);
  background-attachment: fixed;
  margin: 0;
  color: #fff;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Contenedor con efecto de “parpadeo” */
.parpadeo {
  border-radius: 24px;
  background: linear-gradient(155deg, rgba(25, 26, 34, .96), rgba(6, 7, 11, .96));
  border: 1px solid rgba(255, 111, 0, .28);
  box-shadow: 0 28px 80px rgba(0,0,0,.62), 0 0 42px rgba(255,90,0,.10);
  backdrop-filter: blur(16px);
}

/* Ajustes del logo */
.logo {
  display: block;
  margin: 0 auto 20px;
  max-width: 100%;
  height: auto;
}

.fs-navbar {
  background: rgba(5, 6, 10, .94);
  border-bottom: 1px solid rgba(255, 104, 0, .24);
  box-shadow: 0 8px 28px rgba(0,0,0,.32);
  backdrop-filter: blur(14px);
}

.fs-brand { font-weight: 900; letter-spacing: .035em; }
.fs-brand small { color: #8e94a3; font-size: .58rem; margin-left: 5px; }
.fs-brand-mark {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 32px;
  margin-right: 8px;
  border-radius: 8px;
  color: white;
  font-weight: 1000;
  font-style: italic;
  background: linear-gradient(120deg, var(--fs-red), var(--fs-orange), var(--fs-gold));
  box-shadow: 0 0 22px rgba(255,90,0,.30);
}

.fs-navbar .nav-link {
  color: #c7cad3 !important;
  border-radius: 9px;
  padding: .55rem .8rem !important;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.fs-navbar .nav-link:hover { color: white !important; background: rgba(255,90,0,.13); transform: translateY(-1px); }

.fs-main {
  flex: 0 0 auto;
  flex-direction: column;
  width: 100%;
  height: calc(100vh - 58px);
  height: calc(100svh - 58px);
  min-height: auto !important;
  margin-top: 0 !important;
  padding: 8px 16px;
  justify-content: center !important;
  align-items: center !important;
}
.fs-query-card {
  position: relative;
  margin: 0 auto !important;
  width: min(780px, calc(100% - 32px)) !important;
  max-width: 780px !important;
  height: calc(100% - 4px);
  max-height: 540px;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.fs-query-card::before {
  content: "";
  position: absolute;
  width: 240px;
  height: 240px;
  right: -130px;
  top: -130px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,108,0,.24), transparent 68%);
  pointer-events: none;
}

.fs-query-visual {
  position: relative;
  flex: 0 0 168px;
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 18px 0;
  background: radial-gradient(circle at 50% 55%, rgba(255, 91, 0, .14), transparent 48%);
  border: 0;
}
.fs-query-brand {
  display: none;
}
.fs-query-content {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 38px 24px;
}
.fs-query-logo {
  display: block;
  width: 160px !important;
  height: 160px !important;
  max-width: 48% !important;
  margin: 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 13px 25px rgba(255,78,0,.28));
}
.fs-kicker { color: var(--fs-orange); font-size: .68rem; font-weight: 900; letter-spacing: .16em; margin-bottom: 4px; }
.fs-query-card h1 { font-weight: 900; }
.fs-subtitle { color: #9da2af; font-size: .86rem; }
.fs-query-card .form-label { color: #d9dce4; font-weight: 700; font-size: .88rem; }
.fs-query-content form { width: 100%; margin-left: auto; margin-right: auto; }
.fs-control {
  min-height: 44px;
  color: #fff !important;
  background-color: #11131a !important;
  border: 1px solid #2c2f39 !important;
  border-radius: 11px !important;
}
.fs-control:focus {
  border-color: var(--fs-orange) !important;
  box-shadow: 0 0 0 .22rem rgba(255,90,0,.14) !important;
}
.fs-search-btn {
  min-height: 48px;
  margin-top: 4px !important;
  border: 0 !important;
  border-radius: 12px !important;
  color: #fff !important;
  font-weight: 900 !important;
  letter-spacing: .015em;
  background: linear-gradient(100deg, var(--fs-red), var(--fs-orange) 56%, var(--fs-gold)) !important;
  box-shadow: 0 13px 30px rgba(255,73,0,.28);
  transition: transform .2s ease, box-shadow .2s ease;
}
.fs-search-btn:hover { transform: translateY(-2px); box-shadow: 0 17px 38px rgba(255,73,0,.40); }

.login-overlay { background: rgba(3,4,7,.88) !important; }
.login-box {
  background: linear-gradient(155deg, #1a1b23, #090a0f) !important;
  border: 1px solid rgba(255,103,0,.32);
  border-radius: 20px !important;
  box-shadow: 0 25px 70px rgba(0,0,0,.68), 0 0 36px rgba(255,90,0,.12) !important;
}
.login-box .btn-primary {
  min-height: 50px;
  border: 0;
  font-weight: 900;
  background: linear-gradient(100deg, var(--fs-red), var(--fs-orange), var(--fs-gold));
}

.fs-result-box {
  max-height: 145px;
  overflow: auto;
}

/* Resultado de la consulta en ventana modal amplia */
.fs-result-modal { z-index: 2000; }
.fs-result-modal .modal-dialog {
  width: min(1120px, 96vw);
  max-width: 1120px;
  height: min(90vh, 820px);
  margin: 5vh auto;
}
.fs-result-modal .modal-content {
  height: 100%;
  overflow: hidden;
  color: #f6f7fb;
  background: linear-gradient(155deg, #181922, #08090e);
  border: 1px solid rgba(255, 102, 0, .45);
  border-radius: 20px;
  box-shadow: 0 30px 90px rgba(0,0,0,.78), 0 0 42px rgba(255,90,0,.16);
}
.fs-result-modal .modal-header,
.fs-result-modal .modal-footer {
  flex: 0 0 auto;
  border-color: rgba(255,255,255,.10);
  padding: 16px 22px;
}
.fs-result-modal .modal-body {
  min-height: 0;
  overflow: auto;
  padding: 18px;
  background: #f4f5f7;
}
.fs-modal-kicker {
  color: var(--fs-orange);
  font-size: .66rem;
  font-weight: 900;
  letter-spacing: .15em;
}
.fs-modal-message {
  width: 100%;
  min-height: 100%;
  overflow-x: auto;
  color: #16181d;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(0,0,0,.12);
}
.fs-modal-message > * { max-width: 100%; }
.fs-result-frame {
  display: block;
  width: 100%;
  height: calc(90vh - 165px);
  min-height: 420px;
  border: 0;
  border-radius: 12px;
  background: #fff;
}
.fs-modal-close-btn {
  min-width: 180px;
  color: #fff !important;
  font-weight: 800;
  border: 0 !important;
  border-radius: 10px !important;
  background: linear-gradient(100deg, var(--fs-red), var(--fs-orange), var(--fs-gold)) !important;
}
.modal-backdrop.show { opacity: .82; }

@media (min-width: 769px) {
  .fs-query-card { padding: 0 !important; }
  .fs-query-card .mb-4 { margin-bottom: .75rem !important; }
  .fs-query-card .mb-3 { margin-bottom: .7rem !important; }
}

@media (max-width: 860px) {
  body { overflow-y: auto; }
  .fs-main { height: auto; min-height: calc(100svh - 57px) !important; padding: 14px 10px; }
  .fs-query-card { width: 100% !important; height: auto; max-height: none; min-height: auto; padding: 0 !important; overflow: hidden; flex-direction: column; }
  .fs-query-visual { flex: 0 0 150px; min-height: 150px; padding: 10px 16px 0; border: 0; }
  .fs-query-content { padding: 0 20px 24px; }
  .fs-query-logo { width: 140px !important; height: 140px !important; max-width: 54% !important; margin: 0 auto; }
  .fs-brand small { display: none; }
  .fs-result-modal .modal-dialog { width: 96vw; height: 94vh; margin: 3vh auto; }
  .fs-result-modal .modal-header,
  .fs-result-modal .modal-footer { padding: 13px 15px; }
  .fs-result-modal .modal-body { padding: 8px; }
  .fs-result-frame { height: calc(94vh - 150px); min-height: 360px; }
}

@media (max-height: 700px) and (min-width: 861px) {
  .fs-main { padding: 7px 16px; }
  .fs-query-visual { flex-basis: 140px; }
  .fs-query-logo { width: 132px !important; height: 132px !important; max-width: 42% !important; }
  .fs-query-card { height: calc(100% - 2px); max-height: 525px; min-height: 0; padding: 0 !important; }
  .fs-query-content { padding: 0 32px 18px; }
  .fs-subtitle { margin-bottom: .55rem !important; }
  .fs-query-card .mb-3 { margin-bottom: .5rem !important; }
  .fs-control { min-height: 40px; }
  .fs-search-btn { min-height: 44px; }
}
