/* =========================================== */
/*   GAME DETAILS PAGE - NEON CYBER THEME      */
/* =========================================== */

/* 1. MAIN CONTAINER */
.container-game-details {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.container-game-details-content {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

/* Breadcrumb — detail */
.breadcrumb-nav {
  margin: 16px 0 8px;
}

.breadcrumb-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 8px;
}

.breadcrumb-list > li {
  list-style: none;
}

.breadcrumb-item {
  display: flex;
  align-items: center;
}

.breadcrumb-item a {
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-primary);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.breadcrumb-item a:hover {
  background: rgba(108, 93, 211, 0.1);
}

.breadcrumb-item span[aria-current="page"] {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-primary);
  padding: 4px 8px;
}

.breadcrumb-separator {
  font-size: 13px;
  color: var(--color-text-muted);
  user-select: none;
}

/* Hero card rating — must stack above .shape-left / .shape-bottom (z-index 2–3) like .hero-game-title */
.game-star--hero {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 12px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  position: relative;
  z-index: 10;
  flex-shrink: 0;
}

.game-star--hero .detail-rating-visual {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #f59e0b;
  font-size: 1.5rem;
  line-height: 1;
}

.game-star--hero .detail-rating-visual .star-icon {
  margin-right: 0;
  font-size: 1.5rem;
}

/* Font Awesome / icon font stars in hero rating */
.game-star--hero .detail-rating-visual .fa-star,
.game-star--hero .detail-rating-visual .fa-star-half-stroke,
.game-star--hero .detail-rating-visual i {
  font-size: 1.5rem;
  line-height: 1;
}

/* 2. LOADING AND ERROR STATES */
.state-loading {
  text-align: center;
  font-size: 18px;
  color: var(--color-primary);
  padding: 60px 0;
  text-shadow: 0 0 10px rgba(0, 245, 255, 0.3);
}

.container-error {
  text-align: center;
  padding: 60px 0;
  background: var(--color-bg-secondary);
  border-radius: var(--radius-lg);
  margin: 20px 0;
  border: 1px solid var(--color-border);
}

.container-error h2 {
  color: var(--color-error);
  margin-bottom: 15px;
  text-shadow: 0 0 15px rgba(255, 49, 49, 0.3);
}

/* 2.1 UNAVAILABLE STATE (Matches hero card style) */
.game-unavailable {
    background: #ffffff;
    border-radius: 20px;
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.game-unavailable::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: -55%;
    left: 50%;
    transform: translateX(-50%);
    background: rgb(248, 248, 248);
    border-radius: 50%;
    z-index: 0;
}

.game-unavailable::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 55%;
    right: -48%;
    transform: translateY(-50%);
    background: #f3f3f3;
    border-radius: 50%;
    z-index: 1;
}

.game-unavailable__icon,
.game-unavailable__title,
.game-unavailable__desc,
.game-unavailable__actions {
    position: relative;
    z-index: 10;
}

.game-unavailable__icon {
    width: 92px;
    height: 92px;
    border-radius: 24px;
    display: grid;
    place-items: center;
    background: #ffffff;
    box-shadow: 0 15px 35px rgba(0,0,0,0.12);
    margin: 10px auto 22px;
    font-size: 40px;
}

.game-unavailable__title {
    font-size: 2rem;
    font-weight: 800;
    color: #4C35E0;
    margin: 0 0 12px;
    line-height: 1.2;
}

.game-unavailable__desc {
    font-size: 1rem;
    color: #666;
    margin: 0 auto 26px;
    max-width: 52ch;
    line-height: 1.7;
}

.game-unavailable__actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.game-unavailable__btn {
    background: #4C35E0;
    color: white;
    font-size: 1.05rem;
    font-weight: 700;
    padding: 14px 44px;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(76, 53, 224, 0.3);
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.game-unavailable__btn:hover {
    background: #3a26b5;
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(76, 53, 224, 0.4);
}

/* 3. BACK BUTTON */
.link-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 600;
  margin-bottom: 20px;
  padding: 10px 18px;
  transition: all var(--transition-normal);
  background: transparent;
  font-size: 16px;
  border: 2px solid var(--color-primary);
  border-radius: var(--radius-md);
}

.link-back:hover {
  background: var(--color-primary-hover);
  color: white;
  transform: translateX(-5px);
  box-shadow: var(--shadow-md);
}

/* 4. LAYOUT — 上下排列：游戏信息 → 文本 → 相似游戏 */
.game-details-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    align-items: start;
    margin-bottom: 20px;
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

.game-main-column,
.game-sidebar-column {
    min-width: 0;
    max-width: 100%;
}

/* Left Column: Hero Card — inline play shell */
#gameDetails .game-hero-card[data-play-inline-visible] {
    --hero-card-height: auto;
    --hero-top-mask-height: 52px;
    --hero-bottom-mask-height: 70px;

    background: #ffffff;
    border-radius: 20px;
    padding: 0;
    display: grid;
    grid-template-rows: var(--hero-top-mask-height) auto var(--hero-bottom-mask-height);
    align-items: stretch;
    text-align: center;
    position: relative;
    height: auto;
    min-height: 0;
    max-height: none;
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

