:root {
  --text: #3d3a52;
  --muted: #6b6680;
  --border: rgba(255, 255, 255, 0.65);
  --shadow: 0 10px 40px rgba(120, 100, 180, 0.12);
  --radius: 22px;
  --font: "DM Sans", system-ui, sans-serif;
  --mono: "DM Sans", system-ui, sans-serif;
  --accent-ok: #3d9a6a;
  --accent-err: #d65a5a;
}

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

html {
  color-scheme: light;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  line-height: 1.5;
  position: relative;
  background-color: #ffe8f3;
  background-image: linear-gradient(
    118deg,
    #ffd6ec 0%,
    #ffe0f4 12%,
    #d4f0ff 38%,
    #e8d8ff 62%,
    #c8f9e4 82%,
    #fff4d4 100%
  );
  background-attachment: fixed;
  background-size: cover;
}

.bg-gradient {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 85% 55% at 8% 15%, rgba(255, 182, 220, 0.55), transparent 55%),
    radial-gradient(ellipse 75% 50% at 92% 18%, rgba(170, 210, 255, 0.6), transparent 50%),
    radial-gradient(ellipse 70% 45% at 78% 88%, rgba(186, 255, 210, 0.45), transparent 55%),
    radial-gradient(ellipse 60% 40% at 12% 85%, rgba(255, 228, 160, 0.4), transparent 50%);
}

.site-header {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem 1.5rem;
  text-align: center;
  position: relative;
  z-index: 1;
}

.site-logo {
  display: block;
  margin: 0 auto;
  max-width: min(440px, 88vw);
  width: auto;
  height: auto;
  max-height: clamp(72px, 18vw, 120px);
  object-fit: contain;
}

.cards {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem 2rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  position: relative;
  z-index: 1;
}

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

.card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  padding: 1.35rem 1.5rem 1.25rem;
  box-shadow: var(--shadow);
  min-height: 260px;
  display: flex;
  flex-direction: column;
  background: transparent;
}

/* Bottom layer: bold themed pastel wash */
.card__tint {
  position: absolute;
  inset: -30%;
  z-index: 0;
  border-radius: 50%;
  filter: blur(42px);
  opacity: 0.85;
  pointer-events: none;
  background: var(--tint-gradient);
}

/* Middle: frosted white so tint reads as a soft gradient card */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  background: linear-gradient(
    165deg,
    rgba(255, 255, 255, 0.92) 0%,
    rgba(255, 255, 255, 0.78) 55%,
    rgba(255, 255, 255, 0.68) 100%
  );
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  pointer-events: none;
}

/* Second accent strip (theme) at bottom of card */
.card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 38%;
  z-index: 1;
  border-radius: 0 0 var(--radius) var(--radius);
  background: var(--card-gradient);
  opacity: 0.42;
  pointer-events: none;
}

