/* WebGAL 风格标题页 —— 视频循环背景 + 左侧按钮列 */

.wg-title {
  position: fixed;
  inset: 0;
  z-index: 1000;
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  background: #000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.1s ease;
  -webkit-tap-highlight-color: transparent;
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB",
    "Noto Sans SC", "Segoe UI", sans-serif;
}

.wg-title.wg-on {
  opacity: 1;
  pointer-events: auto;
}

.wg-title__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  background: #000;
  z-index: 1;
  opacity: 0;
  transition: opacity 1.4s ease;
}

.wg-title.wg-video-on .wg-title__video {
  opacity: 1;
}

/* 轻微压暗，保证按钮可读 */
.wg-title__shade {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.28) 42%, rgba(0, 0, 0, 0.12) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.18) 0%, transparent 28%, transparent 72%, rgba(0, 0, 0, 0.35) 100%);
  opacity: 0;
  transition: opacity 1.2s ease;
}

.wg-title.wg-ui-on .wg-title__shade {
  opacity: 1;
}

.Title_backup_background {
  width: 100%;
  height: 100%;
  position: absolute;
  z-index: 0;
  background: #0a0a0c;
}

.Title_main {
  width: 100%;
  height: 100%;
  position: absolute;
  z-index: 13;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  opacity: 0;
  transform: translateX(-18px);
  transition: opacity 1.35s cubic-bezier(0.22, 0.8, 0.2, 1),
    transform 1.35s cubic-bezier(0.22, 0.8, 0.2, 1);
}

.wg-title.wg-ui-on .Title_main {
  opacity: 1;
  transform: none;
}

.wg-title__brand {
  position: absolute;
  left: max(48px, env(safe-area-inset-left));
  top: max(40px, env(safe-area-inset-top));
  z-index: 14;
  display: flex;
  align-items: center;
  gap: 14px;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 1.1s ease 0.15s, transform 1.1s ease 0.15s;
  pointer-events: none;
}

.wg-title.wg-ui-on .wg-title__brand {
  opacity: 1;
  transform: none;
}

.wg-title__brand img {
  width: 54px;
  height: 54px;
  object-fit: contain;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.45));
}

.wg-title__brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
}

.wg-title__brand-text b {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.1;
}

.wg-title__brand-text span {
  font-size: 12px;
  letter-spacing: 0.28em;
  opacity: 0.78;
  font-family: ui-monospace, Consolas, monospace;
}

.Title_buttonList {
  position: relative;
  display: flex;
  flex-flow: column;
  justify-content: center;
  align-items: stretch;
  gap: 4px;
  margin-left: max(56px, env(safe-area-inset-left));
  min-width: 240px;
  padding: 18px 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.08));
  backdrop-filter: blur(2px);
  border-left: 3px solid rgba(255, 255, 255, 0.72);
}

.Title_button {
  position: relative;
  flex: 0 0 auto;
  cursor: pointer;
  padding: 0;
  margin: 0;
  background: transparent;
  border: 0;
  border-left: 3px solid transparent;
  margin-left: -3px;
  text-align: left;
  overflow: visible;
  transition: background-color 0.35s ease, border-color 0.25s ease, transform 0.25s ease;
}

.Title_button:hover,
.Title_button:focus-visible {
  outline: none;
  background-color: rgba(255, 255, 255, 0.14);
  border-left-color: #fff;
  transform: translateX(4px);
}

.Title_button:active {
  background-color: rgba(255, 255, 255, 0.22);
}

.Title_button_disabled,
.Title_button_disabled:hover,
.Title_button_disabled:focus-visible {
  cursor: not-allowed !important;
  opacity: 0.42;
  background-color: transparent !important;
  border-left-color: transparent !important;
  transform: none !important;
}

.Title_button_text {
  position: relative;
  z-index: 1;
  display: inline-block;
  padding: 16px 42px 16px 28px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.18em;
  line-height: 1.2;
  color: #fff;
  white-space: nowrap;
  user-select: none;
}

.Title_button_text_outer,
.Title_button_text_inner {
  display: flex;
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: flex-start;
  padding: inherit;
  box-sizing: border-box;
  white-space: nowrap;
  letter-spacing: inherit;
  font-size: inherit;
  font-weight: inherit;
}

.Title_button_text_outer {
  color: #fff;
  z-index: 2;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.Title_button_text_inner {
  color: transparent;
  -webkit-text-stroke: 6px rgba(0, 0, 0, 0.55);
  z-index: 1;
}

.wg-title__hint {
  position: absolute;
  right: max(24px, env(safe-area-inset-right));
  bottom: max(22px, env(safe-area-inset-bottom));
  z-index: 15;
  color: rgba(255, 255, 255, 0.7);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: opacity 1s ease 0.4s;
  pointer-events: none;
}

.wg-title.wg-ui-on .wg-title__hint {
  opacity: 1;
}

.wg-title__toast {
  position: absolute;
  left: 50%;
  bottom: 18%;
  transform: translateX(-50%) translateY(8px);
  z-index: 20;
  padding: 10px 18px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  font-size: 13px;
  letter-spacing: 0.12em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.wg-title__toast.wg-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 820px) {
  .wg-title__brand {
    left: max(16px, env(safe-area-inset-left));
    top: max(16px, env(safe-area-inset-top));
    gap: 10px;
  }
  .wg-title__brand img { width: 42px; height: 42px; }
  .wg-title__brand-text b { font-size: 22px; }
  .wg-title__brand-text span { font-size: 10px; letter-spacing: 0.18em; }

  .Title_main {
    align-items: flex-end;
    padding-bottom: max(72px, calc(env(safe-area-inset-bottom) + 56px));
  }

  .Title_buttonList {
    margin-left: 0;
    width: 100%;
    min-width: 0;
    border-left: 0;
    border-top: 2px solid rgba(255, 255, 255, 0.55);
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.62));
    padding: 8px 0 4px;
    flex-flow: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0;
  }

  .Title_button {
    border-left: 0;
    margin-left: 0;
    border-bottom: 2px solid transparent;
  }
  .Title_button:hover,
  .Title_button:focus-visible {
    transform: none;
    border-left-color: transparent;
    border-bottom-color: #fff;
  }
  .Title_button_text {
    padding: 14px 18px;
    font-size: 16px;
    letter-spacing: 0.12em;
  }
  .Title_button_text_outer,
  .Title_button_text_inner {
    justify-content: center;
  }

  .wg-title__hint {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    bottom: max(14px, env(safe-area-inset-bottom));
    letter-spacing: 0.12em;
    font-size: 10px;
  }
}

@media (hover: none) {
  .Title_button:hover {
    background-color: transparent;
    border-left-color: transparent;
    border-bottom-color: transparent;
    transform: none;
  }
  .Title_button:active {
    background-color: rgba(255, 255, 255, 0.18);
  }
}
