/* The Byte Portal — cosmic dimension gate */
:root {
  --bp-cyan: #00e5c8;
  --bp-blue: #3ba5f7;
  --bp-purple: #9d4edd;
  --bp-magenta: #ff4dd2;
  --bp-deep: #02030c;
}

.bp-page {
  background: var(--bp-deep);
  color: #fff;
  overflow: hidden;
}

body.bp-active {
  background: var(--bp-deep);
  overflow: hidden;
}

body.bp-active .header-top-news,
body.bp-active .rainbow-header,
body.bp-active .header-default,
body.bp-active .my_switcher,
body.bp-active .rainbow-footer,
body.bp-active .copyright-area,
body.bp-active .rbt-progress-parent,
body.bp-active .popup-mobile-menu {
  display: none !important;
}

body.bp-active .page-wrapper {
  background: var(--bp-deep);
  padding: 0;
  margin: 0;
}

.bp-page {
  position: relative;
  height: 100vh;
  min-height: 680px;
  background:
    radial-gradient(ellipse 120% 80% at 50% 40%, rgba(157, 78, 221, 0.18), transparent 55%),
    radial-gradient(ellipse 90% 60% at 20% 70%, rgba(0, 229, 200, 0.12), transparent 50%),
    radial-gradient(ellipse 80% 50% at 80% 20%, rgba(255, 77, 210, 0.1), transparent 50%),
    var(--bp-deep);
  overflow: hidden;
  user-select: none;
}

.bp-stage {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
}

#bp-canvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: crosshair;
}

.bp-aurora {
  position: absolute;
  inset: -20%;
  pointer-events: none;
  background:
    conic-gradient(from 120deg at 50% 50%, rgba(0, 229, 200, 0.08), transparent 25%, rgba(255, 77, 210, 0.1), transparent 55%, rgba(61, 165, 247, 0.08), transparent 80%);
  filter: blur(48px);
  mix-blend-mode: screen;
  opacity: 0.85;
  animation: bp-aurora-spin 28s linear infinite;
}

@keyframes bp-aurora-spin {
  to { transform: rotate(360deg); }
}

.bp-flares {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.bp-flare {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  mix-blend-mode: screen;
  opacity: 0.55;
  animation: bp-flare-drift 12s ease-in-out infinite alternate;
}

.bp-flare--1 {
  width: 280px;
  height: 280px;
  left: 12%;
  top: 22%;
  background: radial-gradient(circle, rgba(0, 229, 200, 0.45), transparent 70%);
}

.bp-flare--2 {
  width: 360px;
  height: 360px;
  right: 8%;
  top: 38%;
  background: radial-gradient(circle, rgba(255, 77, 210, 0.4), transparent 70%);
  animation-delay: -4s;
  animation-duration: 16s;
}

.bp-flare--3 {
  width: 220px;
  height: 220px;
  left: 42%;
  bottom: 18%;
  background: radial-gradient(circle, rgba(61, 165, 247, 0.38), transparent 70%);
  animation-delay: -7s;
  animation-duration: 14s;
}

@keyframes bp-flare-drift {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(24px, -18px) scale(1.12); }
}

.bp-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(75% 65% at 50% 45%, transparent 40%, rgba(0, 0, 0, 0.78) 100%);
}

.bp-scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.04;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(255, 255, 255, 0.5) 2px,
    rgba(255, 255, 255, 0.5) 3px
  );
}

.bp-topbar {
  position: fixed;
  top: 18px;
  left: 18px;
  right: 18px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(157, 78, 221, 0.22);
  border-radius: 18px;
  background: rgba(4, 6, 18, 0.62);
  backdrop-filter: blur(14px);
  box-shadow: 0 0 40px rgba(157, 78, 221, 0.12);
}

.bp-back {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 14px;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  background: rgba(157, 78, 221, 0.1);
  border: 1px solid rgba(157, 78, 221, 0.18);
}

.bp-back:hover {
  background: rgba(157, 78, 221, 0.18);
}

.bp-brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.bp-brand strong {
  letter-spacing: 0.14em;
  font-size: 13px;
  background: linear-gradient(90deg, var(--bp-cyan), var(--bp-magenta));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.bp-brand span {
  letter-spacing: 0.16em;
  font-size: 11px;
  color: rgba(167, 215, 255, 0.75);
}

.bp-counter {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--bp-cyan);
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(0, 229, 200, 0.06);
  border: 1px solid rgba(0, 229, 200, 0.14);
  text-shadow: 0 0 12px rgba(0, 229, 200, 0.4);
}

.bp-help {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 20;
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid rgba(61, 165, 247, 0.16);
  border-radius: 18px;
  background: rgba(4, 6, 18, 0.58);
  backdrop-filter: blur(12px);
  max-width: 340px;
}

.bp-help .row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
}

.bp-help kbd {
  padding: 4px 8px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.4);
  font-size: 11px;
}

.bp-help.is-dim {
  opacity: 0.7;
}

