:root {
  --cyber-gold: #ffbf00;
  --cyber-gold-strong: #ff9f00;
  --cyber-bg: #04070d;
  --cyber-font-title: "Orbitron", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--cyber-font-title);
  background: var(--cyber-bg);
  background-image:
    radial-gradient(circle at 12% -18%, rgba(255, 191, 0, 0.16), transparent 62%),
    radial-gradient(circle at 95% 120%, rgba(255, 157, 0, 0.12), transparent 60%),
    repeating-linear-gradient(90deg, transparent 0, transparent 78px, rgba(255, 191, 0, 0.04) 79px, transparent 80px),
    linear-gradient(180deg, #04070d 0%, #020408 100%);
  color: #f3f4f6;
  min-height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
}

#loginScreen {
  position: relative;
  width: 100%;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: max(28px, env(safe-area-inset-top, 0px) + 16px) 16px max(28px, env(safe-area-inset-bottom, 0px) + 16px);
  overflow: visible;
  background: #05080f;
}

.logo-badge-wrapper {
  position: relative;
  z-index: 2;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 12px 20px;
  border: 1px solid rgba(255, 191, 0, 0.38);
  border-radius: 999px;
  background: rgba(10, 15, 24, 0.78);
  box-shadow:
    0 0 0 1px rgba(255, 191, 0, 0.08) inset,
    0 0 28px rgba(255, 191, 0, 0.22);
  animation: logoFloat 4.8s ease-in-out infinite;
}

.logo-image {
  width: 190px;
  max-width: 62vw;
  height: auto;
  filter: drop-shadow(0 0 8px rgba(255, 191, 0, 0.45));
}

@keyframes logoFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

.login-card {
  position: relative;
  z-index: 2;
  width: min(460px, 95vw);
  padding: 30px 28px 28px;
  color: #f6df9d;
  border: 1px solid rgba(255, 191, 0, 0.5);
  border-radius: 16px;
  background: linear-gradient(130deg, rgba(10, 16, 27, 0.94) 0%, rgba(16, 24, 40, 0.9) 100%);
  box-shadow:
    0 0 0 1px rgba(255, 191, 0, 0.11) inset,
    0 18px 48px rgba(0, 0, 0, 0.62),
    0 0 42px rgba(255, 191, 0, 0.14);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.login-card::before {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  top: 10px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(255, 191, 0, 0.78), transparent);
}

.lang-switcher {
  position: absolute;
  top: 12px;
  right: 16px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
}

.lang-btn,
.login-lang-btn {
  border: 0;
  background: transparent;
  color: rgba(255, 191, 0, 0.55);
  cursor: pointer;
  padding: 3px 6px;
  letter-spacing: 1px;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.lang-btn:hover,
.lang-btn.active,
.login-lang-btn:hover,
.login-lang-btn.active {
  color: #ffcf4d;
  text-shadow: 0 0 10px rgba(255, 191, 0, 0.55);
}

.lang-btn.active,
.login-lang-btn.active {
  border-bottom: 1px solid rgba(255, 191, 0, 0.75);
}

.lang-sep {
  color: rgba(255, 191, 0, 0.3);
  user-select: none;
}

.login-title,
.login-card-title {
  margin: 18px 0 6px;
  text-align: center;
  font-size: clamp(21px, 3vw, 28px);
  font-weight: 700;
  letter-spacing: 0.2em;
  color: #ffcf4d;
  text-transform: uppercase;
  text-shadow: 0 0 16px rgba(255, 191, 0, 0.45);
}

.login-card-subtitle {
  margin: 0 0 18px;
  text-align: center;
  color: rgba(255, 191, 0, 0.65);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.login-field {
  margin-bottom: 14px;
}

.login-field-label {
  display: block;
  margin-bottom: 7px;
  text-align: center;
  color: #ffd772;
  font-size: 11px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.input-group {
  position: relative;
  margin-bottom: 0;
}

.input-group input,
.login-field input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(255, 191, 0, 0.3);
  border-radius: 10px;
  background: rgba(7, 12, 20, 0.85);
  padding: 14px 46px 14px 14px;
  color: #f8e6b5;
  font-family: var(--cyber-font-title);
  font-size: 13px;
  letter-spacing: 0.04em;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.input-group input[readonly],
.login-field input[readonly] {
  opacity: 0.6;
}

.input-group input::placeholder,
.login-field input::placeholder {
  color: rgba(255, 191, 0, 0.34);
}

.input-group input:focus,
.login-field input:focus {
  outline: none;
  border-color: rgba(255, 191, 0, 0.8);
  background: rgba(10, 16, 26, 0.94);
  box-shadow:
    0 0 0 1px rgba(255, 191, 0, 0.3) inset,
    0 0 20px rgba(255, 191, 0, 0.18);
}

.input-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 191, 0, 0.62);
  line-height: 0;
  pointer-events: none;
}

.input-icon svg {
  width: 16px;
  height: 16px;
  display: block;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.login-otp-field {
  border: 1px solid rgba(255, 191, 0, 0.35);
  border-radius: 10px;
  background: rgba(7, 12, 20, 0.5);
  padding: 12px 12px 10px;
}

.login-otp-field .input-group {
  margin-bottom: 8px;
}

.login-otp-help {
  margin: 0 0 10px;
  text-align: center;
  color: rgba(255, 220, 130, 0.78);
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.login-otp-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.login-secondary-btn {
  border: 1px solid rgba(255, 191, 0, 0.38);
  background: rgba(255, 191, 0, 0.08);
  color: #ffd772;
  border-radius: 8px;
  padding: 7px 10px;
  font-family: var(--cyber-font-title);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.login-secondary-btn:hover {
  border-color: rgba(255, 191, 0, 0.7);
  background: rgba(255, 191, 0, 0.16);
  box-shadow: 0 0 12px rgba(255, 191, 0, 0.22);
}

.login-secondary-btn:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.cyber-login-btn,
.login-primary-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  margin-top: 2px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 191, 0, 0.65);
  border-radius: 12px;
  color: #1f1300;
  background: linear-gradient(135deg, #ffbf00 0%, #ffdb70 50%, #ffae00 100%);
  font-family: var(--cyber-font-title);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  box-shadow:
    0 0 0 1px rgba(255, 245, 194, 0.22) inset,
    0 10px 24px rgba(255, 191, 0, 0.24);
}

.cyber-login-btn:hover,
.login-primary-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow:
    0 0 0 1px rgba(255, 245, 194, 0.3) inset,
    0 0 28px rgba(255, 191, 0, 0.35);
}

.cyber-login-btn:active,
.login-primary-btn:active {
  transform: translateY(0);
}

.cyber-login-btn:disabled,
.login-primary-btn:disabled {
  cursor: not-allowed;
  opacity: 0.65;
  filter: saturate(0.75);
}

.login-status {
  min-height: 18px;
  margin-top: 14px;
  text-align: center;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #ffd466;
  animation: statusPulse 0.9s ease-in-out infinite alternate;
}

.login-status.is-error {
  color: #ff7b8f;
  text-shadow: 0 0 10px rgba(255, 59, 88, 0.4);
}

.login-status.is-success {
  color: #7ef4bf;
  text-shadow: 0 0 10px rgba(0, 255, 156, 0.38);
}

.notification-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.notification {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 320px;
  max-width: 460px;
  padding: 15px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 191, 0, 0.18);
  background:
    radial-gradient(circle at 10% 12%, rgba(255, 191, 0, 0.1), transparent 48%),
    linear-gradient(145deg, rgba(10, 18, 33, 0.97), rgba(6, 11, 22, 0.95));
  box-shadow:
    0 14px 32px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(255, 191, 0, 0.06) inset;
  opacity: 0;
  transform: translateX(400px);
  transition: opacity 0.26s ease, transform 0.26s ease;
  pointer-events: all;
  overflow: hidden;
}

.notification-show {
  opacity: 1;
  transform: translateX(0);
}

.notification-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-top: 1px;
  border-radius: 12px;
  border: 1px solid rgba(255, 191, 0, 0.14);
  background: rgba(255, 191, 0, 0.08);
  font-size: 16px;
  font-weight: bold;
  flex-shrink: 0;
}

