*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --font-display: "Montserrat", system-ui, sans-serif;
  --font-body: "Source Sans 3", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  --color-text: #f7f9ff;
  --color-text-muted: rgba(214, 225, 240, 0.78);
  --color-text-dim: rgba(160, 174, 196, 0.85);
  --color-accent-green: #3dff7a;
  --color-accent-green-soft: rgba(61, 255, 122, 0.92);
  --color-accent-blue: #00d4ff;
  --color-glass-bg: #121212;
  --color-glass-border: rgba(255, 255, 255, 0.1);
  /* Neutral lift from panel — avoids blue cast vs #121212 */
  --color-card-inner: rgba(255, 255, 255, 0.04);
  --shadow-panel: 0 24px 56px rgba(0, 0, 0, 0.75);
  /* Soft bokeh bg — keep wash minimal */
  --red-wash: rgba(30, 45, 90, 0.06);
}

html,
body {
  height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  overflow: hidden;
  background-color: #06060c;
  background: #06060c;
  background: -webkit-linear-gradient(top, #12101c 0%, #0a0a12 48%, #030308 100%);
  background: linear-gradient(to bottom, #12101c 0%, #0a0a12 48%, #030308 100%);
}

a {
  color: var(--color-accent-green-soft);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.background {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: -2;
}

.background-spectrum {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.spectrum-band {
  position: absolute;
  left: 0;
  right: 0;
  height: 10%;
}

/* Uniform base behind the photo (night city, no banding through opacity) */
.spectrum-band--0 {
  top: 0;
  background: #0a0a12;
}
.spectrum-band--1 {
  top: 10%;
  background: #0a0a12;
}
.spectrum-band--2 {
  top: 20%;
  background: #0a0a12;
}
.spectrum-band--3 {
  top: 30%;
  background: #0a0a12;
}
.spectrum-band--4 {
  top: 40%;
  background: #0a0a12;
}
.spectrum-band--5 {
  top: 50%;
  background: #0a0a12;
}
.spectrum-band--6 {
  top: 60%;
  background: #0a0a12;
}
.spectrum-band--7 {
  top: 70%;
  background: #0a0a12;
}
.spectrum-band--8 {
  top: 80%;
  background: #0a0a12;
}
.spectrum-band--9 {
  top: 90%;
  background: #0a0a12;
}

@keyframes bgKenBurns {
  0% {
    -webkit-transform: scale(1.02) translate(0, 0);
    transform: scale(1.02) translate(0, 0);
  }
  100% {
    -webkit-transform: scale(1.06) translate(-0.5%, -0.35%);
    transform: scale(1.06) translate(-0.5%, -0.35%);
  }
}

.background-image {
  position: absolute;
  inset: -10px;
  z-index: 1;
  background-position: center;
  background-size: cover;
  opacity: 0.64;
  -webkit-animation: bgKenBurns 32s ease-in-out infinite alternate;
  animation: bgKenBurns 32s ease-in-out infinite alternate;
  will-change: transform;
}

.background-red-wash {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: var(--red-wash);
  pointer-events: none;
}

.background-tint-top {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 55%;
  z-index: 2;
  background: linear-gradient(
    180deg,
    rgba(50, 70, 130, 0.05) 0%,
    transparent 100%
  );
  pointer-events: none;
}

.background-dim {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: rgba(0, 0, 0, 0.24);
  pointer-events: none;
}

.background-svg-gradient {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4' preserveAspectRatio='none'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0%25' stop-color='%230a0a18' stop-opacity='0.12'/%3E%3Cstop offset='55%25' stop-color='%23000000' stop-opacity='0.18'/%3E%3Cstop offset='100%25' stop-color='%23000000' stop-opacity='0.26'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='4' height='4' fill='url(%23g)'/%3E%3C/svg%3E");
}

.site-made-by {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 999px;
  background: rgba(18, 18, 18, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  white-space: nowrap;
}

.site-made-by__text {
  font-size: 11px;
  color: rgba(200, 210, 225, 0.5);
  letter-spacing: 0.03em;
}

.site-made-by__name {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  color: var(--color-accent-green);
  letter-spacing: 0.04em;
}

.site-links {
  position: fixed;
  right: 16px;
  bottom: 90px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.site-link-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 10px;
  border-radius: 12px;
  background: rgba(18, 18, 18, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: rgba(230, 236, 245, 0.85);
}

.site-link-icon {
  flex-shrink: 0;
  opacity: 0.7;
}

.site-link-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.site-link-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent-green);
}

.site-link-url {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  color: rgba(230, 236, 245, 0.85);
  letter-spacing: 0.02em;
}

.site-credits {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.site-credit-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 8px;
  border-radius: 12px;
  background: rgba(18, 18, 18, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.site-credit-avatar {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.site-credit-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.site-credit-role {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent-green);
}

.site-credit-role--founder {
  color: #ff6b6b;
}

.site-credit-role--manager {
  color: #4dc3ff;
}

.site-credit-name {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  color: rgba(230, 236, 245, 0.85);
  text-decoration: none;
}

.site-credit-name:hover {
  color: #fff;
  text-decoration: none;
}

.page {
  position: relative;
  min-height: 100vh;
  padding: clamp(20px, 4vw, 48px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.center-wrap {
  width: 100%;
  max-width: 1120px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.glass {
  background: var(--color-glass-bg);
  border-radius: 20px;
  border: 1px solid var(--color-glass-border);
  box-shadow: var(--shadow-panel);
  -webkit-backdrop-filter: blur(22px);
  backdrop-filter: blur(22px);
}

.loading-panel {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
  gap: clamp(20px, 3vw, 36px);
  padding: clamp(22px, 3vw, 36px) clamp(22px, 3vw, 40px);
  align-items: stretch;
}

.loading-panel__left {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  min-width: 0;
}

.brand-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.brand-logo {
  display: block;
  height: auto;
  width: clamp(200px, 38vw, 340px);
  max-width: 100%;
  object-fit: contain;
  flex-shrink: 0;
  margin-bottom: 0;
  filter: drop-shadow(0 0 20px rgba(61, 255, 122, 0.42));
}

.server-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  /* Pull pill up toward logo; cap overlap so huge viewports don’t bury the badge */
  margin-top: clamp(-42px, -5.5vw, -12px);
  position: relative;
  z-index: 2;
  padding: 8px 18px 8px 12px;
  border-radius: 999px;
  background: rgba(61, 255, 122, 0.16);
  border: 1px solid rgba(61, 255, 122, 0.45);
  font-family: var(--font-display);
  font-size: clamp(11px, 1.5vw, 13px);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-accent-green);
  max-width: 100%;
}

.server-badge__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-accent-green);
  box-shadow: 0 0 10px rgba(61, 255, 122, 0.75);
  flex-shrink: 0;
}

.server-badge__text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.badge-description-divider {
  align-self: center;
  width: min(100%, 46ch);
  height: 1px;
  margin-top: clamp(16px, 2.8vw, 26px);
  margin-bottom: clamp(18px, 2.5vw, 26px);
  flex-shrink: 0;
  border: none;
  /* Solid bar fallback, then gradient where supported (fades at ends) */
  background: rgba(61, 255, 122, 0.22);
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(61, 255, 122, 0.12) 12%,
    rgba(61, 255, 122, 0.52) 50%,
    rgba(61, 255, 122, 0.12) 88%,
    transparent 100%
  );
  box-shadow: 0 0 14px rgba(61, 255, 122, 0.2);
}

.server-description {
  width: min(100%, 58ch);
  max-width: 58ch;
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
  color: rgba(220, 228, 240, 0.88);
}

.progress-block {
  width: min(100%, 58ch);
  max-width: 58ch;
  margin-top: clamp(28px, 4vw, 44px);
  padding-top: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}

.progress-track {
  width: 100%;
  height: 5px;
  border-radius: 999px;
  background: rgba(18, 22, 32, 0.95);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.progress-track--main {
  height: 6px;
}

.progress-fill {
  height: 100%;
  width: 0;
  background: var(--color-accent-blue);
  box-shadow: 0 0 14px rgba(0, 212, 255, 0.55);
  -webkit-transition: width 0.25s ease-out;
  transition: width 0.25s ease-out;
}

.progress-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  text-align: center;
}

.download-detail {
  color: var(--color-text-muted);
  line-height: 1.45;
  max-width: 52ch;
  word-break: break-word;
}

.progress-label {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: rgba(240, 246, 255, 0.95);
}

/* Thin rule between copy and loading (same width as progress column) */
.progress-block::before {
  content: "";
  display: block;
  height: 1px;
  margin-bottom: 4px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 10px rgba(61, 255, 122, 0.08);
}

.loading-panel__right {
  min-width: 0;
  align-self: start;
  width: 100%;
}

.player-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 18px 18px 16px;
  border-radius: 16px;
  background: var(--color-card-inner);
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.player-card__header {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
}

.player-avatar {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.35);
}

.player-avatar--empty {
  background: rgba(255, 255, 255, 0.06);
}

.player-card__identity {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.player-display-name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-steamid {
  font-size: 12px;
  color: var(--color-text-dim);
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vip-badge {
  position: absolute;
  top: 0;
  right: 0;
  padding: 4px 10px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(61, 255, 122, 0.2);
  border: 1px solid rgba(61, 255, 122, 0.5);
  color: var(--color-accent-green);
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 18px;
}

.stat-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-dim);
}

.stat-value {
  font-size: 14px;
  font-weight: 600;
  color: rgba(248, 250, 255, 0.95);
}

.stat-value--money {
  color: var(--color-accent-green);
}

.player-card__map {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 6px;
  margin-top: 2px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.player-card__map-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-dim);
}

.player-card__map-value {
  font-size: 15px;
  font-weight: 600;
  color: rgba(248, 250, 255, 0.96);
  word-break: break-word;
  line-height: 1.35;
}

.player-card__footer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}

.footer-label {
  color: var(--color-text-dim);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.footer-value {
  font-weight: 600;
  color: rgba(236, 242, 255, 0.92);
  text-align: right;
}

@media (max-width: 900px) {
  body {
    overflow-y: auto;
  }

  .loading-panel {
    grid-template-columns: 1fr;
    padding: 22px 20px;
  }

  .loading-panel__right {
    order: -1;
  }

  .player-card__header {
    padding-right: 0;
  }

  .vip-badge {
    position: static;
    align-self: flex-start;
    margin-left: auto;
  }

  .player-card__header {
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}