.bp-intro {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 20px;
  background:
    radial-gradient(ellipse 70% 50% at 50% 45%, rgba(157, 78, 221, 0.2), transparent 65%),
    radial-gradient(ellipse 50% 40% at 50% 50%, rgba(0, 229, 200, 0.12), transparent 60%),
    rgba(2, 3, 12, 0.72);
  backdrop-filter: blur(10px);
}

.bp-intro.is-hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 500ms ease;
}

.bp-intro-badge {
  display: inline-flex;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 77, 210, 0.25);
  background: rgba(157, 78, 221, 0.12);
  color: var(--bp-magenta);
  font-size: 11px;
  letter-spacing: 0.2em;
  margin-bottom: 18px;
}

.bp-intro h1 {
  margin: 0 0 14px;
  font-size: clamp(28px, 4.5vw, 48px);
  line-height: 1.05;
  background: linear-gradient(135deg, #fff 0%, var(--bp-cyan) 45%, var(--bp-magenta) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 30px rgba(0, 229, 200, 0.25));
  animation: bp-title-glow 4s ease-in-out infinite alternate;
}

@keyframes bp-title-glow {
  to { filter: drop-shadow(0 0 42px rgba(255, 77, 210, 0.45)); }
}

.bp-intro p {
  margin: 0 auto 18px;
  max-width: 680px;
  color: rgba(235, 245, 255, 0.82);
  font-size: 15px;
  line-height: 1.6;
}

.bp-enter {
  appearance: none;
  border: 0;
  cursor: pointer;
  padding: 14px 28px;
  border-radius: 16px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #02030c;
  background: linear-gradient(135deg, var(--bp-cyan), var(--bp-purple), var(--bp-magenta));
  box-shadow:
    0 0 40px rgba(0, 229, 200, 0.35),
    0 0 80px rgba(157, 78, 221, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bp-enter:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow:
    0 0 50px rgba(0, 229, 200, 0.5),
    0 0 100px rgba(255, 77, 210, 0.35);
}

.bp-intro-tip {
  margin-top: 12px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
}

.bp-city-gate {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 35;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 18px 22px;
  border-radius: 22px;
  border: 1px solid rgba(106, 13, 173, 0.45);
  background: rgba(4, 6, 18, 0.78);
  backdrop-filter: blur(16px);
  box-shadow:
    0 0 50px rgba(106, 13, 173, 0.35),
    0 0 80px rgba(0, 229, 200, 0.15);
  transition: opacity 400ms ease, transform 400ms ease;
}

.bp-city-gate.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(20px);
}

.bp-city-gate__hint {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.75);
}

.bp-city-btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 28px;
  border-radius: 16px;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.06em;
  color: #fff;
  background: linear-gradient(135deg, #6a0dad, #3ba5f7, #00e5c8);
  box-shadow: 0 0 40px rgba(106, 13, 173, 0.5);
  animation: bp-city-pulse 2s ease-in-out infinite;
}

.bp-city-btn:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 0 60px rgba(0, 229, 200, 0.45);
}

@keyframes bp-city-pulse {
  0%, 100% { box-shadow: 0 0 40px rgba(106, 13, 173, 0.45); }
  50% { box-shadow: 0 0 70px rgba(0, 229, 200, 0.55); }
}

.bp-cinematic {
  position: fixed;
  top: 22%;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  z-index: 28;
  padding: 14px 24px;
  border-radius: 14px;
  font-size: clamp(14px, 2.5vw, 20px);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(0, 229, 200, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 400ms ease, transform 400ms ease;
}

.bp-cinematic.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.bp-audio {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  border: 1px solid rgba(255, 77, 210, 0.2);
  background: rgba(4, 6, 18, 0.6);
  color: #fff;
  backdrop-filter: blur(12px);
  cursor: pointer;
}

.bp-audio.is-on {
  box-shadow: 0 0 30px rgba(255, 77, 210, 0.25);
}

.bp-loading {
  position: fixed;
  inset: 0;
  z-index: 25;
  display: grid;
  place-items: center;
  gap: 14px;
  background: rgba(2, 3, 12, 0.5);
  backdrop-filter: blur(8px);
}

.bp-loading.is-hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 400ms ease;
}

.bp-loading .spinner {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--bp-magenta);
  border-right-color: var(--bp-cyan);
  animation: bpspin 0.85s linear infinite;
}

.bp-loading .label {
  letter-spacing: 0.2em;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.8);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

@keyframes bpspin {
  to { transform: rotate(360deg); }
}

@media (max-width: 900px) {
  .bp-help { display: none; }
  .bp-city-gate {
    left: 18px;
    right: 18px;
    transform: none;
    width: calc(100% - 36px);
  }
  .bp-city-gate.is-hidden {
    transform: translateY(20px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .bp-aurora { animation: none; }
  .bp-loading .spinner { animation: none; }
  .bp-enter:hover { transform: none; }
}
