/*
 * 新10v10大乱斗启动器
 * 视觉基准：Dota 2 黑红配色；大量留白；无首屏文字/背景广告。
 * 首版保持纯黑。背景视频/图片仅在 config.js 中开启后加载。
 */
:root {
  color-scheme: dark;
  --page: #08090b;
  --surface: #131518;
  --line: #272a30;
  --text: #f4f4f4;
  --muted: #8e939a;
  --accent: #e43828;
  --background-opacity: 0.35;
  --content-width: 1216px;
  --action-width: 880px;
  font-synthesis: none;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 0;
  background: var(--page);
  color: var(--text);
  font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }

button, input, textarea { font: inherit; }
button:disabled { opacity: 0.45; cursor: not-allowed; }

:focus-visible {
  outline: 2px solid #ff8478;
  outline-offset: 4px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* 默认纯黑，背景图片/视频可延后替换 */
.background-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: var(--page);
}

.background-image,
.background-video,
.background-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.background-image {
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 360ms ease;
}
.background-image--active { opacity: var(--background-opacity); }

.background-video {
  object-fit: cover;
  opacity: 0;
  transition: opacity 360ms ease;
}
.background-video--active { opacity: var(--background-opacity); }

.background-shade {
  background: linear-gradient(180deg, rgba(0, 0, 0, .28), rgba(0, 0, 0, .06) 46%, rgba(0, 0, 0, .55));
}

.page-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

.site-header {
  flex: 0 0 auto;
  min-height: 72px;
  border-bottom: 1px solid rgba(255, 255, 255, .095);
  background: rgba(8, 9, 11, .80);
}

.site-header__inner {
  width: min(var(--content-width), calc(100% - 56px));
  min-height: 72px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 15px;
  min-width: 0;
  text-decoration: none;
}
.brand__logo {
  display: block;
  flex: 0 0 37px;
  width: 37px;
  height: 37px;
  object-fit: contain;
  background: var(--page);
}
.brand__name {
  color: #f7f7f7;
  font-size: 23px;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: .025em;
  white-space: nowrap;
}
.brand:hover .brand__name { color: #fff; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-shrink: 0;
}
.site-nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #c0c3c8;
  font-size: 15px;
  text-decoration: none;
  transition: color 160ms ease;
}
.site-nav__icon { display: block; flex: none; width: 18px; height: 18px; }
.site-nav a:hover { color: #f65b4d; }

/* 两侧等宽轨道保持控件在整页中央；FAQ 靠页面左边，右轨道留空 */
.site-main {
  flex: 1 1 auto;
  min-height: 0;
  width: calc(100% - 48px);
  margin-inline: auto;
  display: grid;
  grid-template-columns: 304px minmax(0, 1fr) 304px;
  grid-template-areas: "faq launcher .";
  column-gap: 24px;
  align-items: start;
  align-content: start;
  padding-block: clamp(36px, 10vh, 112px) 48px;
}

.launcher {
  grid-area: launcher;
  align-self: start;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 520px;
  padding: 40px 0;
}

.launcher__content {
  width: min(var(--action-width), 100%);
}

.launcher__reminder {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
  text-wrap: balance;
}
.launcher__reminder strong {
  color: #FFFFFF;
  font-weight: 700;
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 20px;
}

.action-grid--main { margin-bottom: 22px; }

.action {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  min-width: 0;
  min-height: 94px;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 16px 36px;
  overflow: hidden;
  color: #fff;
  text-decoration: none;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.action__icon {
  display: block;
  flex: none;
  width: 28px;
  height: 28px;
  color: currentColor;
}
.action__icon--steam { width: 44px; height: 44px; object-fit: contain; clip-path: circle(49%); }

.action__text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  line-height: 1.25;
}
.action__note {
  color: rgba(255, 255, 255, .72);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
}

.action__label {
  font-size: 24px;
  font-weight: 650;
  letter-spacing: .025em;
}

.action__arrow {
  position: absolute;
  top: 50%;
  right: 27px;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, .83);
}

