/* === PROPHET ENTRY CLEAN FINAL TUNE === */

body.prophet-entry-clean {
  background:
    radial-gradient(circle at 50% 32%, rgba(0,102,255,.12), transparent 38%),
    radial-gradient(circle at 78% 18%, rgba(91,33,182,.08), transparent 36%),
    linear-gradient(180deg, #05070b 0%, #09101b 50%, #06080d 100%) !important;
  overflow: hidden !important;
}

body.prophet-entry-clean .brand-top,
body.prophet-entry-clean .brand-name,
body.prophet-entry-clean .brand-sub,
body.prophet-entry-clean .touch-text,
body.prophet-entry-clean .entry-note,
body.prophet-entry-clean .prophet-login-title,
body.prophet-entry-clean .prophet-login-subtitle,
body.prophet-entry-clean .prophet-login-hint,
body.prophet-entry-clean .prophet-clean-hint {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
}

body.prophet-entry-clean .prophet-splash {
  position: relative;
  z-index: 30;
}

body.prophet-entry-clean .splash-logo {
  text-shadow:
    0 0 18px rgba(39,217,255,.28),
    0 0 44px rgba(0,102,255,.18);
}

/* Экран логотипа */
body.prophet-entry-clean .prophet-logo-screen {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  pointer-events: none !important;
  z-index: 20 !important;
  opacity: 1;
}

body.prophet-entry-clean .prophet-logo-screen.hidden {
  display: none !important;
}

/* большие фоновые круги убраны */
body.prophet-entry-clean .prophet-logo-screen::before,
body.prophet-entry-clean .prophet-logo-screen::after {
  display: none !important;
  content: none !important;
}

body.prophet-entry-clean .prophet-logo-button {
  width: 100% !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  cursor: pointer !important;
  pointer-events: auto !important;
  box-shadow: none !important;
  outline: none !important;
}

body.prophet-entry-clean .prophet-logo-button img {
  display: block;
  width: min(48vw, 690px);
  max-height: 62vh;
  object-fit: contain;
  border-radius: 0;
  background: transparent !important;
  image-rendering: auto;
  filter:
    drop-shadow(0 0 16px rgba(0,102,255,.30))
    drop-shadow(0 0 42px rgba(91,33,182,.18))
    drop-shadow(0 0 82px rgba(39,217,255,.08));
  animation:
    prophetEntryFloat 5.8s ease-in-out infinite,
    prophetEntryGlow 3.8s ease-in-out infinite;
  transition:
    transform .42s ease,
    opacity .42s ease,
    width .42s ease,
    max-height .42s ease,
    filter .42s ease;
}

body.prophet-entry-clean .prophet-logo-button:hover img {
  transform: translateY(-6px) scale(1.014);
  filter:
    drop-shadow(0 0 22px rgba(0,102,255,.44))
    drop-shadow(0 0 58px rgba(91,33,182,.26))
    drop-shadow(0 0 106px rgba(39,217,255,.14));
}

/* после клика: верхний логотип меньше, чётко по центру */
body.prophet-entry-clean.prophet-auth-open .prophet-logo-screen {
  align-items: flex-start !important;
  justify-content: center !important;
  padding-top: 1.6vh !important;
}

body.prophet-entry-clean.prophet-auth-open .prophet-logo-button {
  width: 100% !important;
  justify-content: center !important;
}

body.prophet-entry-clean.prophet-auth-open .prophet-logo-button img {
  width: min(16vw, 230px);
  max-height: 16vh;
  opacity: .98;
  filter:
    drop-shadow(0 0 12px rgba(0,102,255,.28))
    drop-shadow(0 0 28px rgba(91,33,182,.14))
    drop-shadow(0 0 54px rgba(39,217,255,.08));
}

/* Форма выше и по центру */
body.prophet-entry-clean .prophet-login-panel {
  position: relative;
  z-index: 40;
  margin-top: 10vh;
  width: 100%;
  display: flex;
  justify-content: center;
}

body.prophet-entry-clean .prophet-login-panel.hidden {
  display: none !important;
}

body.prophet-entry-clean .prophet-login-panel:not(.hidden) {
  animation: prophetFormIn .42s ease both;
}

body.prophet-entry-clean .access-panel {
  width: min(560px, 92vw);
  margin: 0 auto;
}

body.prophet-entry-clean input {
  background: rgba(4,10,20,.84) !important;
  border: 1px solid rgba(39,217,255,.28) !important;
  color: #eaf4ff !important;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.02),
    0 0 20px rgba(0,102,255,.10) !important;
  backdrop-filter: blur(10px);
}

body.prophet-entry-clean input:focus {
  border-color: rgba(39,217,255,.60) !important;
  box-shadow:
    0 0 0 3px rgba(0,102,255,.14),
    0 0 32px rgba(39,217,255,.18) !important;
}

body.prophet-entry-clean button[type=submit] {
  background: linear-gradient(135deg, #0066ff, #5b21b6) !important;
  color: #f2f7ff !important;
  border: 1px solid rgba(39,217,255,.25) !important;
  box-shadow:
    0 0 22px rgba(0,102,255,.22),
    inset 0 1px 0 rgba(255,255,255,.10) !important;
}

@keyframes prophetEntryFloat {
  0%,100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-8px) scale(1.006); }
}

