:root {
  --bg: #060608;
  --bg-soft: #0f1015;
  --panel: rgba(10, 11, 15, 0.42);
  --panel-strong: rgba(12, 13, 18, 0.7);
  --line: rgba(255, 255, 255, 0.08);
  --text: #f5f6f8;
  --muted: rgba(245, 246, 248, 0.64);
  --accent: #cf1e2e;
  --accent-soft: rgba(207, 30, 46, 0.28);
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  position: relative;
}

.hidden {
  display: none !important;
}

#app,
.screen {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

#app {
  background:
    radial-gradient(circle at 15% 20%, rgba(207, 30, 46, 0.18), transparent 28%),
    radial-gradient(circle at 82% 24%, rgba(255, 255, 255, 0.06), transparent 22%),
    linear-gradient(135deg, #060608 0%, #0a0b10 52%, #07080c 100%);
}

#particles,
#globalOverlay,
#scanlines,
#distortion {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

#particles {
  z-index: 3;
}

#globalOverlay {
  z-index: 4;
  background:
    radial-gradient(circle at center, transparent 42%, rgba(0, 0, 0, 0.18) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0));
}

#scanlines {
  z-index: 5;
  opacity: 0.18;
  background-image: linear-gradient(to bottom, transparent 0%, rgba(255,255,255,0.08) 50%, transparent 100%);
  background-size: 100% 4px;
  mix-blend-mode: overlay;
}

body.no-scanlines #scanlines {
  display: none;
}

#distortion {
  z-index: 12;
  opacity: 0;
  background:
    linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.03), transparent),
    repeating-linear-gradient(180deg, transparent 0, transparent 8px, rgba(255,255,255,0.035) 8px, rgba(255,255,255,0.035) 9px);
  transform: scale(1.04);
}

#distortion.active {
  animation: distortionFlash 1.1s ease forwards;
}

.screen {
  z-index: 2;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1.3s ease, visibility 1.3s ease;
}

.screen-visible {
  opacity: 1;
  visibility: visible;
}

.shell {
  width: min(1780px, calc(100vw - 96px));
  margin: 0 auto;
}

/* Intro */
#intro {
  z-index: 8;
}

.intro-background {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.intro-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(28px);
  opacity: 0.9;
  animation: drift 12s ease-in-out infinite alternate;
}

.orb-1 {
  width: 42vw;
  height: 42vw;
  max-width: 760px;
  max-height: 760px;
  left: -12vw;
  top: -12vh;
  background: radial-gradient(circle, rgba(207, 30, 46, 0.42) 0%, rgba(207, 30, 46, 0.08) 55%, transparent 74%);
}

.orb-2 {
  width: 30vw;
  height: 30vw;
  max-width: 520px;
  max-height: 520px;
  right: -6vw;
  bottom: -10vh;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.04) 48%, transparent 72%);
  animation-duration: 15s;
}

.intro-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.028) 1px, transparent 1px);
  background-size: 88px 88px;
  mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 0.94) 0%, transparent 86%);
  opacity: 0.55;
}

.intro-noise {
  position: absolute;
  inset: 0;
  opacity: 0.08;
  background-image: radial-gradient(circle, rgba(255,255,255,0.8) 0.7px, transparent 1px);
  background-size: 18px 18px;
}

.intro-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  text-align: center;
  padding: 48px;
}

.intro-logo {
  width: clamp(94px, 9vw, 172px);
  object-fit: contain;
  filter: drop-shadow(0 12px 32px rgba(0, 0, 0, 0.32));
  opacity: 0;
  transform: translateY(24px) scale(0.96);
  animation: revealUp 1.1s cubic-bezier(.2,.8,.2,1) 0.3s forwards;
}

.intro-divider {
  width: clamp(120px, 18vw, 260px);
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.9) 50%, transparent 100%);
  opacity: 0;
  transform: scaleX(0.7);
  animation: dividerReveal 1.15s ease 0.65s forwards;
}