#gameDetails .game-hero-card[data-play-inline-visible]::before,
#gameDetails .game-hero-card[data-play-inline-visible]::after {
    display: none;
}

.g03-detail-meta {
    margin-bottom: 20px;
    padding: 0 4px;
}

.g03-detail-title {
    margin: 0 0 10px;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    color: var(--color-primary, #6C5DD3);
    line-height: 1.2;
    word-break: break-word;
}

.g03-detail-rating {
    margin: 0 0 12px;
}

.g03-detail-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin: 0 0 4px;
    font-size: 0.875rem;
    color: var(--color-text-secondary, #808191);
}

.g03-detail-facts .game-developer,
.g03-detail-facts .game-publish-date,
.g03-detail-facts .game-update-time {
    margin: 0;
}

#gameDetails .game-launch-container {
    width: 100%;
    aspect-ratio: 16 / 9;
    min-height: 240px;
    background-color: #11142D;
    background-size: cover;
    background-position: center;
    position: relative;
    border-radius: 0;
}

#gameDetails .game-launch-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: rgba(17, 20, 45, 0.45);
}

#gameDetails .hero-card-main {
    align-items: stretch;
    justify-content: stretch;
    padding: 0;
    grid-row: 2;
    position: relative;
}

/* Idle inline: keep launch area above mask chrome */
#gameDetails .game-hero-card[data-play-inline-visible]:not(.playing):not(.is-game-started):not(.is-immersive-play):not(.is-mobile-play):not(.is-browser-fs):not(:fullscreen):not(:-webkit-full-screen) .hero-card-main {
    z-index: 35;
}

#gameDetails .game-hero-card[data-play-inline-visible]:not(.playing):not(.is-game-started):not(.is-immersive-play):not(.is-mobile-play):not(.is-browser-fs):not(:fullscreen):not(:-webkit-full-screen) .hero-mask-frame {
    z-index: 10;
    overflow: hidden;
}

/* Playing / fullscreen: restore normal mask stacking */
#gameDetails .game-hero-card[data-play-inline-visible].playing .hero-mask-frame,
#gameDetails .game-hero-card[data-play-inline-visible].is-game-started .hero-mask-frame,
#gameDetails .game-hero-card[data-play-inline-visible].is-immersive-play .hero-mask-frame,
#gameDetails .game-hero-card[data-play-inline-visible].is-mobile-play .hero-mask-frame,
#gameDetails .game-hero-card[data-play-inline-visible].is-browser-fs .hero-mask-frame,
#gameDetails .game-hero-card[data-play-inline-visible]:is(:fullscreen, :-webkit-full-screen) .hero-mask-frame {
    z-index: 30;
}

#gameDetails .game-hero-card[data-play-inline-visible].is-immersive-play .hero-card-main,
#gameDetails .game-hero-card[data-play-inline-visible].is-mobile-play .hero-card-main,
#gameDetails .game-hero-card[data-play-inline-visible].is-browser-fs .hero-card-main,
#gameDetails .game-hero-card[data-play-inline-visible]:is(:fullscreen, :-webkit-full-screen) .hero-card-main {
    z-index: auto;
}

#gameDetails .game-hero-card[data-play-inline-visible] .game-launch-container {
    position: relative;
    z-index: 1;
}

#gameDetails .game-hero-card[data-play-inline-visible] .game-launch-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
}

#gameDetails .game-hero-card[data-play-inline-visible] .hero-play-btn {
    position: relative;
    z-index: 2;
    pointer-events: auto;
}

#gameDetails .hero-play-btn.game-launch-btn {
    background: var(--gradient-primary, linear-gradient(135deg, #6C5DD3 0%, #8B7BF7 100%));
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
    padding: 14px 36px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(108, 93, 211, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

#gameDetails .hero-play-btn.game-launch-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(108, 93, 211, 0.42);
}

#gameDetails .hero-play-icon {
    font-size: 1rem;
    line-height: 1;
}

.game-hero-card {
    --hero-card-height: 800px;
    --hero-top-mask-height: 52px;
    --hero-bottom-mask-height: 70px;

    background: #ffffff;
    border-radius: 20px;
    padding: 0;
    display: grid;
    grid-template-rows: var(--hero-top-mask-height) minmax(0, 1fr) var(--hero-bottom-mask-height);
    align-items: stretch;
    text-align: center;
    position: relative;
    height: var(--hero-card-height);
    min-height: var(--hero-card-height);
    max-height: var(--hero-card-height);
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

/* Fixed top / bottom mask frames */
.hero-mask-frame {
    position: relative;
    z-index: 30;
    flex-shrink: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.97);
}

.hero-mask-frame__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
}

.hero-mask-frame--top {
    grid-row: 1;
    height: var(--hero-top-mask-height);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    box-sizing: border-box;
}

.hero-mask-frame--top .hero-mask-frame__bar {
    height: 100%;
    min-height: 0;
    padding: 0 16px;
}

.hero-mask-frame--bottom {
    grid-row: 3;
    height: var(--hero-bottom-mask-height);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    margin-top: 0;
    box-sizing: border-box;
}

.hero-mask-frame--bottom .hero-mask-frame__bar {
    height: 100%;
    min-height: 0;
    padding: 0 16px;
    align-items: center;
}

