:root {
  --bg-deep: #060b14;
  --text: #f4efe6;
  --text-dim: #9bb0c4;
  --gold: #e8b84a;
  --gold-soft: #b8923a;
  --foam: #7ec8c8;
  --accent: #e11d2e;
  --accent-glow: rgba(225, 29, 46, 0.4);
  --gold-glow: rgba(232, 184, 74, 0.35);
  --line: rgba(232, 184, 74, 0.28);
  --font-display: "Cinzel", "Times New Roman", serif;
  --font-ui: "DM Sans", "Segoe UI", sans-serif;
  --alert-ttl: 7s;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: transparent;
  color: var(--text);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
}

.auth {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  text-align: center;
  padding: 28px;
  background:
    radial-gradient(ellipse 60% 40% at 50% 0%, rgba(232, 184, 74, 0.12), transparent 60%),
    rgba(6, 11, 20, 0.92);
}

.auth[hidden] {
  display: none !important;
}

.auth__mark {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold);
}

.auth__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.auth__hint {
  margin: 0;
  max-width: 320px;
  color: var(--text-dim);
  font-size: 0.92rem;
  line-height: 1.45;
}

.auth__btn {
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 12px 22px;
  background: linear-gradient(135deg, var(--accent), #9a1422);
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35), 0 0 20px var(--accent-glow);
}

.auth__demo {
  margin: 8px 0 0;
  font-size: 0.78rem;
  color: var(--text-dim);
}

.auth__demo a {
  color: var(--foam);
}

.status {
  position: absolute;
  left: 20px;
  bottom: 16px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  background: rgba(6, 11, 20, 0.88);
  color: var(--text-dim);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status[hidden] {
  display: none !important;
}

.status.is-error {
  border-color: rgba(225, 29, 46, 0.5);
  color: #fecaca;
}

.stage {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.alert {
  --tone: var(--gold);
  position: absolute;
  top: 40px;
  right: 40px;
  width: min(400px, calc(100vw - 48px));
  padding: 1.2rem 1.25rem 1.35rem;
  background:
    linear-gradient(135deg, rgba(18, 36, 58, 0.96), rgba(6, 11, 20, 0.95));
  border: 1px solid var(--line);
  border-left: 3px solid var(--tone);
  box-shadow:
    0 18px 50px rgba(0, 0, 0, 0.55),
    0 0 30px rgba(232, 184, 74, 0.16);
  overflow: hidden;
  opacity: 0;
  transform: translateX(36px) translateY(-8px) scale(0.98);
}

.alert[hidden] {
  display: none !important;
}

.alert.is-show {
  animation:
    alert-in 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards,
    alert-out 0.55s ease-in calc(var(--alert-ttl) - 0.55s) forwards;
}

.alert.is-follow {
  --tone: var(--foam);
}

.alert.is-sub {
  --tone: var(--gold);
}

.alert.is-gift {
  --tone: #f0c36a;
}

.alert.is-bits {
  --tone: #9b7bff;
  border-left-color: #9b7bff;
}

.alert.is-raid {
  --tone: var(--accent);
  border-left-color: var(--accent);
  box-shadow:
    0 18px 50px rgba(0, 0, 0, 0.55),
    0 0 34px var(--accent-glow);
}

.alert__corner {
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid var(--tone);
  pointer-events: none;
}

.alert__corner--tl {
  top: 6px;
  left: 6px;
  border-right: 0;
  border-bottom: 0;
}

.alert__corner--tr {
  top: 6px;
  right: 6px;
  border-left: 0;
  border-bottom: 0;
}

.alert__corner--bl {
  bottom: 6px;
  left: 6px;
  border-right: 0;
  border-top: 0;
}

.alert__corner--br {
  bottom: 6px;
  right: 6px;
  border-left: 0;
  border-top: 0;
}

.alert__stamp {
  position: absolute;
  top: 14px;
  right: 18px;
  padding: 4px 8px;
  border: 2px solid color-mix(in srgb, var(--tone) 80%, #fff);
  color: color-mix(in srgb, var(--tone) 85%, #fff);
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transform: rotate(8deg);
  opacity: 0.9;
  animation: stamp-in 0.45s cubic-bezier(0.16, 1, 0.3, 1) 0.25s both;
}

.alert__type {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--tone);
}

.alert__title {
  margin: 0.45rem 0 0;
  max-width: 85%;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text);
  line-height: 1.15;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
}

.alert__msg {
  margin: 0.4rem 0 0;
  max-width: 92%;
  font-size: 0.92rem;
  color: var(--text-dim);
  line-height: 1.35;
}

.alert__wave {
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: -2px;
  height: 28px;
  background:
    radial-gradient(ellipse 40% 100% at 20% 100%, rgba(126, 200, 200, 0.22), transparent 70%),
    radial-gradient(ellipse 50% 100% at 70% 100%, rgba(232, 184, 74, 0.16), transparent 70%);
  opacity: 0.9;
  pointer-events: none;
}

@keyframes alert-in {
  to {
    opacity: 1;
    transform: translateX(0) translateY(0) scale(1);
  }
}

@keyframes alert-out {
  to {
    opacity: 0;
    transform: translateX(24px) translateY(-10px) scale(0.98);
  }
}

@keyframes stamp-in {
  from {
    opacity: 0;
    transform: rotate(8deg) scale(1.6);
  }
  to {
    opacity: 0.9;
    transform: rotate(8deg) scale(1);
  }
}