#introTitle {
  margin: 0;
  font-size: clamp(2.2rem, 4.4vw, 5.6rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(22px);
  animation: revealUp 1.15s cubic-bezier(.2,.8,.2,1) 0.55s forwards;
}

#introSubtitle {
  margin: 0;
  color: var(--muted);
  letter-spacing: 0.42em;
  text-transform: uppercase;
  font-size: clamp(0.72rem, 1vw, 1rem);
  opacity: 0;
  transform: translateY(16px);
  animation: revealUp 1.15s cubic-bezier(.2,.8,.2,1) 0.9s forwards;
}

body.intro-finished #intro {
  opacity: 0;
  visibility: hidden;
}

/* Loading screen */
#loadingScreen {
  z-index: 6;
}

.background-slides,
.bg-slide,
.bg-vignette,
.bg-gradient {
  position: absolute;
  inset: 0;
}

.background-slides {
  z-index: 0;
  overflow: hidden;
}

.bg-slide {
  opacity: 0;
  transform: scale(1.055);
  transition: opacity 1.4s ease, transform 10s ease;
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
}

.bg-slide.active {
  opacity: 1;
  transform: scale(1.01);
}

.fallback-slide {
  background:
    radial-gradient(circle at 20% 20%, rgba(207, 30, 46, 0.22), transparent 30%),
    radial-gradient(circle at 82% 18%, rgba(255,255,255,0.1), transparent 20%),
    linear-gradient(120deg, #090a0d 0%, #101117 45%, #090a0d 100%);
}

.bg-vignette {
  z-index: 1;
  background: radial-gradient(circle at center, transparent 35%, rgba(0,0,0,0.44) 100%);
}

.bg-gradient {
  z-index: 2;
  background:
    linear-gradient(180deg, rgba(4,5,7,0.55) 0%, rgba(4,5,7,0.2) 24%, rgba(4,5,7,0.38) 100%),
    linear-gradient(90deg, rgba(6,7,10,0.82) 0%, rgba(6,7,10,0.2) 55%, rgba(6,7,10,0.72) 100%);
}

.topbar,
.content,
.bottombar {
  position: relative;
  z-index: 10;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding-top: 54px;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  filter: drop-shadow(0 10px 24px rgba(0,0,0,0.24));
}

.brand-texts h2,
.title-block h1,
.info-card h3,
#introTitle {
  text-wrap: balance;
}

.eyebrow,
.section-kicker,
.info-kicker,
.meta-label,
.tip-category {
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: 0.72rem;
}

.eyebrow,
.section-kicker,
.info-kicker,
.meta-label {
  color: rgba(255, 255, 255, 0.58);
}

.brand-texts h2,
.title-block h1 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 3.5rem);
  font-weight: 700;
  line-height: 1;
}

.brand-texts p,
.status-text,
.info-card p,
.meta-value {
  margin: 0;
  color: var(--muted);
}

.brand-texts p {
  margin-top: 8px;
  font-size: 0.95rem;
}

.server-meta {
  display: flex;
  gap: 18px;
}

.meta-item,
.music-box,
.server-card {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}

.meta-item {
  min-width: 180px;
  padding: 16px 18px;
  border-radius: 18px;
}

.content {
  min-height: calc(100vh - 230px);
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 430px);
  gap: 34px;
  align-items: end;
  padding-bottom: 38px;
}

.center-panel {
  align-self: end;
  padding-bottom: 18px;
}

.title-block {
  max-width: 840px;
  margin-bottom: 34px;
}

.title-block h1 {
  margin-top: 10px;
}

.status-text {
  margin-top: 18px;
  font-size: clamp(1rem, 1.25vw, 1.22rem);
}

.progress-wrapper {
  width: min(920px, 100%);
  padding: 28px 28px 24px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(11, 12, 17, 0.62), rgba(11, 12, 17, 0.38));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.progress-topline,
.progress-footline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.progress-topline {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.96rem;
}

