/* Base reset */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Noto Sans, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: #fff;
  background: #000;
}

.site { position: relative; min-height: 100dvh; overflow: hidden; }

/* 背景：多列海報，無限水平滾動 */
.bg { position: absolute; inset: 0; overflow: hidden; }
.row { display: block; padding-block: clamp(8px, 0.8vw, 12px); }
.marquee { display: flex; overflow: hidden; }
.track { display: flex; gap: clamp(12px, 1.2vw, 18px); width: max-content; will-change: transform; animation: scroll var(--speed, 80s) linear infinite; }
.row { --direction: 1; }
.row[style*="-1"] .track { animation-direction: reverse; }

@keyframes scroll {
  from { transform: translateX(0%); }
  to { transform: translateX(-50%); }
}

.poster {
  width: clamp(110px, 14vw, 200px);
  aspect-ratio: 2 / 3;
  border-radius: 6px;
  background: #111;
  object-fit: cover;
  display: block;
  box-shadow: 0 10px 28px rgba(0,0,0,0.35), 0 2px 6px rgba(0,0,0,0.2);
  opacity: 0.92;
}

/* 交錯方向：用 transform-direction 變量控制 */
.row { --direction: 1; }
.row[style*="-1"] .track { animation-direction: reverse; }

/* 漸層覆蓋與暗角，提升前景可讀性 */
.vignette { position: absolute; inset: 0; pointer-events: none; background:
  radial-gradient(120% 60% at 50% 120%, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.8) 30%, rgba(0,0,0,0.6) 60%, rgba(0,0,0,0.4) 100%),
  linear-gradient(180deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.2) 30%, rgba(0,0,0,0.7) 100%);
}

/* 置中主內容 */
.hero { position: relative; z-index: 2; min-height: 100dvh; display: grid; place-items: center; text-align: center; padding: 24px; }
.hero h1 { font-size: clamp(28px, 4.5vw, 64px); margin: 0 0 8px; letter-spacing: 0.02em; text-shadow: 0 2px 8px rgba(0,0,0,0.6); }
.hero .subtitle { font-size: clamp(14px, 2vw, 20px); color: #d1d5db; margin: 0 0 16px; }

.cta {
  display: inline-block; padding: 10px 16px; border-radius: 6px;
  background: #e50914; color: #fff; text-decoration: none; font-weight: 600;
  box-shadow: 0 6px 16px rgba(229,9,20,0.35);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.cta:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(229,9,20,0.45); }
.cta:active { transform: translateY(0); box-shadow: 0 6px 16px rgba(229,9,20,0.35); }

.actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
.cta.outline { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,0.35); box-shadow: none; cursor: pointer; }
.cta.outline:hover { border-color: #fff; }

.server-card { margin-top: 14px; padding: 10px 14px; display: inline-flex; gap: 10px; align-items: center; background: rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.08); border-radius: 8px; backdrop-filter: blur(4px); }
.server-card .label { color: #9ca3af; font-size: 14px; }
.server-card .value { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-weight: 600; letter-spacing: .3px; }

/* Toast message */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px); background: rgba(0,0,0,0.9); color: #fff; padding: 10px 14px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.12); opacity: 0; transition: opacity .25s ease, transform .25s ease; z-index: 50; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 無障礙：偏好降低動態時停用動畫 */
@media (prefers-reduced-motion: reduce) {
  .track { animation: none; }
}