@keyframes prophetEntryGlow {
  0%,100% {
    filter:
      drop-shadow(0 0 16px rgba(0,102,255,.30))
      drop-shadow(0 0 42px rgba(91,33,182,.18))
      drop-shadow(0 0 82px rgba(39,217,255,.08));
  }
  50% {
    filter:
      drop-shadow(0 0 26px rgba(0,102,255,.46))
      drop-shadow(0 0 66px rgba(91,33,182,.28))
      drop-shadow(0 0 116px rgba(39,217,255,.16));
  }
}

@keyframes prophetFormIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 900px) {
  body.prophet-entry-clean .prophet-logo-button img {
    width: min(88vw, 520px);
    max-height: 56vh;
  }

  body.prophet-entry-clean.prophet-auth-open .prophet-logo-button img {
    width: min(58vw, 210px);
    max-height: 15vh;
  }

  body.prophet-entry-clean .prophet-login-panel {
    margin-top: 8vh;
  }

  body.prophet-entry-clean .access-panel {
    width: min(94vw, 560px);
  }
}

/* === PROPHET WAITING GLITCH ANIMATION START === */

/*
   Работает только ДО клика, пока body НЕ имеет .prophet-auth-open
   После клика анимация отключается.
*/

body.prophet-entry-clean:not(.prophet-auth-open) .prophet-logo-button {
  position: relative !important;
  overflow: visible !important;
}

/* Базовое "живое" дрожание сигнала */
body.prophet-entry-clean:not(.prophet-auth-open) .prophet-logo-button img {
  animation:
    prophetEntryFloat 5.8s ease-in-out infinite,
    prophetEntryGlow 3.8s ease-in-out infinite,
    prophetSignalJitter 4.6s steps(1, end) infinite !important;
  will-change: transform, filter, opacity;
}

/* Горизонтальная световая помеха */
body.prophet-entry-clean:not(.prophet-auth-open) .prophet-logo-button::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(52vw, 760px);
  height: min(42vh, 520px);
  pointer-events: none;
  z-index: 3;
  opacity: .0;
  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,0) 0%,
      rgba(120,190,255,.00) 18%,
      rgba(120,190,255,.12) 34%,
      rgba(255,255,255,.22) 48%,
      rgba(120,190,255,.10) 62%,
      rgba(255,255,255,0) 100%
    );
  mix-blend-mode: screen;
  filter: blur(1px);
  animation: prophetSignalSweep 3.2s linear infinite;
}

/* Тонкие scanline / video-noise полосы */
body.prophet-entry-clean:not(.prophet-auth-open) .prophet-logo-button::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(52vw, 760px);
  height: min(42vh, 520px);
  pointer-events: none;
  z-index: 4;
  opacity: .18;
  background:
    repeating-linear-gradient(
      180deg,
      rgba(255,255,255,.00) 0px,
      rgba(255,255,255,.00) 3px,
      rgba(90,180,255,.06) 4px,
      rgba(90,180,255,.00) 5px,
      rgba(255,255,255,.00) 8px
    );
  mix-blend-mode: screen;
  animation:
    prophetSignalNoise 0.22s steps(2, end) infinite,
    prophetSignalBandShift 5.2s steps(1, end) infinite;
}