.progress-track {
  position: relative;
  height: 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.progress-track.indeterminate::after {
  content: '';
  position: absolute;
  inset: -1px;
  width: 28%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(207,30,46,0) 0%, rgba(207,30,46,0.45) 50%, rgba(255,255,255,0.12) 100%);
  animation: indeterminate 1.8s ease-in-out infinite;
}

.progress-bar {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(171, 16, 32, 0.92) 0%, rgba(207, 30, 46, 1) 48%, rgba(255, 255, 255, 0.75) 100%);
  box-shadow: 0 0 34px rgba(207, 30, 46, 0.34);
  transition: width 0.35s ease;
}

.progress-glow {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  background: radial-gradient(circle, rgba(255,255,255,0.45) 0%, rgba(207,30,46,0.22) 36%, transparent 72%);
  transition: left 0.35s ease;
}

.progress-footline {
  margin-top: 16px;
  color: rgba(255, 255, 255, 0.56);
  font-size: 0.9rem;
}

.info-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-self: end;
}

.info-card {
  position: relative;
  padding: 26px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(11, 12, 17, 0.62), rgba(11, 12, 17, 0.32));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.info-card h3 {
  margin: 12px 0 12px;
  font-size: 1.42rem;
}

.info-card p {
  font-size: 1rem;
  line-height: 1.6;
}

.tip-category {
  display: inline-flex;
  margin-top: 18px;
  color: rgba(255,255,255,0.92);
  padding: 8px 11px;
  border-radius: 999px;
  background: rgba(207, 30, 46, 0.14);
  border: 1px solid rgba(207, 30, 46, 0.26);
}

.server-links {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.linkish {
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
}

.bottombar {
  position: absolute;
  left: 50%;
  bottom: 42px;
  transform: translateX(-50%);
  display: flex;
  justify-content: flex-end;
}

.music-box {
  min-width: 280px;
  max-width: 420px;
  padding: 14px 18px;
  border-radius: 18px;
}

.music-box .meta-value {
  display: block;
  margin-top: 6px;
  color: rgba(255,255,255,0.92);
}

@keyframes revealUp {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes dividerReveal {
  from {
    opacity: 0;
    transform: scaleX(0.72);
  }
  to {
    opacity: 1;
    transform: scaleX(1);
  }
}

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(2vw, 2vh, 0) scale(1.07);
  }
}

@keyframes distortionFlash {
  0% { opacity: 0; }
  15% { opacity: 0.72; transform: scale(1.018) skewY(0.7deg); }
  36% { opacity: 0.28; transform: scale(1.01) skewY(-0.45deg); }
  58% { opacity: 0.5; transform: scale(1.02) skewX(0.38deg); }
  100% { opacity: 0; transform: scale(1.04); }
}

@keyframes indeterminate {
  0% { transform: translateX(-130%); }
  100% { transform: translateX(430%); }
}

@media (max-width: 1320px) {
  .topbar {
    padding-top: 34px;
    align-items: flex-start;
    flex-direction: column;
  }

  .server-meta {
    width: 100%;
    flex-wrap: wrap;
  }

  .content {
    grid-template-columns: 1fr;
    align-items: end;
  }

  .info-panel {
    max-width: 760px;
  }
}

@media (max-width: 860px) {
  .shell {
    width: calc(100vw - 34px);
  }

  .brand-block {
    align-items: flex-start;
  }

  .brand-logo {
    width: 58px;
    height: 58px;
  }

  .server-meta {
    gap: 12px;
  }

  .meta-item {
    min-width: calc(50% - 6px);
  }

  .progress-wrapper,
  .info-card {
    padding: 20px;
  }

  .progress-topline,
  .progress-footline {
    flex-direction: column;
    align-items: flex-start;
  }

  .bottombar {
    bottom: 18px;
    width: calc(100vw - 34px);
  }

  .music-box {
    width: 100%;
    max-width: none;
  }
}