.card--vrchat {
  --card-gradient: linear-gradient(0deg, #ddd6fe 0%, #e9d5ff 40%, transparent 100%);
  --tint-gradient: radial-gradient(circle at 75% 25%, #a78bfa 0%, #c4b5fd 35%, #ede9fe 70%);
}

.card--somnium {
  --card-gradient: linear-gradient(0deg, #bae6fd 0%, #e0f2fe 45%, transparent 100%);
  --tint-gradient: radial-gradient(circle at 70% 20%, #38bdf8 0%, #7dd3fc 40%, #e0f2fe 75%);
}

.card--resonite {
  --card-gradient: linear-gradient(0deg, #fed7aa 0%, #ffedd5 45%, transparent 100%);
  --tint-gradient: radial-gradient(circle at 72% 22%, #fb923c 0%, #fdba74 38%, #ffedd5 72%);
}

.card--recroom {
  --card-gradient: linear-gradient(0deg, #a7f3d0 0%, #d1fae5 45%, transparent 100%);
  --tint-gradient: radial-gradient(circle at 70% 25%, #34d399 0%, #6ee7b7 38%, #d1fae5 72%);
}

.card--riffxr {
  --card-gradient: linear-gradient(0deg, #fbcfe8 0%, #fce7f3 45%, transparent 100%);
  --tint-gradient: radial-gradient(circle at 75% 22%, #f472b6 0%, #f9a8d4 38%, #fce7f3 72%);
}

.card--chilloutvr {
  --card-gradient: linear-gradient(0deg, #a5f3fc 0%, #cffafe 45%, transparent 100%);
  --tint-gradient: radial-gradient(circle at 68% 24%, #22d3ee 0%, #67e8f9 38%, #cffafe 72%);
}

.card__head {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  min-height: 3.25rem;
}

.card__ath {
  margin-left: auto;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(90, 100, 130, 0.12);
  box-shadow: 0 4px 18px rgba(80, 70, 120, 0.06);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  white-space: nowrap;
}

/* Natural aspect ratio: only cap size, never force width×height */
.card__logo {
  display: block;
  height: auto;
  width: auto;
  max-height: 52px;
  max-width: min(220px, 92%);
  object-fit: contain;
  object-position: left center;
}

.card__metric {
  position: relative;
  z-index: 2;
  margin-top: 1rem;
  flex: 1;
}

.card__value {
  display: block;
  font-family: var(--mono);
  font-size: clamp(2rem, 5vw, 2.65rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.card__value--muted {
  color: var(--muted);
}

.card__unit {
  display: block;
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 0.35rem;
  font-weight: 500;
}

.card__status {
  margin: 0.85rem 0 0;
  font-size: 0.875rem;
  color: var(--muted);
  position: relative;
  z-index: 2;
}

.card__hint {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
  opacity: 0.92;
  min-height: 0;
  position: relative;
  z-index: 2;
}

.card__disclaimer {
  margin: 0.65rem 0 0;
  padding-top: 0.55rem;
  border-top: 1px solid rgba(90, 100, 130, 0.12);
  font-size: 0.72rem;
  line-height: 1.45;
  color: var(--muted);
  opacity: 0.88;
  position: relative;
  z-index: 2;
}

.card__disclaimer2 {
  margin: 0.35rem 0 0;
  font-size: 0.7rem;
  line-height: 1.35;
  color: var(--muted);
  opacity: 0.78;
  position: relative;
  z-index: 2;
}

.card__foot {
  margin-top: auto;
  padding-top: 0.85rem;
  position: relative;
  z-index: 2;
}

.card__link {
  font-size: 0.875rem;
  font-weight: 600;
  color: #5b6ba8;
  text-decoration: none;
}

.card__link:hover {
  text-decoration: underline;
  color: #4a5690;
}

.card--vrchat .card__link {
  color: #6d5a9c;
}
.card--somnium .card__link {
  color: #2a8bb8;
}
.card--resonite .card__link {
  color: #c45c2a;
}
.card--recroom .card__link {
  color: #1d9a6c;
}
.card--riffxr .card__link {
  color: #b8488c;
}
.card--chilloutvr .card__link {
  color: #1a9aaa;
}

.site-footer {
  text-align: center;
  padding: 1rem 1.5rem 2rem;
  color: var(--muted);
  font-size: 0.85rem;
  position: relative;
  z-index: 1;
}

.site-footer a {
  color: #5b6ba8;
  font-weight: 600;
}

.site-credit {
  position: fixed;
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  right: calc(1.25rem + env(safe-area-inset-right, 0px));
  z-index: 20;
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(90, 100, 130, 0.12);
  box-shadow: 0 4px 18px rgba(80, 70, 120, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.site-credit:hover {
  color: #4a6fa5;
  text-decoration: underline;
}

@media (max-width: 520px) {
  .site-credit {
    bottom: calc(0.65rem + env(safe-area-inset-bottom, 0px));
    right: calc(0.65rem + env(safe-area-inset-right, 0px));
    font-size: 0.75rem;
    padding: 0.35rem 0.6rem;
  }
}

/* Firefox tends to struggle more with heavy blur + translucency while scrolling. */
@-moz-document url-prefix() {
  body {
    background-attachment: scroll;
  }

  .card__tint {
    filter: blur(24px);
    opacity: 0.75;
  }

  .card::before {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: linear-gradient(
      165deg,
      rgba(255, 255, 255, 0.95) 0%,
      rgba(255, 255, 255, 0.86) 55%,
      rgba(255, 255, 255, 0.8) 100%
    );
  }

  .site-credit {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(255, 255, 255, 0.9);
  }

  .card__ath {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(255, 255, 255, 0.9);
  }
}

.card__status--error {
  color: var(--accent-err);
}

.card__status--ok {
  color: var(--accent-ok);
}
