/* game_tgn_0005 — iframe 直嵌 play_url；外壳与 iframe 内 play 页均用本模板赛博霓虹变量 */

:root {
  --play-tgn-primary: var(--neon-cyan, #00f3ff);
  --play-tgn-overlay: rgba(0, 0, 0, 0.55);
  --play-hero-radius: var(--g05-radius, 8px);
}

/* —— 详情页 iframe 外壳（对齐 detail 页 .game-container--empty 霓虹框） —— */
.g05-detail-player.detail-player {
  margin: 0 0 20px;
  border: 2px solid var(--neon-cyan, #00f3ff);
  border-radius: var(--play-hero-radius, 8px);
  overflow: hidden;
  background: #000;
  box-shadow: 0 0 20px rgba(0, 243, 255, 0.2);
}

.g05-detail-player .detail-player__frame-wrap {
  position: relative;
  width: 100%;
  height: clamp(480px, 56vw, 640px);
  min-height: 480px;
  background: #000;
}

.g05-detail-player .detail-player__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

@media (max-width: 768px), (orientation: landscape) and (max-height: 520px) {
  .g05-detail-player.detail-player {
    margin-bottom: 16px;
  }

  .g05-detail-player .detail-player__frame-wrap {
    height: clamp(520px, 132vw, 640px);
    min-height: 520px;
  }

  .g05-detail-player.detail-player.is-mobile-immersive {
    position: fixed !important;
    inset: 0 !important;
    z-index: 20050;
    margin: 0 !important;
    border-radius: 0 !important;
    border: none;
    box-shadow: none !important;
    overflow: hidden;
    background: #000;
  }

  .g05-detail-player.detail-player.is-mobile-immersive .detail-player__frame-wrap {
    height: 100dvh !important;
    min-height: 100dvh !important;
  }

  .g05-detail-player.detail-player.is-mobile-immersive .detail-player__frame {
    width: 100%;
    height: 100%;
    border: none;
  }

  body.detail-mobile-play-active {
    overflow: hidden !important;
  }

  body.detail-mobile-play-active .g05-site-header,
  body.detail-mobile-play-active .mobile-nav,
  body.detail-mobile-play-active .g05-mobile-bar {
    visibility: hidden;
    pointer-events: none;
  }
}

/* —— iframe 内 play 页布局（功能覆盖，非视觉抄袭其他模板） —— */
html.play-tgn-0001-page-active.play-tgn-0001-in-iframe,
html.play-tgn-0001-page-active.play-tgn-0001-in-iframe body {
  background: var(--card-bg, #111);
}

html.play-tgn-0001-page-active.play-tgn-0001-in-iframe .play-tgn-0001-page__dialog,
html.play-tgn-0001-page-active.play-tgn-0001-in-iframe .play-tgn-0001-page__dialog.play-tgn-0001__dialog {
  border-radius: 0 !important;
  border: none !important;
  box-shadow: none !important;
}

html.play-tgn-0001-page-active.play-tgn-0001-in-iframe .play-tgn-0001__frame-wrap {
  background: #000 !important;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

html.play-tgn-0001-page-active.play-tgn-0001-in-iframe .play-tgn-0001-page__dialog > .play-tgn-0001__topbar,
html.play-tgn-0001-page-active.play-tgn-0001-in-iframe #playTgn0001PageDialog > .play-tgn-0001__topbar,
#playTgn0001PageDialog:not(:fullscreen):not(:-webkit-full-screen) .play-tgn-0001__topbar {
  display: none !important;
}

html.play-tgn-0001-page-active.play-tgn-0001-in-iframe #playTgn0001PageDialog:is(:fullscreen, :-webkit-full-screen) > .play-tgn-0001__topbar,
#playTgn0001PageDialog:is(:fullscreen, :-webkit-full-screen) .play-tgn-0001__topbar {
  display: flex !important;
  justify-content: flex-end;
  align-items: center;
  flex-shrink: 0;
}

html.play-tgn-0001-page-active.play-tgn-0001-in-iframe #playTgn0001PageDialog > .play-tgn-0001__topbar .play-tgn-0001__login,
#playTgn0001PageDialog .play-tgn-0001__login,
#playTgn0001PageDialog:is(:fullscreen, :-webkit-full-screen) .play-tgn-0001__login {
  display: none !important;
}

/* —— iframe 内 play 页组件主题（g05 赛博霓虹） —— */
html.play-tgn-0001-page-active,
html.play-tgn-0001-page-active body,
html.play-tgn-0001-embed-active,
html.play-tgn-0001-embed-active body {
  background: var(--card-bg, #111);
  color: var(--text-main, #e0e0e0);
}

.play-tgn-0001-page {
  background: var(--card-bg, #111);
}

.play-tgn-0001-page__dialog,
.play-tgn-0001.is-open .play-tgn-0001__dialog,
#gameDetails .play-tgn-0001__dialog {
  background: var(--card-bg, #111);
  border-color: rgba(0, 243, 255, 0.25);
}

.play-tgn-0001__topbar,
.play-tgn-0001__bottombar,
#gameDetails .play-tgn-0001__topbar,
#gameDetails .play-tgn-0001__bottombar {
  background: rgba(0, 0, 0, 0.92);
  border-color: rgba(0, 243, 255, 0.18);
}

.play-tgn-0001__title,
#gameDetails .play-tgn-0001__title {
  color: var(--neon-cyan, #00f3ff);
  font-family: var(--g05-font, 'Orbitron', sans-serif);
}

.play-tgn-0001__login,
.play-tgn-0001__close,
#gameDetails .play-tgn-0001__login,
#gameDetails .play-tgn-0001__close {
  border-color: rgba(0, 243, 255, 0.35);
  color: var(--neon-cyan, #00f3ff);
  background: rgba(0, 0, 0, 0.55);
}

.play-tgn-0001__close:hover {
  background: rgba(0, 243, 255, 0.12);
  box-shadow: 0 0 16px rgba(0, 243, 255, 0.3);
}

.play-tgn-0001__frame-wrap {
  background: #000;
}

.play-tgn-0001__splash {
  background: rgba(5, 5, 5, 0.98);
}

.play-tgn-0001__splash-poster {
  border-radius: var(--g05-radius, 8px);
  border: 2px solid rgba(0, 243, 255, 0.3);
  box-shadow: 0 0 24px rgba(0, 243, 255, 0.15);
}

.play-tgn-0001__splash-play,
#gameDetails .play-tgn-0001__splash-play {
  border: 2px solid var(--neon-cyan, #00f3ff);
  border-radius: var(--g05-radius, 8px);
  background: rgba(0, 243, 255, 0.12);
  color: var(--neon-cyan, #00f3ff);
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: 0 0 24px rgba(0, 243, 255, 0.35);
}

.play-tgn-0001__splash-play:hover {
  background: rgba(0, 243, 255, 0.22);
  box-shadow: 0 0 28px rgba(0, 243, 255, 0.45);
}

.play-tgn-0001__thumb {
  border-radius: var(--g05-radius, 8px);
  border: 2px solid rgba(0, 243, 255, 0.25);
}

.play-tgn-0001__pill,
.play-tgn-0001__btn,
#gameDetails .play-tgn-0001__pill,
#gameDetails .play-tgn-0001__btn {
  border-color: rgba(0, 243, 255, 0.22);
  background: rgba(0, 0, 0, 0.55);
  color: var(--text-main, #e0e0e0);
}

.play-tgn-0001__pill:hover,
.play-tgn-0001__btn:hover,
.play-tgn-0001__pill.is-active,
.play-tgn-0001__btn.is-fs-active,
#gameDetails .play-tgn-0001__pill:hover,
#gameDetails .play-tgn-0001__btn:hover,
#gameDetails .play-tgn-0001__pill.is-active,
#gameDetails .play-tgn-0001__btn.is-fs-active {
  border-color: var(--neon-cyan, #00f3ff);
  color: var(--neon-cyan, #00f3ff);
  box-shadow: 0 0 14px rgba(0, 243, 255, 0.2);
}

.play-tgn-0001__pill--like.is-active {
  color: var(--neon-yellow, #ffee00);
  border-color: var(--neon-yellow, #ffee00);
}

.play-tgn-0001__pill--fav.is-active {
  color: var(--neon-pink, #ff00ff);
  border-color: var(--neon-pink, #ff00ff);
}

.play-tgn-0001__divider {
  background: rgba(0, 243, 255, 0.22);
}

.play-tgn-0001__toast {
  border: 2px solid var(--neon-cyan, #00f3ff);
  border-radius: var(--g05-radius, 8px);
  background: rgba(5, 5, 5, 0.96);
  color: var(--text-main, #e0e0e0);
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  box-shadow:
    0 0 20px rgba(0, 243, 255, 0.22),
    4px 4px 0 rgba(0, 0, 0, 0.35);
}

@media (max-width: 768px) {
  /* iframe 内 play 页铺满容器高度 */
  html.play-tgn-0001-page-active.play-tgn-0001-in-iframe,
  html.play-tgn-0001-page-active.play-tgn-0001-in-iframe body {
    height: 100%;
    min-height: 100%;
    overflow: hidden;
  }

  html.play-tgn-0001-page-active.play-tgn-0001-in-iframe .play-tgn-0001-page {
    min-height: 100%;
    height: 100%;
  }

  html.play-tgn-0001-page-active.play-tgn-0001-in-iframe .play-tgn-0001-page__dialog,
  html.play-tgn-0001-page-active.play-tgn-0001-in-iframe .play-tgn-0001-page__dialog.play-tgn-0001__dialog {
    height: 100% !important;
    min-height: 100% !important;
    max-height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden;
  }

  html.play-tgn-0001-page-active.play-tgn-0001-in-iframe .play-tgn-0001-page__dialog .play-tgn-0001__frame-wrap,
  html.play-tgn-0001-page-active.play-tgn-0001-in-iframe .play-tgn-0001__frame-wrap {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  /* splash：海报撑满中间区，Play 按钮贴底栏 */
  html.play-tgn-0001-page-active.play-tgn-0001-in-iframe .play-tgn-0001-page__dialog .play-tgn-0001__splash,
  html.play-tgn-0001-page-active.play-tgn-0001-in-iframe .play-tgn-0001__splash {
    position: relative;
    inset: auto;
    flex: 1 1 auto;
    min-height: 0;
    padding: 0;
    overflow: hidden;
    align-items: stretch;
    justify-content: flex-start;
  }

  html.play-tgn-0001-page-active.play-tgn-0001-in-iframe .play-tgn-0001-page__dialog .play-tgn-0001__splash-card,
  html.play-tgn-0001-page-active.play-tgn-0001-in-iframe .play-tgn-0001__splash-card {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    max-width: none;
    gap: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  html.play-tgn-0001-page-active.play-tgn-0001-in-iframe .play-tgn-0001-page__dialog .play-tgn-0001__splash-poster,
  html.play-tgn-0001-page-active.play-tgn-0001-in-iframe .play-tgn-0001__splash-poster {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    max-width: none;
    aspect-ratio: unset;
    height: auto;
    max-height: none;
    object-fit: cover;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-top: none;
    box-shadow: none;
  }

  html.play-tgn-0001-page-active.play-tgn-0001-in-iframe .play-tgn-0001-page__dialog .play-tgn-0001__splash-play,
  html.play-tgn-0001-page-active.play-tgn-0001-in-iframe .play-tgn-0001__splash-play {
    flex-shrink: 0;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 10px 16px;
    font-size: 14px;
    border-radius: 0;
    border-left: none;
    border-right: none;
    box-shadow: none;
  }

  html.play-tgn-0001-page-active.play-tgn-0001-in-iframe .play-tgn-0001__splash-play::before {
    font-size: 16px;
  }

  /* 底栏：详情页 iframe 内隐藏重复游戏信息，操作按钮均匀分布 */
  html.play-tgn-0001-page-active.play-tgn-0001-in-iframe .play-tgn-0001-page__dialog .play-tgn-0001__bottombar,
  html.play-tgn-0001-page-active.play-tgn-0001-in-iframe .play-tgn-0001__bottombar {
    flex-shrink: 0;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 10px 12px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    min-height: 56px;
    background: rgba(0, 0, 0, 0.96);
    border-top: 1px solid rgba(0, 243, 255, 0.22);
  }

  html.play-tgn-0001-page-active.play-tgn-0001-in-iframe .play-tgn-0001-page__dialog .play-tgn-0001__game-info,
  html.play-tgn-0001-page-active.play-tgn-0001-in-iframe .play-tgn-0001__game-info {
    display: none;
  }

  html.play-tgn-0001-page-active.play-tgn-0001-in-iframe .play-tgn-0001-page__dialog .play-tgn-0001__actions,
  html.play-tgn-0001-page-active.play-tgn-0001-in-iframe .play-tgn-0001__actions {
    display: flex;
    flex: 1 1 auto;
    width: 100%;
    max-width: 100%;
    align-items: center;
    justify-content: space-evenly;
    gap: 4px;
    flex-wrap: nowrap;
    overflow: visible;
  }

  html.play-tgn-0001-page-active.play-tgn-0001-in-iframe .play-tgn-0001__divider {
    display: none;
  }

  html.play-tgn-0001-page-active.play-tgn-0001-in-iframe .play-tgn-0001__pill,
  html.play-tgn-0001-page-active.play-tgn-0001-in-iframe .play-tgn-0001__btn {
    flex-shrink: 0;
    height: 40px;
    min-height: 40px;
    max-height: 40px;
    margin: 0;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    box-sizing: border-box;
    border-width: 1px;
    border-color: rgba(0, 243, 255, 0.38);
    background: rgba(0, 0, 0, 0.72);
    border-radius: 10px;
    font-size: 12px;
  }

  html.play-tgn-0001-page-active.play-tgn-0001-in-iframe .play-tgn-0001__btn,
  html.play-tgn-0001-page-active.play-tgn-0001-in-iframe .play-tgn-0001__pill--fav {
    width: 40px;
    min-width: 40px;
    max-width: 40px;
    padding: 0;
    border-radius: 50%;
  }

  html.play-tgn-0001-page-active.play-tgn-0001-in-iframe .play-tgn-0001__pill--like,
  html.play-tgn-0001-page-active.play-tgn-0001-in-iframe .play-tgn-0001__pill--dislike {
    width: auto;
    min-width: 44px;
    max-width: none;
    padding: 0 10px;
    border-radius: 9999px;
  }

  html.play-tgn-0001-page-active.play-tgn-0001-in-iframe .play-tgn-0001__btn span {
    display: none;
  }

  html.play-tgn-0001-page-active.play-tgn-0001-in-iframe .play-tgn-0001__reaction-count {
    font-size: 11px;
    font-weight: 700;
    min-width: 0.75em;
    line-height: 1;
  }

  html.play-tgn-0001-page-active.play-tgn-0001-in-iframe .play-tgn-0001__pill svg,
  html.play-tgn-0001-page-active.play-tgn-0001-in-iframe .play-tgn-0001__btn svg {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
  }

  html.play-tgn-0001-page-active.play-tgn-0001-in-iframe .play-tgn-0001__pill--like.is-active {
    background: rgba(255, 238, 0, 0.12);
    box-shadow: 0 0 10px rgba(255, 238, 0, 0.18);
  }

  html.play-tgn-0001-page-active.play-tgn-0001-in-iframe .play-tgn-0001__pill--fav.is-active {
    background: rgba(255, 0, 255, 0.14);
    box-shadow: 0 0 10px rgba(255, 0, 255, 0.22);
  }

  html.play-tgn-0001-page-active.play-tgn-0001-in-iframe .play-tgn-0001__pill:hover,
  html.play-tgn-0001-page-active.play-tgn-0001-in-iframe .play-tgn-0001__btn:hover {
    border-color: var(--neon-cyan, #00f3ff);
    background: rgba(0, 243, 255, 0.1);
  }

  /* 独立 play 弹窗 / 非 iframe：保留游戏信息，操作区换行铺满 */
  .play-tgn-0001.is-open .play-tgn-0001__bottombar,
  html.play-tgn-0001-page-active:not(.play-tgn-0001-in-iframe) .play-tgn-0001__bottombar {
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 12px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  }

  .play-tgn-0001.is-open .play-tgn-0001__game-info,
  html.play-tgn-0001-page-active:not(.play-tgn-0001-in-iframe) .play-tgn-0001__game-info {
    flex: 1 1 100%;
    min-width: 0;
    gap: 8px;
  }

  .play-tgn-0001.is-open .play-tgn-0001__title,
  html.play-tgn-0001-page-active:not(.play-tgn-0001-in-iframe) .play-tgn-0001__title {
    font-family: 'Rajdhani', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
    text-shadow: none;
  }

  .play-tgn-0001.is-open .play-tgn-0001__badge,
  html.play-tgn-0001-page-active:not(.play-tgn-0001-in-iframe) .play-tgn-0001__badge {
    display: none;
  }

  .play-tgn-0001.is-open .play-tgn-0001__actions,
  html.play-tgn-0001-page-active:not(.play-tgn-0001-in-iframe) .play-tgn-0001__actions {
    width: 100%;
    flex: 1 1 100%;
    justify-content: space-evenly;
    gap: 4px;
  }

  /* 移动端 play 页 / 全屏：禁止圆角 */
  html.play-tgn-0001-page-active.play-tgn-0001-in-iframe .play-tgn-0001-page__dialog,
  html.play-tgn-0001-page-active.play-tgn-0001-in-iframe .play-tgn-0001__dialog {
    border-radius: 0 !important;
    box-shadow: none !important;
  }
}

@media (max-width: 380px) {
  .g05-detail-player .detail-player__frame-wrap {
    min-height: 500px;
  }

  html.play-tgn-0001-page-active.play-tgn-0001-in-iframe .play-tgn-0001__bottombar {
    padding: 8px 8px;
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    min-height: 52px;
  }

  html.play-tgn-0001-page-active.play-tgn-0001-in-iframe .play-tgn-0001__actions {
    gap: 2px;
  }

  html.play-tgn-0001-page-active.play-tgn-0001-in-iframe .play-tgn-0001__pill,
  html.play-tgn-0001-page-active.play-tgn-0001-in-iframe .play-tgn-0001__btn {
    height: 36px;
    min-height: 36px;
    max-height: 36px;
  }

  html.play-tgn-0001-page-active.play-tgn-0001-in-iframe .play-tgn-0001__btn,
  html.play-tgn-0001-page-active.play-tgn-0001-in-iframe .play-tgn-0001__pill--fav {
    width: 36px;
    min-width: 36px;
    max-width: 36px;
  }

  html.play-tgn-0001-page-active.play-tgn-0001-in-iframe .play-tgn-0001__pill--like,
  html.play-tgn-0001-page-active.play-tgn-0001-in-iframe .play-tgn-0001__pill--dislike {
    min-width: 40px;
    padding: 0 8px;
  }

  html.play-tgn-0001-page-active.play-tgn-0001-in-iframe .play-tgn-0001__pill svg,
  html.play-tgn-0001-page-active.play-tgn-0001-in-iframe .play-tgn-0001__btn svg {
    width: 16px;
    height: 16px;
  }

  html.play-tgn-0001-page-active.play-tgn-0001-in-iframe .play-tgn-0001__pill--dislike {
    display: none;
  }
}
