@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Inter:wght@500;700;800;900&display=swap');

:root {
  --gold: #ffd21f;
  --orange: #ff9416;
  --white: #f7f7ef;
  --muted: #d4dde0;
  --black: #050708;
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100vh;
  overflow: hidden;
  color: var(--white);
  background:
    radial-gradient(circle at center, #263238 0%, #0d1214 45%, #000 100%);
  font-family: Inter, Arial, sans-serif;
}

html,
body,
body *,
body *::before,
body *::after {
  cursor: url("assets/zbirmouse.png") 2 2, auto !important;
}

.background-video {
  position: fixed;
  inset: 0;
  z-index: -5;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transform: scale(1.035);
  filter: saturate(.9) contrast(1.08) brightness(.72);
  transition: opacity 900ms ease;
  animation: backgroundDrift 16s ease-in-out infinite alternate;
}

body.video-ready .background-video {
  opacity: 1;
}

.video-shade,
.video-vignette,
.pixel-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.video-shade {
  z-index: -4;
  background:
    linear-gradient(180deg, rgba(0,0,0,.45), rgba(0,0,0,.18) 38%, rgba(0,0,0,.5)),
    radial-gradient(circle at 50% 46%, rgba(255, 210, 31, .08), transparent 34rem),
    rgba(2, 7, 9, .28);
  backdrop-filter: blur(1px);
}

.video-vignette {
  z-index: -3;
  box-shadow: inset 0 0 180px 65px rgba(0,0,0,.88);
}

.pixel-grid {
  z-index: -2;
  opacity: .09;
  background-image:
    linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 5px 5px;
  mix-blend-mode: overlay;
}

.ending-screen {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(28px, 5vw, 72px);
  text-align: center;
}

.ending-card {
  width: min(1180px, 94vw);
  display: grid;
  justify-items: center;
  animation: entrance 1.15s cubic-bezier(.2,.8,.2,1) both;
}

.server-logo {
  width: clamp(110px, 14vw, 190px);
  aspect-ratio: 1;
  object-fit: contain;
  margin-bottom: clamp(10px, 2vh, 22px);
  filter:
    drop-shadow(0 18px 24px rgba(0,0,0,.72))
    drop-shadow(0 0 24px rgba(255,210,31,.12));
  animation: logoFloat 5s ease-in-out infinite;
}

.eyebrow {
  margin: 0 0 clamp(18px, 2.8vh, 30px);
  padding: 12px 15px 10px;
  color: #111;
  background: linear-gradient(180deg, var(--gold), var(--orange));
  border: 3px solid #111;
  box-shadow: 5px 5px 0 rgba(0,0,0,.95);
  font-family: "Press Start 2P", monospace;
  font-size: clamp(.48rem, .85vw, .72rem);
  line-height: 1.55;
  letter-spacing: .04em;
}

h1 {
  margin: 0;
  font-family: "Press Start 2P", monospace;
  font-size: clamp(2rem, 5.7vw, 5.7rem);
  line-height: 1.22;
  letter-spacing: -.055em;
  color: var(--white);
  text-wrap: balance;
  text-shadow:
    4px 4px 0 #000,
    8px 8px 0 rgba(0,0,0,.66);
}

h1 span {
  display: inline-block;
  margin-top: .2em;
  color: var(--gold);
  text-shadow:
    4px 4px 0 #000,
    8px 8px 0 rgba(255,148,22,.42),
    0 0 28px rgba(255,210,31,.14);
  animation: titleGlow 3.4s ease-in-out infinite;
}

.divider {
  width: min(620px, 72vw);
  display: grid;
  grid-template-columns: 1fr 16px 1fr;
  align-items: center;
  gap: 14px;
  margin: clamp(28px, 4.3vh, 46px) 0 clamp(18px, 2.8vh, 28px);
}

.divider span {
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(255,210,31,.92));
  box-shadow: 0 2px 0 #000;
}

.divider span:last-child {
  background: linear-gradient(90deg, rgba(255,210,31,.92), transparent);
}

.divider i {
  width: 12px;
  height: 12px;
  background: var(--gold);
  border: 2px solid #111;
  transform: rotate(45deg);
  box-shadow: 3px 3px 0 #000;
}

.thank-you {
  margin: 0;
  color: var(--muted);
  font-size: clamp(.95rem, 1.4vw, 1.28rem);
  line-height: 1.6;
  font-weight: 800;
  letter-spacing: .02em;
  text-shadow: 2px 2px 0 rgba(0,0,0,.75);
}

@keyframes entrance {
  from {
    opacity: 0;
    transform: translateY(24px) scale(.985);
    filter: blur(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

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

@keyframes titleGlow {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.13); }
}

@keyframes backgroundDrift {
  from { transform: scale(1.035) translate3d(-.3%, -.2%, 0); }
  to { transform: scale(1.07) translate3d(.3%, .25%, 0); }
}

@media (max-width: 700px) {
  .ending-screen {
    padding: 24px 18px;
  }

  .server-logo {
    width: clamp(92px, 28vw, 135px);
  }

  h1 {
    font-size: clamp(1.62rem, 8.7vw, 3.1rem);
    line-height: 1.3;
    letter-spacing: -.04em;
  }

  .eyebrow {
    font-size: .46rem;
  }

  .video-vignette {
    box-shadow: inset 0 0 95px 34px rgba(0,0,0,.88);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