/* После клика полностью убираем эффект ожидания */
body.prophet-entry-clean.prophet-auth-open .prophet-logo-button::before,
body.prophet-entry-clean.prophet-auth-open .prophet-logo-button::after {
  display: none !important;
  animation: none !important;
  opacity: 0 !important;
}

body.prophet-entry-clean.prophet-auth-open .prophet-logo-button img {
  animation: none !important;
}

/* Анимации */

@keyframes prophetSignalJitter {
  0%, 100% {
    transform: translate3d(0,0,0);
    opacity: 1;
  }
  6% {
    transform: translate3d(-1px, 0, 0);
  }
  7% {
    transform: translate3d(1px, 0, 0);
  }
  8% {
    transform: translate3d(0, 0, 0);
  }
  24% {
    transform: translate3d(0, 0, 0);
  }
  25% {
    transform: translate3d(-2px, 1px, 0) skewX(.5deg);
  }
  26% {
    transform: translate3d(2px, -1px, 0) skewX(-.5deg);
  }
  27% {
    transform: translate3d(0, 0, 0);
  }
  53% {
    transform: translate3d(0, 0, 0);
  }
  54% {
    transform: translate3d(1px, 0, 0);
    opacity: .98;
  }
  55% {
    transform: translate3d(-1px, 0, 0);
    opacity: 1;
  }
  56% {
    transform: translate3d(0, 0, 0);
  }
  78% {
    transform: translate3d(0, 0, 0);
  }
  79% {
    transform: translate3d(0, -1px, 0) scaleY(1.002);
  }
  80% {
    transform: translate3d(0, 1px, 0) scaleY(.998);
  }
  81% {
    transform: translate3d(0, 0, 0);
  }
}

@keyframes prophetSignalSweep {
  0% {
    opacity: 0;
    transform: translate(-50%, -64%);
  }
  8% {
    opacity: .0;
  }
  14% {
    opacity: .14;
  }
  18% {
    opacity: .28;
  }
  24% {
    opacity: .08;
  }
  35% {
    opacity: 0;
    transform: translate(-50%, -10%);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, 62%);
  }
}

@keyframes prophetSignalNoise {
  0%, 100% {
    opacity: .10;
    transform: translate(-50%, -50%) translateX(0);
  }
  20% {
    opacity: .18;
    transform: translate(-50%, -50%) translateX(1px);
  }
  40% {
    opacity: .08;
    transform: translate(-50%, -50%) translateX(-1px);
  }
  60% {
    opacity: .16;
    transform: translate(-50%, -50%) translateX(2px);
  }
  80% {
    opacity: .09;
    transform: translate(-50%, -50%) translateX(-2px);
  }
}

@keyframes prophetSignalBandShift {
  0%, 100% {
    clip-path: inset(0 0 0 0);
  }
  12% {
    clip-path: inset(8% 0 55% 0);
  }
  13% {
    clip-path: inset(10% 0 50% 0);
  }
  14% {
    clip-path: inset(0 0 0 0);
  }
  47% {
    clip-path: inset(62% 0 12% 0);
  }
  48% {
    clip-path: inset(60% 0 16% 0);
  }
  49% {
    clip-path: inset(0 0 0 0);
  }
  76% {
    clip-path: inset(34% 0 34% 0);
  }
  77% {
    clip-path: inset(36% 0 30% 0);
  }
  78% {
    clip-path: inset(0 0 0 0);
  }
}

@media (max-width: 900px) {
  body.prophet-entry-clean:not(.prophet-auth-open) .prophet-logo-button::before,
  body.prophet-entry-clean:not(.prophet-auth-open) .prophet-logo-button::after {
    width: min(88vw, 520px);
    height: min(38vh, 380px);
  }
}

/* === PROPHET WAITING GLITCH ANIMATION END === */
