@font-face {
  font-family: 'Roboto';
  src: url('/assets/fonts/Roboto-VariableFont_wdth,wght.ttf') format('truetype');
  font-weight: 100 900;
}

body {
  margin: 0;
  width: 100vw;
  height: 100vh;
  background: #000;
  overflow: hidden;
  font-family: 'Roboto', sans-serif, system-ui;
  display: grid;
  place-items: center;
  color: #fff;
}

/* настройка видеоподложки */
.bg-video {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
  opacity: 1;
  filter: invert(1) hue-rotate(180deg);
}

/* блок  */
.glass-panel {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow:
    inset 0 0 20px rgba(255, 255, 255, 0.05),
    0 15px 35px rgba(0, 0, 0, 0.5);
  border-radius: 30px;
}

/* кнопка входа */
#entry {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s;
  z-index: 10;
}

#entry.hidden {
  opacity: 0;
  pointer-events: none;
}

/* кнопка входа в покое */
.enter-btn {
  position: relative;
  width: 160px;
  height: 60px;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.3s;
  /* физически корректная анимация */

  /* темное тонированное стекло */
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);

  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 30px;

  box-shadow:
    0 30px 60px rgba(0, 0, 0, 0.5),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05);

  display: flex;
  justify-content: center;
  align-items: center;
  overflow: visible;

}

/* лгбт подсветка кнопки */
.enter-btn::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 32px;
  /* анимация и цвет (зациклены) */
  background: linear-gradient(45deg, #8A2BE2, #00BFFF, #8A2BE2);
  background-size: 200%;
  z-index: -1;
  opacity: 0;
  filter: blur(15px);
  transition: opacity 0.3s ease;
}

.enter-btn:hover {
  transform: scale(1.05);
  /* отскок */
  background: rgba(255, 255, 255, 0.2);
}

.enter-btn:hover::before {
  opacity: 1;
  /* скорость */
  animation: glowing 20s linear infinite;
}

@keyframes glowing {
  0% {
    background-position: 0 0;
  }

  50% {
    background-position: 200% 0;
  }

  100% {
    background-position: 0 0;
  }
}



.enter-btn span {
  color: #fff;
  font-weight: 600;
  letter-spacing: 1px;
  font-size: 16px;
}



/* кнопка отправки */
.submit {
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  width: 220px;
  height: 60px;
  /* тонировка */
  background: rgba(25, 25, 25, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 30px;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: visible;
  z-index: 10;
}

.submit span {
  /* шрифт */
  font-family: 'Roboto', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  letter-spacing: 1px;
}

/* прозрачность */
.overlay {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  background: transparent;
  backdrop-filter: none;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 50;
}

.overlay.show {
  display: grid;
  opacity: 1;
}

/* MODAL */
.modal {
  position: relative;
  width: 900px;
  height: 600px;
  --center-y: 50%;

  /* изоляция лейаута */
  contain: layout paint;

  /* тонировка 2 */
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);

  border: 1px solid rgba(255, 255, 255, 0.08);
  /* обводка */
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  /* стеклянные хайлайты */
  border-radius: 50px;

  box-shadow:
    0 40px 80px rgba(0, 0, 0, 0.6),
    /* тень */
    inset 0 0 0 1px rgba(255, 255, 255, 0.05);

  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
  transform-origin: center;
  overflow: hidden;
}

/* грейн */
.modal::before {
  content: "";
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.03;
  z-index: -1;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* содержимое модалки */
.modal>* {
  position: absolute;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.overlay.show .modal>* {
  opacity: 1;
  transition: opacity 0.6s 0.5s ease;
}


#closeModal {
  position: absolute;
  top: 60px;
  right: 80px;
  background: none;
  border: none;
  color: #fff;
  font-size: 42px;

  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 100;
}

#closeModal:hover {
  opacity: 1;
  transform: translateX(-5px) scale(1.1);
}


.tabs {
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: baseline;
  gap: 40px;
  position: absolute;
  z-index: 20;
}

.tabs span {
  cursor: pointer;
  transform: scale(1);
  transition: transform 0.4s ease, color 0.4s ease;
  position: relative;
  padding-bottom: 20px;
  font-size: 24px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.2);
}

.tabs span:hover {
  color: rgba(255, 255, 255, 0.5);
}

.tabs .active {
  font-size: 48px;
  font-weight: 700;
  transform: scale(1);
  color: #fff;
  text-shadow: 0 0 30px rgba(255, 255, 255, 0.2);
}

.underline {
  position: absolute;
  bottom: 10px;
  left: 0;
  height: 4px;
  width: 50px;
  background: #ff5722;
  border-radius: 2px;
  box-shadow: 0 0 20px #ff5722;
  transition: left 0.5s cubic-bezier(0.25, 0.8, 0.25, 1),
    width 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}


.field {
  width: 500px;
  height: 70px;
  position: relative;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  padding: 0 24px;
  transition:
    border-color 0.3s,
    background 0.3s,
    opacity 0.6s ease,
    transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform, opacity;
}

.field:hover {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(0, 0, 0, 0.8);
}

.field:focus-within {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(0, 0, 0, 0.5);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.02);
}