.game-hero-card:not(.playing) .hero-mask-close {
    display: none !important;
}

#gameDetails .hero-mask-login {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 2px solid var(--color-primary, #6C5DD3);
    border-radius: var(--radius-md, 12px);
    background: transparent;
    color: var(--color-primary, #6C5DD3);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal, 0.3s ease);
    margin-right: auto;
}

#gameDetails .hero-mask-login:hover {
    background: var(--color-primary-hover, #5a4cb4);
    border-color: var(--color-primary-hover, #5a4cb4);
    color: #fff;
}

#gameDetails .hero-mask-login svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

#gameDetails .hero-mask-close {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: var(--radius-full, 9999px);
    background: var(--color-bg-tertiary, #e4e4e4);
    color: var(--color-text-secondary, #808191);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: all var(--transition-normal, 0.3s ease);
    flex-shrink: 0;
}

#gameDetails .hero-mask-close:hover {
    background: var(--color-primary, #6C5DD3);
    color: #fff;
}

.hero-card-main {
    grid-row: 2;
    position: relative;
    z-index: 10;
    flex: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 0;
    width: 100%;
    overflow: hidden;
}

.hero-detail-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 24px 60px 16px;
    box-sizing: border-box;
    overflow-y: auto;
}

/* Abstract background shapes - Overlapping Circles */
.game-hero-card::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    background: rgb(248, 248, 248); /* Top White Circle (Strongest) */
    border-radius: 50%;
    z-index: 0;
}

.game-hero-card::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 50%;
    right: -46%;
    transform: translateY(-50%);
    background: #f3f3f3; /* Right Circle (Medium - 2nd Layer) */
    border-radius: 50%;
    z-index: 1;
}

.hero-bg-shape {
    position: absolute;
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
}

.shape-bottom {
    width: 100%;
    height: 100%;
    bottom: -50%;
    left: 50%;
    transform: translateX(-50%);
    background: rgb(233, 233, 233, 0.6); /* Bottom Circle (Strong - 3rd Layer) */
    z-index: 2;
}

.shape-left {
    width: 100%;
    height: 100%;
    top: 50%;
    left: -46%;
    transform: translateY(-50%);
    background: rgb(227, 227, 227, 0.6); /* Left Circle (Strongest - Top Layer) */
    z-index: 3;
}

.hero-game-image-wrapper {
    width: 180px;
    height: 180px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    position: relative;
    z-index: 10; /* Increased z-index to be above shapes */
    background: white;
    margin: 40px auto 25px;
    flex-shrink: 0;
}

