:root {
  color-scheme: dark;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-synthesis: none;
  --page: #0b0d11;
  --surface: rgba(21, 24, 31, 0.88);
  --line: rgba(255, 255, 255, 0.09);
  --text: #f7f8fb;
  --muted: #a6acb8;
  --gold: #f6c94d;
  --gold-light: #ffe48a;
  --gold-ink: #171208;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-width: 320px;
  min-height: 100%;
}

html {
  background: var(--page);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 50% 42%, rgba(246, 201, 77, 0.09), transparent 24rem),
    radial-gradient(circle at 16% 10%, rgba(119, 97, 255, 0.08), transparent 24rem),
    var(--page);
}

button,
a {
  font: inherit;
}

/* Resolve the Activity destination before showing membership or game controls. */
.upgrade-page[hidden] { display: none; }
.activity-loading { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px; background: #0c0b0f; color: #a8a6ae; text-align: center; font-size: 13px; }
.activity-loading img { object-fit: contain; }
.activity-loading-line { width: 70px; height: 2px; background: #f3c65c26; overflow: hidden; }
.activity-loading-line::after { content: ''; display: block; width: 35px; height: 100%; background: #f3c65c; animation: activity-loading-progress 1.2s ease-in-out infinite alternate; }
.activity-loading p { margin: 0; }
.activity-loading button { padding: 10px 20px; border: 1px solid #f9dc94; border-radius: 999px; background: #f3c65c; color: #281e0c; font: inherit; font-weight: 600; cursor: pointer; }
.activity-loading button:focus-visible { outline: 2px solid #f3c65c; outline-offset: 4px; }
@keyframes activity-loading-progress { from { transform: translateX(-20px); } to { transform: translateX(55px); } }
@media (prefers-reduced-motion: reduce) { .activity-loading-line::after { animation: none; width: 100%; } }

.upgrade-page {
  display: grid;
  width: 100%;
  min-height: 100vh;
  padding: 32px;
  place-items: center;
}

.upgrade-card {
  width: min(100%, 520px);
  padding: 42px;
  border: 1px solid var(--line);
  border-radius: 28px;
  text-align: center;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.035), transparent 55%),
    var(--surface);
  box-shadow:
    0 32px 90px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(18px);
}

.logo-stage {
  position: relative;
  display: grid;
  width: 104px;
  height: 104px;
  margin: 0 auto 28px;
  place-items: center;
  border: 1px solid rgba(246, 201, 77, 0.14);
  border-radius: 30px;
  background: #11141a;
}

.logo-stage img {
  position: relative;
  z-index: 1;
  width: 78px;
  height: 78px;
  object-fit: contain;
}

.logo-glow {
  position: absolute;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: rgba(246, 201, 77, 0.19);
  filter: blur(28px);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold-light);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(2.25rem, 7vw, 4rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.06em;
}

.description {
  max-width: 390px;
  margin: 18px auto 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}

.price {
  display: flex;
  margin: 28px 0 22px;
  align-items: baseline;
  justify-content: center;
  gap: 7px;
  color: var(--muted);
  font-size: 0.82rem;
}

.price strong {
  color: var(--text);
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

.checkout-button {
  display: flex;
  width: 100%;
  min-height: 58px;
  padding: 0 20px;
  border: 0;
  border-radius: 15px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--gold-ink);
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  box-shadow: 0 16px 34px rgba(246, 201, 77, 0.16);
  font-size: 1rem;
  font-weight: 820;
  cursor: pointer;
  transition:
    transform 160ms ease,
    filter 160ms ease,
    opacity 160ms ease;
}

.checkout-button:not(:disabled):hover {
  filter: brightness(1.04);
  transform: translateY(-2px);
}

.checkout-button:not(:disabled):active {
  transform: translateY(0);
}

.checkout-button:disabled {
  cursor: wait;
  opacity: 0.56;
}

.checkout-button:focus-visible {
  outline: 3px solid rgba(246, 201, 77, 0.28);
  outline-offset: 3px;
}

.checkout-meta {
  display: flex;
  margin: 15px 0 0;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #818895;
  font-size: 0.7rem;
  line-height: 1.45;
}

.secure-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #66d793;
  box-shadow: 0 0 8px rgba(102, 215, 147, 0.52);
}

.checkout-status {
  min-height: 18px;
  margin: 9px 0 0;
  color: #727986;
  font-size: 0.68rem;
}

.checkout-status[data-state="error"] {
  color: #ff9b9b;
}

@media (max-width: 600px) {
  .upgrade-page {
    padding: 18px;
  }

  .upgrade-card {
    padding: 34px 22px;
    border-radius: 24px;
  }

  .logo-stage {
    width: 88px;
    height: 88px;
    margin-bottom: 24px;
    border-radius: 26px;
  }

  .logo-stage img {
    width: 66px;
    height: 66px;
  }

  .checkout-meta {
    flex-wrap: wrap;
  }
}

@media (max-height: 650px) and (min-width: 601px) {
  .upgrade-page {
    padding: 18px;
  }

  .upgrade-card {
    padding: 28px 36px;
  }

  .logo-stage {
    width: 76px;
    height: 76px;
    margin-bottom: 18px;
    border-radius: 22px;
  }

  .logo-stage img {
    width: 58px;
    height: 58px;
  }

  .description {
    margin-top: 12px;
  }

  .price {
    margin: 18px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .checkout-button {
    transition: none;
  }
}