.field label {
  position: absolute;
  top: -28px;
  left: 6px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

.field input {
  width: 100%;
  height: 100%;
  background: none;
  border: none;
  color: #fff;
  font-size: 18px;
  outline: none;
  font-family: 'Roboto', sans-serif;
}

.clear,
.show-pass {
  background: none;
  border: none;
  cursor: pointer;
  color: #666;
  font-size: 18px;
  transition: color 0.2s;
}

.clear:hover,
.show-pass:hover {
  color: #fff;
}


.submit {
  bottom: 120px;
  left: 50%;
  transform: translateX(-50%);
  width: 220px;
  height: 60px;
  background: rgba(25, 25, 25, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: visible;
  z-index: 10;
}

.submit::before {
  content: '';
  position: absolute;
  inset: 0px;
  z-index: -1;
  border-radius: 30px;
  filter: blur(20px);
  opacity: 0;
  transition: opacity 0.3s ease, background 0.3s ease;
}

.submit:hover::before {
  opacity: 0.4;
  /* прозрачность градиента при наведении */
}


.submit.glow-mode-login::before {
  background: linear-gradient(15deg, #2dce89, #2dcecc);
}

.submit.glow-mode-register::before {
  background: linear-gradient(15deg, #5e72e4, #11cdef);
}

.submit.glow-mode-recovery::before {
  background: linear-gradient(15deg, #e9ecef, #adb5bd);
}



.recovery-title {
  position: absolute;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 48px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 0 30px rgba(255, 255, 255, 0.2);
  transition: opacity 0.4s ease;
  z-index: 20;
}


.modal {
  --center-y: 50%;
}

.field.login-field,
.field.pass-field {
  top: calc(var(--center-y) - 20px);
  left: 50%;
  transform: translateX(-50%);
}

.field.invite-field,
.field.recovery-field {
  top: calc(var(--center-y) - 30px);
  left: 50%;
  transform: translateX(-50%);
}






.forgot-pass {
  background: none;
  border: none;
  color: #888;
  cursor: pointer;
  font-size: 14px;
  z-index: 10;
  transition: color 0.3s, opacity 0.3s ease, transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  white-space: nowrap;
  font-weight: 500;
}

.forgot-pass:hover {
  color: #fff;
}


.social-login {
  position: absolute;
  bottom: 120px;

  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 16px;
}

.social-btn {
  width: 50px;
  height: 35px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
  display: grid;
  place-items: center;
}

.social-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.social-btn .icon {
  color: #fff;
  font-size: 16px;
}

.social-btn.google .icon {
  color: #DB4437;
}

.social-btn.twitter .icon {
  color: #1DA1F2;
}

.social-btn.discord .icon {
  color: #5865F2;
}


.theme-switch-container {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 50px;
  z-index: 100;
  display: grid;
  place-items: center;

}

.theme-switch {
  width: 60px;
  height: 32px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  cursor: pointer;
  position: relative;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.2);
}

.switch-bulb {
  width: 24px;
  height: 24px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
  top: 3px;
  left: 4px;
  transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1), background-color 0.3s;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}


#toast-container {
  position: fixed;
  top: 15%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.toast {
  width: auto;
  min-width: 300px;
  padding: 12px 24px;
  background: rgba(30, 30, 30, 0.9);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 100, 100, 0.3);
  border-radius: 50px;
  color: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  animation: fadeSlideDown 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 14px;
}

@keyframes fadeSlideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeSlideUp {
  to {
    opacity: 0;
    transform: translateY(-20px);
  }
}

/* инверсия (светлая тема) */
body.light-theme {
  color: #333;
}

body.light-theme .bg-video {
  filter: invert(0) hue-rotate(180deg);
}

body.light-theme .modal {
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: inset 0 0 30px rgba(255, 255, 255, 0.2), 0 20px 50px rgba(0, 0, 0, 0.1);
}

body.light-theme .field {
  background: rgba(255, 255, 255, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

body.light-theme .field input {
  color: #000;
}

body.light-theme .field label {
  color: #555;
}

body.light-theme .tabs span {
  color: #666;
}

body.light-theme .tabs .active {
  color: #000;
}

body.light-theme .switch-bulb {
  transform: translateX(28px);
  background: #ffcc00;
  box-shadow: 0 0 15px #ffcc00;
}


.field-group {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  height: 200px;
  display: block;

}


.field {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 50%;
  margin-top: -35px;
  width: 500px;
  height: 70px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  padding: 0 24px;
  transition:
    opacity 0.4s ease,
    transform 0.4s ease,
    border-color 0.3s,
    background 0.3s;
}


.field.login-field {
  top: 50%;
  margin-top: -107px;

}


.field.pass-field {
  top: 50%;
  margin-top: -3px;

}


.field.invite-field,
.field.recovery-field {
  top: 50%;
  margin-top: -35px;
}


.forgot-pass {
  position: absolute;
  bottom: 70px;
  left: 50%;
  transform: translateX(-50%);
  background: none;
  border: none;
  color: #888;
  cursor: pointer;
  font-size: 14px;
  z-index: 10;
  transition: color 0.3s, opacity 0.3s ease;
  white-space: nowrap;
  font-weight: 500;
}

.forgot-pass:hover {
  color: #fff;
}