.hero-game-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-game-title {
    font-size: 2rem;
    font-weight: 800;
    color: #4C35E0; /* Deep Purple/Blue */
    margin-bottom: 10px;
    line-height: 1.2;
    z-index: 10; /* Increased z-index */
    position: relative;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.hero-game-developer {
    font-size: 1rem;
    color: #666;
    margin-bottom: 30px;
    z-index: 10; /* Increased z-index */
    position: relative;
}

.hero-play-btn {
    background: #4C35E0;
    color: white;
    font-size: 1.2rem;
    font-weight: 700;
    padding: 16px 60px;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(76, 53, 224, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 10; /* Increased z-index */
    position: relative;
}

.hero-play-btn:hover {
    background: #3a26b5;
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(76, 53, 224, 0.4);
}

.hero-play-btn i {
    font-size: 1.4rem;
}

.hero-game-actions {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    border-top: none;
}

.hero-game-actions__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 12px;
}

.hero-game-actions__left,
.hero-game-actions__right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.hero-game-actions__right {
    margin-left: auto;
}

.hero-game-actions .play-tgn-0001__pill,
.hero-game-actions .play-tgn-0001__btn,
.hero-game-actions .play-tgn-0002__pill,
.hero-game-actions .play-tgn-0002__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid #E4E4E4;
    border-radius: 9999px;
    background: #ffffff;
    color: #11142D;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.hero-game-actions .play-tgn-0001__pill:hover,
.hero-game-actions .play-tgn-0001__btn:hover,
.hero-game-actions .play-tgn-0002__pill:hover,
.hero-game-actions .play-tgn-0002__btn:hover {
    border-color: #6C5DD3;
    color: #6C5DD3;
    background: rgba(108, 93, 211, 0.06);
}

.hero-game-actions .play-tgn-0001__pill svg,
.hero-game-actions .play-tgn-0001__btn svg,
.hero-game-actions .play-tgn-0002__pill svg,
.hero-game-actions .play-tgn-0002__btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.hero-game-actions .play-tgn-0001__pill.is-active,
.hero-game-actions .play-tgn-0002__pill.is-active {
    color: #6C5DD3;
    border-color: #6C5DD3;
    background: rgba(108, 93, 211, 0.08);
}

.hero-game-actions .play-tgn-0001__pill--like.is-active,
.hero-game-actions .play-tgn-0002__pill--like.is-active {
    color: #28a745;
    border-color: #28a745;
    background: rgba(40, 167, 69, 0.08);
}

.hero-game-actions .play-tgn-0001__pill--dislike.is-active,
.hero-game-actions .play-tgn-0002__pill--dislike.is-active {
    color: #dc3545;
    border-color: #dc3545;
    background: rgba(220, 53, 69, 0.08);
}

.hero-game-actions .play-tgn-0001__pill--fav.is-active,
.hero-game-actions .play-tgn-0002__pill--fav.is-active {
    color: #ffc107;
    border-color: #ffc107;
    background: rgba(255, 193, 7, 0.1);
}

.hero-game-actions .play-tgn-0002__divider {
    display: none;
}

/* Description Section */
.game-description-section {
    background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.game-description-section h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5rem;
    font-weight: 700;
}

.description-block {
    background: #ffffff;
    border-radius: 20px;
    padding: 26px 24px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border: 1px solid #f1f1f6;
}

.description-block h3 {
    margin-bottom: 14px;
}

.description-block-reviews {
    border-left: 4px solid #1cc7dd;
}

.description-block-content {
    border-left: 4px solid #4C35E0;
}

.container-game-description-text {
    line-height: 1.8;
    color: #555;
    font-size: 16px;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.container-game-description-text table,
.container-game-description-text pre,
.container-game-description-text iframe,
.container-game-description-text video {
    max-width: 100%;
}

.container-game-description-text pre {
    overflow-x: auto;
    white-space: pre-wrap;
}

.container-game-description-text p {
    margin-bottom: 15px;
}

.container-game-description-text img {
    max-width: 100%;
    border-radius: 12px;
}

/* Right Column: Sidebar */
.game-sidebar-column {
    background: transparent;
}

.sidebar-title {
    color: #4C35E0;
    font-size: 1.2rem; /* Smaller font size like "Similar Games" in image */
    font-weight: 700;
    margin-bottom: 20px;
    border-bottom: none;
}

/* Similar Games — 与首页 .grid-games 列数一致，全宽展示在下方 */
.grid-similar-games.sidebar-mode {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 24px;
    width: 100%;
    min-width: 0;
}

/* Compact Similar Game Card for Sidebar */
.card-similar-game-sidebar {
    background: transparent; /* No background */
    overflow: hidden; /* Ensure content stays within bounds */
    box-shadow: none; /* No shadow */
    transition: transform 0.2s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    gap: 8px; /* Gap between image and text */
    min-width: 0; /* Critical: prevents grid item from overflowing */
    width: 100%; /* Ensure it takes full width of grid cell */
}

.card-similar-game-sidebar:hover {
    transform: none; /* Remove lift */
    box-shadow: none;
}

.sidebar-game-image-wrapper {
    width: 100%;
    padding-bottom: 75%; /* 4:3 Aspect Ratio */
    position: relative;
    background: #eee;
    border-radius: 16px; /* Rounded image corners */
    overflow: hidden;
}

.sidebar-game-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.card-similar-game-sidebar:hover .sidebar-game-image {
    transform: scale(1.05); /* Zoom effect on hover */
}

.sidebar-game-info {
    padding: 0; /* No padding */
}

.sidebar-game-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.sidebar-game-info .game-star {
    margin: 2px 0 4px;
    color: #ffb300;
    font-size: 0.82rem;
    line-height: 1;
}

.sidebar-game-info .game-star i,
.sidebar-game-info .game-star span {
    color: #ffb300;
}

.sidebar-game-dev {
    font-size: 0.8rem;
    color: #666;
    font-weight: 400;
}

/* COLLECTIONS SECTION - Reused from Home */
.collections-section {
    padding-top: 60px;
    padding-bottom: 40px;
    border-top: 1px solid #eee;
    margin-top: 40px;
}

.collections-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 20px;
}

.collection-card {
    position: relative;
    height: 180px;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.collection-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.collection-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    z-index: 1;
}

.collection-card:hover .collection-bg-image {
    transform: scale(1.05);
}

.collection-content {
    position: relative;
    z-index: 2;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    width: 100%;
}

/* Card Specific Styles (Gradients) */
.style-exclusive .collection-content {
    background: linear-gradient(180deg, rgba(82, 107, 255, 0) 0%, rgba(68, 48, 230, 0.9) 100%);
}

.style-hot .collection-content {
    background: linear-gradient(180deg, rgba(255, 117, 85, 0) 0%, rgba(212, 53, 22, 0.9) 100%);
}

.style-brain .collection-content {
    background: linear-gradient(180deg, rgba(63, 206, 158, 0) 0%, rgba(13, 161, 107, 0.9) 100%);
}

.style-purchase .collection-content {
    background: linear-gradient(180deg, rgba(160, 97, 255, 0) 0%, rgba(95, 43, 226, 0.9) 100%);
}


.collection-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.collection-info h3 {
    color: white;
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.collection-count {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
    font-weight: 500;
    margin: 0;
}

.collection-btn {
    background: #4C35E0;
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}

.collection-btn:hover {
    background: #6a55e6;
    transform: translateX(2px);
}

.collection-btn i {
    font-size: 0.7rem;
}

.game-frame {
    width: 100%;
    height: 100%;
    border: none;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 20;
    background: #000;
}

.game-hero-card.playing {
    padding: 0;
    background: var(--color-bg-secondary, #ffffff);
}

.game-hero-card.playing .hero-detail-panel {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.game-hero-card.playing .hero-card-main {
    align-items: stretch;
    padding: 0;
    position: relative;
    align-self: stretch;
    min-height: 0;
    justify-content: stretch;
}

.game-hero-card.playing .play-tgn-0002-inline__dialog {
    flex: 1;
    min-height: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.modal-game {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  display: none; /* Hidden by default */
}

.modal-game-content {
  width: 95%;
  height: 95%;
  background: var(--color-bg-primary);
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-game-header {
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  border-bottom: 1px solid #eee;
}

.title-modal-game {
  font-weight: 700;
  font-size: 18px;
  color: #333;
}

.button-close-modal-game {
  background: transparent;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #333;
}

.modal-game-body {
  flex: 1;
  background: #000;
}

#gameIframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* 6. RESPONSIVE — 相似游戏网格与首页同步 */
@media (max-width: 1200px) {
    .grid-similar-games.sidebar-mode {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .game-sidebar-column {
        margin-top: 20px;
    }

    .grid-similar-games.sidebar-mode {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .container-game-details {
        padding: var(--container-padding);
    }

    .container-game-details .ad-content {
        min-width: 0;
        max-width: 100%;
    }
    
    .game-hero-card {
        --hero-card-height: 640px;
        --hero-top-mask-height: 48px;
        --hero-bottom-mask-height: 62px;
        margin-bottom: 20px;
    }

    .hero-detail-panel {
        padding: 20px 15px 12px;
    }

    .game-unavailable {
        padding: 34px 18px;
    }

    .game-unavailable__title {
        font-size: 1.4rem;
    }

    .game-description-section {
        padding: 0;
    }

    .game-description-section h3 {
        font-size: 1.2rem;
        margin-bottom: 15px;
    }

    .collections-section {
        padding-top: 30px;
        margin-top: 20px;
    }

    .collections-grid {
        grid-template-columns: repeat(1, 1fr);
        gap: 12px;
    }

    .collection-card {
        height: 140px;
    }

    .collection-info h3 {
        font-size: 1rem;
    }

    .grid-similar-games.sidebar-mode {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .sidebar-game-title {
        font-size: 0.9rem;
        line-height: 1.3;
    }

    .sidebar-game-info .game-star {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        white-space: nowrap;
        font-size: 0.78rem;
        line-height: 1;
    }

    .sidebar-game-info .game-star i,
    .sidebar-game-info .game-star span,
    .sidebar-game-info .game-star .star-icon {
        flex-shrink: 0;
    }

    .sidebar-game-info .brief-comment-game {
        font-size: 0.75rem;
        line-height: 1.35;
    }
}

@media (max-width: 480px) {
    .game-hero-card {
        --hero-card-height: 580px;
        --hero-top-mask-height: 44px;
        --hero-bottom-mask-height: 58px;
    }

    .hero-detail-panel {
        padding: 16px 10px 10px;
    }

    .game-unavailable__icon {
        width: 72px;
        height: 72px;
        border-radius: 20px;
        font-size: 34px;
        margin-bottom: 18px;
    }
    
    .hero-game-image-wrapper {
        width: 120px;
        height: 120px;
    }
    
    .hero-game-title {
        font-size: 1.3rem;
    }
    
    .hero-play-btn {
        padding: 12px 30px;
        font-size: 1rem;
    }

    .hero-game-actions {
        margin-top: 0;
        padding-top: 0;
    }

    .hero-game-actions__right {
        gap: 6px;
    }

    .hero-game-actions .play-tgn-0001__btn span,
    .hero-game-actions .play-tgn-0002__btn span {
        display: none;
    }

    .hero-game-actions .play-tgn-0001__pill,
    .hero-game-actions .play-tgn-0001__btn,
    .hero-game-actions .play-tgn-0002__pill,
    .hero-game-actions .play-tgn-0002__btn {
        padding: 8px 10px;
        min-width: 38px;
        min-height: 38px;
        justify-content: center;
    }

    .grid-similar-games.sidebar-mode {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }

    .collections-grid {
        grid-template-columns: repeat(1, 1fr);
        gap: 8px;
    }

    .collection-card {
        height: 120px;
    }
}

/* Unified single-line truncation for game titles in lists */
.game-title,
.title-game,
.title-similar-game,
.card-title,
.sidebar-game-title,
.recommended-name,
.new-game-title {
  display: block;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.game-info,
.container-game-info,
.sidebar-game-info,
.card-content,
.recommended-info,
.game-meta {
  min-width: 0;
}

/* FAQ Section — detail page */
.faq-section { margin-top: 14px; margin-bottom: 16px; }
.faq-title {
  font-size: 1.05rem;
  color: var(--star-white, var(--color-text-primary, var(--text-primary, var(--text-white, var(--text-color, #fff)))));
  margin: 0;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
  padding: 12px 14px;
  background: var(--space-blue, var(--color-bg-secondary, var(--color-bg-card, var(--bg-secondary, var(--glass-bg, rgba(0, 0, 0, 0.25))))));
  border: 1px solid var(--line-soft, rgba(78, 205, 196, 0.35));
  border-radius: var(--g16-radius, var(--radius-lg, var(--border-radius-lg, 12px)));
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.faq-title::-webkit-details-marker {
  display: none;
}

.faq-title:hover {
  border-color: var(--comet-cyan, var(--color-primary, var(--primary-color, var(--accent-cyan, rgba(78, 205, 196, 0.6)))));
  box-shadow: var(--shadow-glow, 0 0 12px rgba(78, 205, 196, 0.12));
}
.faq-section[open] .faq-title {
  border-radius: var(--g16-radius, var(--radius-lg, var(--border-radius-lg, 12px))) var(--g16-radius, var(--radius-lg, var(--border-radius-lg, 12px))) 0 0;
  border-bottom: none;
}
.faq-section-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 50%;
  border: none;
  background: #2196f3;
  box-shadow: 0 2px 8px rgba(33, 150, 243, 0.35);
}
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
  background: var(--space-blue, var(--color-bg-secondary, var(--color-bg-card, var(--bg-secondary, var(--glass-bg, rgba(0, 0, 0, 0.25))))));
  border: 1px solid var(--line-soft, rgba(78, 205, 196, 0.35));
  border-top: none;
  border-radius: 0 0 var(--g16-radius, var(--radius-lg, var(--border-radius-lg, 12px))) var(--g16-radius, var(--radius-lg, var(--border-radius-lg, 12px)));
}
.faq-item {
  background: var(--color-bg-tertiary, rgba(11, 13, 23, 0.6));
  border: 1px solid var(--line-soft, rgba(78, 205, 196, 0.2));
  border-radius: var(--g16-radius, var(--radius-md, 10px));
  overflow: hidden;
}
.faq-question {
  padding: 14px 16px;
  font-weight: 700;
  color: var(--star-white, var(--color-text-primary, var(--text-primary, var(--text-white, #fff))));
  border-left: 4px solid var(--comet-cyan, var(--color-primary, var(--primary-color, var(--accent-cyan, #4ecdc4))));
}
.faq-answer {
  padding: 12px 16px 16px;
  color: var(--ink-muted, var(--color-text-secondary, var(--text-muted, var(--text-gray, rgba(240, 244, 248, 0.75)))));
  line-height: 1.55;
  border-top: 1px solid var(--line-soft, rgba(78, 205, 196, 0.15));
}
.faq-answer a {
  color: var(--comet-cyan, var(--color-primary, var(--primary-color, var(--accent-cyan, #4ecdc4))));
}
.faq-section-toggle .fa,
.faq-section-toggle .fa-chevron-right,
.faq-section-toggle i {
  display: block;
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border: none;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  background: transparent;
  transform: rotate(-45deg);
  transition: transform var(--transition-normal, 0.25s ease);
  font-size: 0 !important;
  line-height: 0 !important;
  overflow: visible;
  box-sizing: border-box;
}

.faq-section-toggle .fa::before,
.faq-section-toggle .fa-chevron-right::before,
.faq-section-toggle i::before {
  display: none !important;
  content: "" !important;
}

.faq-section[open] .faq-section-toggle .fa,
.faq-section[open] .faq-section-toggle .fa-chevron-right,
.faq-section[open] .faq-section-toggle i {
  transform: rotate(45deg);
}
.faq-answer p { margin: 0 0 10px; }
.faq-answer p:last-child { margin-bottom: 0; }

/* Game detail metadata */
.detail-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin: 6px 0 0;
  padding: 8px 0;
  border-top: 1px solid var(--ink-rule, rgba(0, 0, 0, 0.12));
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--ink-muted, var(--color-text-muted, #64748b));
}

.detail-facts .game-developer,
.detail-facts .game-publish-date,
.detail-facts .game-update-time {
  margin: 0;
}

.detail-facts + .detail-content-section > h2:first-child,
.detail-facts + .detail-content-section > .detail-split-block:first-child h2,
.detail-facts + .detail-content-sections {
  margin-top: 0;
}

.detail-facts + .detail-content-section > h2:first-child,
.detail-facts + .detail-content-section > .detail-split-block:first-child > h2 {
  margin-top: 12px;
  padding-top: 0;
  border-top: none;
}

.hero-game-developer.detail-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--ink-muted, var(--color-text-muted, #94a3b8));
  margin: 8px 0;
}
.hero-game-developer.detail-facts .game-developer,
.hero-game-developer.detail-facts .game-publish-date,
.hero-game-developer.detail-facts .game-update-time {
  margin: 0;
}

/* Detail page ad slots — match content width, no extra horizontal padding */
.container-game-details .g-legacy-ad-band,
.container-game-details-content .g-legacy-ad-band {
  width: 100%;
  max-width: 100%;
  margin: 16px 0;
  padding: 0;
  overflow: hidden;
  box-sizing: border-box;
}

.container-game-details .g-legacy-ad-band .container,
.container-game-details .g-legacy-ad-band .ad-container,
.container-game-details .g-legacy-ad-band .banner-ad,
.container-game-details .g-legacy-ad-band .ad-content,
.container-game-details-content .g-legacy-ad-band .container,
.container-game-details-content .g-legacy-ad-band .ad-container,
.container-game-details-content .g-legacy-ad-band .ad-content {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  box-sizing: border-box !important;
}

.container-game-details .g-legacy-ad-band .ad-content,
.container-game-details-content .g-legacy-ad-band .ad-content {
  display: block !important;
  min-width: 0 !important;
  min-height: 250px;
  height: auto !important;
}

.container-game-details .g-legacy-ad-band iframe,
.container-game-details .g-legacy-ad-band ins,
.container-game-details .g-legacy-ad-band .ad-container > div,
.container-game-details-content .g-legacy-ad-band iframe,
.container-game-details-content .g-legacy-ad-band ins,
.container-game-details-content .g-legacy-ad-band .ad-container > div {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin-left: auto !important;
  margin-right: auto !important;
  display: block !important;
  box-sizing: border-box !important;
}

/* Mobile description collapse — base styles (theme via CSS variables in each template details.css) */
.description-toggle-btn {
  display: none;
}

@media (max-width: 768px) {
  .description-collapse-section {
    display: flex;
    flex-direction: column;
  }

  .description-collapse-section .description-text-wrap {
    position: relative;
    overflow: hidden;
    transition: max-height 0.35s ease;
    width: 100%;
  }

  .description-collapse-section .description-text-wrap.is-collapsed {
    max-height: var(--desc-collapse-height, 180px);
  }

  .description-collapse-section .description-text-wrap.is-expanded {
    max-height: 5000px;
  }

  .description-collapse-section .description-text-wrap.is-collapsed > * {
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
  }

  .description-collapse-section .description-text-wrap.is-collapsed > .container-game-description-text,
  .description-collapse-section .description-text-wrap.is-collapsed > .detail-section-body,
  .description-collapse-section .description-text-wrap.is-collapsed > .overview-text,
  .description-collapse-section .description-text-wrap.is-collapsed > .overview-panel-body,
  .description-collapse-section .description-text-wrap.is-collapsed > .rich-content,
  .description-collapse-section .description-text-wrap.is-collapsed > .description-rich,
  .description-collapse-section .description-text-wrap.is-collapsed > .game-description {
    border-bottom: none;
  }

  .description-collapse-section .description-text-wrap.is-collapsed::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: var(--desc-collapse-fade-height, 48px);
    pointer-events: none;
    background: linear-gradient(
      to bottom,
      var(--desc-collapse-fade-from, transparent),
      var(--desc-collapse-fade-to, var(--color-bg-secondary, var(--bg-card, var(--card-bg, var(--space-dark, #fff)))))
    );
  }

  .description-collapse-section .description-text-wrap.is-expanded::after {
    display: none;
  }

  .description-collapse-section .description-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 0;
    padding: var(--desc-collapse-btn-padding, 10px 14px);
    border: var(--desc-collapse-btn-border, 1px solid var(--color-border, rgba(255, 255, 255, 0.12)));
    border-top: var(--desc-collapse-btn-border-top, 1px solid rgba(0, 245, 255, 0.14));
    border-left: var(--desc-collapse-btn-accent-border, 4px solid var(--desc-collapse-btn-accent, var(--color-primary, var(--primary-color, #00f5ff))));
    border-radius: var(--desc-collapse-btn-radius, 0 0 var(--radius-lg, var(--g17-radius, 12px)) var(--radius-lg, var(--g17-radius, 12px)));
    background: var(--desc-collapse-btn-bg, linear-gradient(135deg, rgba(0, 245, 255, 0.07), rgba(255, 0, 255, 0.04)));
    color: var(--desc-collapse-btn-color, var(--color-primary-light, var(--color-primary, var(--primary-color, #7df9ff))));
    font-family: inherit;
    font-size: var(--desc-collapse-btn-font-size, 13px);
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    box-shadow: var(--desc-collapse-btn-shadow, inset 0 1px 0 rgba(255, 255, 255, 0.05));
    transition:
      background var(--transition-fast, 0.15s ease),
      border-color var(--transition-fast, 0.15s ease),
      color var(--transition-fast, 0.15s ease),
      box-shadow var(--transition-fast, 0.15s ease),
      transform var(--transition-fast, 0.15s ease);
  }

  .description-collapse-section .description-toggle-btn::after {
    content: '';
    flex-shrink: 0;
    width: 7px;
    height: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-1px);
    transition: transform var(--transition-normal, 0.3s ease);
    opacity: 0.85;
  }

  .description-collapse-section .description-toggle-btn[aria-expanded='true'] {
    margin-top: 8px;
    border-radius: var(--desc-collapse-btn-radius-expanded, var(--radius-lg, var(--g17-radius, 12px)));
    border-top: var(--desc-collapse-btn-border, 1px solid var(--color-border, rgba(255, 255, 255, 0.12)));
  }

  .description-collapse-section .description-toggle-btn[aria-expanded='true']::after {
    transform: rotate(-135deg) translateY(1px);
  }

  .description-collapse-section .description-toggle-btn:hover,
  .description-collapse-section .description-toggle-btn:focus-visible {
    background: var(--desc-collapse-btn-bg-hover, linear-gradient(135deg, rgba(0, 245, 255, 0.12), rgba(255, 0, 255, 0.07)));
    border-color: var(--desc-collapse-btn-border-hover, rgba(0, 245, 255, 0.35));
    color: var(--desc-collapse-btn-color-hover, var(--desc-collapse-btn-accent, var(--color-primary, #00f5ff)));
    box-shadow: var(--desc-collapse-btn-shadow-hover, inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 14px rgba(0, 245, 255, 0.12));
    outline: none;
  }

  .description-collapse-section .description-toggle-btn[hidden] {
    display: none !important;
  }

  /* Pill variant (cute / rounded themes) */
  .description-collapse-section.desc-collapse--pill .description-toggle-btn {
    align-self: center;
    width: auto;
    min-width: 140px;
    margin-top: 8px;
    padding: 8px 20px;
    border: 2px solid var(--desc-collapse-btn-accent, var(--primary-color, #ff69b4));
    border-left: 2px solid var(--desc-collapse-btn-accent, var(--primary-color, #ff69b4));
    border-radius: 50px;
    background: var(--desc-collapse-btn-bg, #fff);
    color: var(--desc-collapse-btn-color, var(--secondary-color, #ff1493));
    box-shadow: var(--desc-collapse-btn-shadow, 0 2px 12px rgba(255, 105, 180, 0.22));
  }

  .description-collapse-section.desc-collapse--pill .description-toggle-btn::after {
    display: none;
  }

  .description-collapse-section.desc-collapse--pill .description-toggle-btn::before {
    content: '+';
    font-size: 14px;
    line-height: 1;
    font-weight: 700;
  }

  .description-collapse-section.desc-collapse--pill .description-toggle-btn[aria-expanded='true']::before {
    content: '−';
  }

  .description-collapse-section.desc-collapse--pill .description-toggle-btn:hover,
  .description-collapse-section.desc-collapse--pill .description-toggle-btn:focus-visible {
    background: var(--desc-collapse-btn-bg-hover, linear-gradient(45deg, var(--primary-color, #ff69b4), var(--secondary-color, #ff1493)));
    border-color: transparent;
    color: var(--desc-collapse-btn-color-hover, var(--light-text, #fff));
    transform: scale(1.04);
    box-shadow: var(--desc-collapse-btn-shadow-hover, 0 6px 18px rgba(255, 20, 147, 0.4));
  }

  /* Neo-brutalist variant */
  .description-collapse-section.desc-collapse--brutalist .description-toggle-btn {
    align-self: flex-start;
    width: auto;
    min-width: 120px;
    margin-top: 10px;
    padding: 10px 18px;
    border: var(--g17-border, var(--g23-border, 3px solid #1a1625));
    border-left: var(--g17-border, var(--g23-border, 3px solid #1a1625));
    border-radius: var(--g17-radius-sm, var(--g23-radius-sm, 8px));
    background: var(--desc-collapse-btn-bg, var(--nebula-pink, #ff5c47));
    color: var(--desc-collapse-btn-color, var(--star-white, #1a1625));
    box-shadow: var(--desc-collapse-btn-shadow, 3px 3px 0 #1a1625);
    font-weight: 800;
  }

  .description-collapse-section.desc-collapse--brutalist .description-toggle-btn::after {
    display: none;
  }

  .description-collapse-section.desc-collapse--brutalist .description-toggle-btn:hover,
  .description-collapse-section.desc-collapse--brutalist .description-toggle-btn:focus-visible {
    background: var(--desc-collapse-btn-bg-hover, var(--comet-cyan, #0d9488));
    transform: translate(1px, 1px);
    box-shadow: var(--desc-collapse-btn-shadow-hover, 2px 2px 0 #1a1625);
  }

  .description-collapse-section.desc-collapse--brutalist .description-toggle-btn[aria-expanded='true'] {
    border-radius: var(--g17-radius-sm, var(--g23-radius-sm, 8px));
  }
}

/* Mobile description collapse — theme */
@media (max-width: 768px) {
  :root {
    --desc-collapse-fade-to: var(--color-bg-secondary, var(--bg-card, var(--card-bg, var(--space-dark, #fff))));
    --desc-collapse-btn-accent: var(--color-primary, var(--primary-color, var(--nebula-pink, #2563eb)));
    --desc-collapse-btn-color: var(--color-primary-light, var(--color-primary, var(--primary-color, var(--g17-accent-text, #2563eb))));
  }
}

/* Detail modal close - themed to match play_tgn close */
#game-modal.detail-game-modal .detail-game-modal__title {
  display: none !important;
}

#game-modal.detail-game-modal .detail-game-modal__bar {
  display: flex !important;
  align-items: center;
  justify-content: flex-end;
  min-height: 48px;
  padding: 8px 12px;
  background: #ffffff;
  border-bottom: 1px solid var(--color-border, #E4E4E4);
}

#game-modal.detail-game-modal .detail-game-modal__close {
  display: grid !important;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 2px solid var(--color-primary, #6C5DD3);
  border-radius: var(--radius-full, 9999px);
  background: var(--color-bg-tertiary, #e4e4e4);
  color: var(--color-primary, #6C5DD3);
  font-size: 24px;
  line-height: 1;
  box-shadow: none;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

#game-modal.detail-game-modal .detail-game-modal__close:hover {
  background: var(--color-primary, #6C5DD3);
  color: #fff;
  border-color: var(--color-primary, #6C5DD3);
}

