:root {
  --accent: #FD4833;
  --bg: #050505;
  --text: #f7f7f7;
  --muted: rgba(255,255,255,.72);
  --dim: rgba(255,255,255,.38);
  --border: rgba(255,255,255,.17);
  --pill: rgba(20,17,16,.66);
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-width: 100%; min-height: 100%; background: var(--bg); }
body { color: var(--text); overflow: hidden; }
a { color: inherit; text-decoration: none; }

.page { width: 100%; min-height: 100svh; background: var(--bg); }
.desktop, .mobile { position: relative; min-height: 100svh; overflow: hidden; isolation: isolate; background: #050505; }
.mobile { display: none; }

.desktop-scene {
  position: absolute;
  inset: 0 0 0 auto;
  width: 77%;
  background: url("assets/minecraft-bg.png") center center / cover no-repeat;
  z-index: -4;
}
.desktop-scene::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 66% 58%, rgba(253,72,51,.12), transparent 34%),
    linear-gradient(to bottom, rgba(0,0,0,.12), rgba(0,0,0,.18) 62%, rgba(0,0,0,.42));
  pointer-events: none;
}
.desktop-scene-fade {
  position: absolute;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background:
    linear-gradient(90deg,
      #050505 0%,
      #050505 30%,
      rgba(5,5,5,.95) 40%,
      rgba(5,5,5,.72) 49%,
      rgba(5,5,5,.35) 59%,
      transparent 72%),
    linear-gradient(to bottom, rgba(0,0,0,.08), rgba(0,0,0,.22) 100%);
}
.ambient { position: absolute; border-radius: 50%; filter: blur(62px); pointer-events: none; z-index: -2; }
.ambient-desktop { width: 390px; height: 300px; left: 18%; top: 51%; background: rgba(253,72,51,.085); }

.desktop-copy {
  position: absolute;
  left: 6.28%;
  top: 50%;
  width: min(490px, 34vw);
  z-index: 2;
  transform: translateY(-54%);
}
h1 { margin: 0; font-weight: 800; letter-spacing: -.055em; }
.desktop h1 { font-size: clamp(68px, 5.08vw, 85px); line-height: 1.23; }
.headline-dot { color: var(--accent); font-size: .58em; margin-left: .04em; letter-spacing: 0; }
.red-rule { width: 52px; height: 4px; border-radius: 999px; margin: 25px 0 22px; background: var(--accent); }
.subtitle { margin: 0; color: rgba(255,255,255,.88); font-weight: 400; letter-spacing: .005em; }
.desktop .subtitle { font-size: 21px; }
.subtitle span { padding: 0 .34em; color: rgba(255,255,255,.55); }
.support { margin: 15px 0 0; color: rgba(255,255,255,.30); font-size: 15px; letter-spacing: .01em; }