.notification-content {
  display: grid;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.notification-title {
  color: #fff0bf;
  font-family: var(--cyber-font-title);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.notification-message {
  font-size: 13px;
  line-height: 1.5;
  color: #d7dfeb;
  white-space: pre-line;
}

.notification-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin-top: -2px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.56);
  color: #a5b4cc;
  font-size: 18px;
  cursor: pointer;
  border-radius: 10px;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  flex-shrink: 0;
}

.notification-close:hover {
  background: rgba(255, 191, 0, 0.12);
  border-color: rgba(255, 191, 0, 0.24);
  color: #fff0bf;
}

.notification-success {
  border-color: rgba(16, 185, 129, 0.28);
  box-shadow:
    0 14px 32px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(16, 185, 129, 0.12) inset;
}

.notification-success .notification-icon {
  color: #7ef4bf;
  border-color: rgba(16, 185, 129, 0.24);
  background: rgba(16, 185, 129, 0.12);
}

.notification-error {
  border-color: rgba(239, 68, 68, 0.3);
  box-shadow:
    0 14px 32px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(239, 68, 68, 0.12) inset;
}

.notification-error .notification-icon {
  color: #ff9b9b;
  border-color: rgba(239, 68, 68, 0.24);
  background: rgba(239, 68, 68, 0.12);
}

.notification-warning {
  border-color: rgba(245, 158, 11, 0.28);
  box-shadow:
    0 14px 32px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(245, 158, 11, 0.12) inset;
}

.notification-warning .notification-icon {
  color: #ffd480;
  border-color: rgba(245, 158, 11, 0.22);
  background: rgba(245, 158, 11, 0.11);
}

.notification-info {
  border-color: rgba(56, 189, 248, 0.24);
  box-shadow:
    0 14px 32px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(56, 189, 248, 0.1) inset;
}

.notification-info .notification-icon {
  color: #8fdcff;
  border-color: rgba(56, 189, 248, 0.22);
  background: rgba(56, 189, 248, 0.1);
}

@keyframes statusPulse {
  0% {
    opacity: 0.45;
  }
  100% {
    opacity: 1;
    text-shadow: 0 0 12px rgba(255, 191, 0, 0.6);
  }
}

.is-hidden {
  display: none !important;
}

@media (max-width: 720px) {
  .logo-image {
    width: 150px;
  }

  #loginScreen {
    justify-content: flex-start;
    gap: 18px;
  }

  .login-card {
    padding: 26px 18px 22px;
    border-radius: 12px;
  }

  .login-title,
  .login-card-title {
    margin-bottom: 6px;
    letter-spacing: 0.14em;
  }

  .cyber-login-btn,
  .login-primary-btn {
    letter-spacing: 0.1em;
    font-size: 12px;
  }
}

@media (max-width: 420px) {
  #loginScreen {
    padding-inline: 12px;
  }

  .login-card {
    width: 100%;
    padding: 24px 16px 20px;
  }
}

@media (max-width: 640px) {
  .notification-container {
    top: 10px;
    right: 10px;
    left: 10px;
    align-items: stretch;
  }

  .notification {
    min-width: unset;
    max-width: unset;
    transform: translateY(-100px);
  }

  .notification-show {
    transform: translateY(0);
  }
}