.action--steam {
  background: linear-gradient(115deg, #bb2016 0%, #e43929 55%, #a31613 100%);
  border-color: rgba(255, 77, 65, .9);
  box-shadow: 0 3px 22px rgba(228, 56, 40, .16), inset 0 1px rgba(255, 255, 255, .14);
}

.action--steam:hover {
  background: linear-gradient(115deg, #d02b20, #f34735 55%, #bf1d1c);
  box-shadow: 0 5px 28px rgba(228, 56, 40, .27);
  transform: translateY(-1px);
}

.action--steamchina {
  background: rgba(17, 18, 21, .87);
  border-color: rgba(211, 50, 43, .77);
  box-shadow: inset 0 1px rgba(255, 255, 255, .035);
}
.action--steamchina:hover {
  background: rgba(37, 23, 25, .96);
  border-color: rgba(252, 78, 69, .95);
  transform: translateY(-1px);
}

.action--secondary {
  min-height: 69px;
  gap: 12px;
  padding-inline: 16px;
  background: rgba(15, 16, 18, .87);
  border-color: #3f4147;
  color: #babdc3;
  box-shadow: none;
}

.action--secondary .action__label {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: .015em;
}

.action--secondary .action__icon {
  width: 26px;
  height: 26px;
}

.action--secondary:hover {
  background: rgba(33, 30, 33, .90);
  border-color: rgba(221, 65, 55, .60);
  color: #fff;
  transform: translateY(-1px);
}
.action:active { transform: translateY(1px); }

/* 独立 FAQ 卡片：展开只增加文档高度，不覆盖或移动右侧控件 */
.faq {
  grid-area: faq;
  min-width: 0;
  margin-top: 64px;
  padding: 22px 20px 4px;
  border: 1px solid #292c32;
  border-radius: 10px;
  background: rgba(15, 17, 20, .94);
}
.faq h2 {
  margin: 0;
  padding-left: 13px;
  border-left: 3px solid var(--accent);
  color: #e4e4e4;
  font-size: 20px;
  font-weight: 600;
}
.faq__list { margin-top: 14px; }
.faq__list[hidden] { display: none; }
.faq__list details { border-bottom: 1px solid #262930; }
.faq__list details:last-child { border-bottom: 0; }
.faq__list summary {
  position: relative;
  padding: 15px 22px 15px 0;
  list-style: none;
  cursor: pointer;
  color: #c7cad0;
  font-size: 17px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.faq__list summary::-webkit-details-marker { display: none; }
.faq__list summary::after { content: "+"; position: absolute; top: 15px; right: 0; color: #777c85; }
.faq__list summary:hover, .faq__list details[open] summary { color: #f4f4f4; }
.faq__list details[open] summary::after { content: "−"; color: var(--accent); }
.faq__list p {
  margin: 0;
  padding: 0 0 18px;
  color: #a4a9b1;
  font-size: 16px;
  line-height: 1.85;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.site-footer {
  flex: 0 0 auto;
  padding: 12px 20px 17px;
  text-align: center;
  color: #535860;
  font-size: 12px;
  background: rgba(8, 9, 11, .66);
}

/* 控件不常驻显示命令；复制提示与展开的用户 FAQ 答案可显示完整命令 */
.toast {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: clamp(26px, 5vh, 64px);
  max-width: calc(100% - 32px);
  padding: 15px 22px;
  border: 1px solid rgba(224, 74, 61, .67);
  border-radius: 8px;
  background: #18191d;
  color: #f3f3f3;
  text-align: center;
  font-size: 14px;
  line-height: 1.6;
  overflow-wrap: anywhere;
  box-shadow: 0 12px 36px rgba(0, 0, 0, .45);
  opacity: 0;
  transform: translate(-50%, 12px);
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: none;
}
.toast[hidden] { display: none; }
.toast--visible { opacity: 1; transform: translate(-50%, 0); }
.toast--error { border-color: #b74e46; color: #ffe5e3; }

@media (min-width: 1101px) and (max-width: 1450px) {
  .action-grid--main .action { gap: 14px; padding-inline: 20px; }
  .action-grid--main .action__label { font-size: 22px; }
  .action-grid--main .action__arrow { right: 16px; }
}

@media (min-width: 1101px) and (max-width: 1250px) {
  .site-main { grid-template-columns: 240px minmax(0, 1fr) 240px; }
}

@media (max-width: 1100px) {
  .site-main {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "launcher" "faq";
    row-gap: 24px;
    padding-block: 32px 40px;
  }
  .launcher { width: min(var(--action-width), 100%); justify-self: center; min-height: 420px; }
  .faq { width: min(var(--action-width), 100%); justify-self: center; margin-top: 0; }
}

@media (max-width: 820px) {
  .site-header, .site-header__inner { min-height: 66px; }
  .brand__name { font-size: 19px; }
  .launcher { min-height: 470px; }
  .action { min-height: 84px; gap: 14px; padding-inline: 20px; }
  .action__label { font-size: 19px; }
  .action__icon--steam { width: 38px; height: 38px; }
  .action__arrow { right: 14px; }
  .action--secondary { min-height: 65px; }
  .action--secondary .action__label { font-size: 16px; }
}

@media (max-width: 620px) {
  .site-header, .site-header__inner { min-height: 64px; }
  .site-header__inner { width: calc(100% - 32px); }
  .site-main { width: calc(100% - 36px); padding-block: 22px 32px; row-gap: 26px; }
  .brand { gap: 9px; }
  .brand__logo { width: 29px; height: 29px; flex-basis: 29px; }
  .brand__name { font-size: 16px; letter-spacing: 0; }
  .site-nav a { font-size: 13px; }

  .launcher { min-height: 400px; padding: 24px 0; }
  .launcher__content { transform: none; max-width: 440px; }
  .launcher__reminder { font-size: 12px; }
  .action-grid { grid-template-columns: 1fr; row-gap: 13px; }
  .action-grid--main { margin-bottom: 16px; }
  .action { min-height: 72px; justify-content: center; border-radius: 6px; }
  .action__label { font-size: 19px; }
  .action__icon--steam { width: 34px; height: 34px; }
  .action__arrow { width: 19px; height: 19px; }
  .action--secondary { min-height: 58px; }
  .action--secondary .action__label { font-size: 15px; }
  .action--secondary .action__icon { width: 22px; height: 22px; }

  .faq { padding-inline: 18px; }
  .site-footer { font-size: 11px; }
}

@media (max-height: 640px) and (min-width: 621px) {
  .launcher { min-height: 340px; padding-block: 25px; }
  .action { min-height: 75px; }
  .action--secondary { min-height: 55px; }
}

/* 桌面以两排按钮本身的边界框对齐视口中心，提示文字不计入高度 */
@media (min-width: 1101px) {
  .launcher {
    position: fixed;
    top: 50%;
    left: 50%;
    grid-area: auto;
    transform: translate(-50%, -50%);
    width: min(var(--action-width), calc(100% - 704px));
    min-height: 0;
    padding: 0;
    z-index: 2;
  }
  .launcher__content { position: relative; }
  .launcher__reminder { position: absolute; top: 100%; left: 0; width: 100%; }
}

@media (min-width: 1101px) and (max-width: 1250px) {
  .launcher { width: min(var(--action-width), calc(100% - 576px)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .background-video { display: none; }
}