.actions { display: flex; flex-direction: column; }
.desktop-actions { gap: 18px; margin-top: 40px; margin-left: -12px; }
.action-row { display: flex; flex-direction: column; gap: 7px; }
.action-label { margin-left: 20px; color: rgba(255,255,255,.42); font-size: 14px; }
.action-pill {
  display: grid;
  grid-template-columns: 52px 1fr 34px;
  align-items: center;
  width: 420px;
  height: 80px;
  padding: 0 30px 0 27px;
  border: none;
  border-radius: 999px;
  background: var(--pill);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: .01em;
  transition: background .22s ease, transform .22s ease;
}
.action-pill:hover { background: rgba(32,25,23,.78); transform: translateY(-1px); }
.action-icon, .arrow { fill: none; stroke: var(--accent); stroke-width: 2.65; stroke-linecap: round; stroke-linejoin: round; }
.action-icon { width: 40px; height: 40px; }
.action-icon.mini, .action-icon.people, .action-icon.folder { stroke-width: 1.6; }
.arrow { width: 31px; height: 31px; justify-self: end; transition: transform .22s ease; }
.action-pill:hover .arrow { transform: translateX(4px); }
.desktop .action-pill.primary {
  background: var(--accent);
  box-shadow: 0 14px 40px rgba(253,72,51,.14);
}
.desktop .action-pill.primary:hover { background: #e23c28; }
.desktop .action-pill.primary .action-icon,
.desktop .action-pill.primary .arrow { stroke: #fff; }

/* Mobile */
.mobile { background: #050505; }
.mobile-scene {
  position: absolute;
  inset: 0 0 auto 0;
  width: 100%;
  height: 100vw;
  min-height: 100vw;
  background: url("assets/minecraft-bg-mobile.png") center center / cover no-repeat;
  z-index: -5;
}
.mobile-fade {
  position: absolute;
  z-index: -4;
  inset: 8vw 0 0;
  background:
    linear-gradient(to bottom,
      rgba(5,5,5,0) 0,
      rgba(5,5,5,.06) 24vw,
      rgba(5,5,5,.22) 44vw,
      rgba(5,5,5,.50) 60vw,
      rgba(5,5,5,.80) 76vw,
      #050505 92vw);
  pointer-events: none;
}
.ambient-mobile {
  width: 52vw;
  height: 38vw;
  left: 22vw;
  top: 36vw;
  filter: blur(9vw);
  background: rgba(253,72,51,.08);
}
.mobile-content {
  position: relative;
  width: 100%;
  min-height: 100svh;
  padding-top: 62vw;
  z-index: 2;
  display: flex;
  flex-direction: column;
}
.mobile h1 {
  margin-left: 10%;
  margin-top: 5.8vw;
  font-size: 8.6vw;
  line-height: 1.39;
  letter-spacing: -.055em;
}
.mobile .subtitle {
  margin-left: 10%;
  margin-top: 1.7vw;
  font-size: 3.15vw;
  color: rgba(255,255,255,.78);
}
.mobile-actions {
  width: 80%;
  margin-left: 10%;
  margin-top: 7.2vw;
  gap: 1.8vw;
}
.mobile .action-pill {
  width: 100%;
  height: 7vw;
  min-height: 7vw;
  padding: 0 7.4% 0 12.6%;
  grid-template-columns: 14% 1fr 8%;
  border: none;
  background: rgba(25,22,21,.68);
  font-size: 3.05vw;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.mobile .action-pill.primary {
  border-color: transparent;
  background: var(--accent);
  box-shadow: 0 9px 36px rgba(253,72,51,.10);
}
.mobile .action-icon { width: 4.7vw; height: 4.7vw; }
.mobile .arrow { width: 4.1vw; height: 4.1vw; }
.mobile .primary .action-icon,
.mobile .primary .arrow { stroke: #fff; }
.mobile .action-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1vw;
  line-height: 1.05;
}
.mobile .action-title,
.mobile .action-subtitle {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mobile .action-title {
  font-size: 1.12em;
  font-weight: 700;
}
.mobile .action-subtitle {
  font-size: .68em;
  color: rgba(255,255,255,.56);
}
.mobile .primary .action-subtitle { color: rgba(255,255,255,.76); }

@media (max-width: 760px), (max-aspect-ratio: 3/4) {
  body { overflow: hidden; }
  .desktop { display: none; }
  .mobile { display: block; height: 100svh; min-height: 100svh; overflow: hidden; }
  .mobile-content { height: 100svh; min-height: 0; }
  .mobile-scene { height: 100vw; }
  .mobile-fade {
    top: 12vw;
    background:
      linear-gradient(to bottom,
        rgba(5,5,5,0) 0,
        rgba(5,5,5,.08) 24vw,
        rgba(5,5,5,.26) 44vw,
        rgba(5,5,5,.55) 60vw,
        rgba(5,5,5,.84) 76vw,
        #050505 92vw);
  }
  .mobile-content { padding-top: clamp(56vw, 42svh, 88vw); }
  .mobile h1 { margin-left: 7%; margin-top: 5.2vw; font-size: 10vw; line-height: 1.34; }
  .mobile .subtitle { margin-left: 7%; margin-top: 2.4vw; font-size: 3.8vw; }
  .mobile-actions { margin-left: 7%; margin-top: 8.8vw; width: 86%; gap: 2.7vw; }
  .mobile .action-pill { height: 16vw; min-height: 16vw; padding: 0 7% 0 12%; font-size: 4.2vw; }
  .mobile .action-icon { width: 7.4vw; height: 7.4vw; }
  .mobile .arrow { width: 5.5vw; height: 5.5vw; }
  .ambient-mobile { top: 36vw; }
}

@supports (height: 100dvh) {
  @media (max-width: 760px), (max-aspect-ratio: 3/4) {
    .mobile,
    .mobile-content {
      height: 100dvh;
      min-height: 100dvh;
    }
  }
}

@media (max-width: 760px) and (max-height: 700px), (max-aspect-ratio: 3/4) and (max-height: 700px) {
  .mobile-content { padding-top: 50vw; }
  .mobile h1 { margin-top: 4vw; font-size: 9.2vw; line-height: 1.3; }
  .mobile .subtitle { margin-top: 1.6vw; font-size: 3.4vw; }
  .mobile-actions { margin-top: 6.2vw; gap: 1.8vw; }
  .mobile .action-pill { height: 12.8vw; min-height: 12.8vw; font-size: 3.25vw; }
  .mobile .action-icon { width: 6.2vw; height: 6.2vw; }
  .mobile .arrow { width: 4.7vw; height: 4.7vw; }
}

@media (min-width: 761px) and (max-width: 1200px) {
  .desktop-copy { left: 5.7%; width: 390px; transform: translateY(-54%); }
  .desktop h1 { font-size: 62px; }
  .desktop .subtitle { font-size: 17px; }
  .action-pill { width: 360px; height: 70px; font-size: 20px; }
  .desktop-actions { margin-top: 30px; gap: 13px; }
}

/* QR Modal */
.qr-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  visibility: hidden;
  pointer-events: none;
  transition: visibility 0s linear .32s;
}
.qr-modal.is-open {
  visibility: visible;
  pointer-events: auto;
  transition: visibility 0s;
}
.qr-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5,5,5,.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity .3s ease;
  will-change: opacity;
}
.qr-modal.is-open .qr-backdrop {
  opacity: 1;
}
.qr-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: min(320px, 85vw);
  min-height: 460px;
  padding: 46px 28px;
  border-radius: 28px;
  background: rgba(255,255,255,.97);
  box-shadow:
    0 40px 100px rgba(0,0,0,.38),
    0 0 0 1px rgba(255,255,255,.18) inset;
  color: #111;
  text-align: center;
  transform: scale(.96) translateY(8px);
  opacity: 0;
  transition: transform .34s cubic-bezier(.16,1,.3,1), opacity .3s ease;
  will-change: transform, opacity;
}
.qr-modal.is-open .qr-card {
  transform: scale(1) translateY(0);
  opacity: 1;
}
.qr-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: none;
  outline: none;
  border-radius: 50%;
  background: rgba(0,0,0,.06);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background .2s ease, transform .2s ease;
}
.qr-close:hover { background: rgba(0,0,0,.12); transform: rotate(90deg); }
.qr-close:focus,
.qr-close:focus-visible,
.qr-close:active { outline: none; box-shadow: none; }
.qr-close svg { width: 22px; height: 22px; stroke: #333; stroke-width: 2.2; stroke-linecap: round; fill: none; }
.qr-frame {
  position: relative;
  width: min(220px, 60vw);
  aspect-ratio: 1 / 1;
  margin: 0 auto 30px;
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 8px 30px rgba(0,0,0,.1);
}
.qr-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
}
.qr-title {
  margin: 0 0 14px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.02em;
  color: #151515;
}
.qr-desc {
  margin: 0;
  font-size: 15px;
  color: rgba(0,0,0,.58);
  line-height: 1.5;
}

@media (max-width: 760px), (max-aspect-ratio: 3/4) {
  .qr-card { width: min(300px, 82vw); min-height: 430px; padding: 40px 24px; border-radius: 24px; }
  .qr-frame { width: min(200px, 56vw); aspect-ratio: 1 / 1; border-radius: 16px; }
  .qr-title { font-size: 18px; }
  .qr-desc { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
