/* ==========================================================
   详情页 detail.php 专属样式（公共骨架/导航/页脚见 css/style.css）
   ========================================================== */

/* ---------- 返回链接 ---------- */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #0071e3;
    font-size: 14px;
    text-decoration: none;
    margin-bottom: 22px;
}
.back-link:hover {
    text-decoration: underline;
    color: #0071e3;
}

/* ---------- 应用头部 ---------- */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}
.app-header-info {
    display: flex;
    align-items: center;
    gap: 24px;
    min-width: 0;
    flex: 1 1 0;
}
.app-header-icon {
    width: 150px;
    height: 150px;
    border-radius: 34px;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12);
}
.app-header-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.app-header-meta {
    min-width: 0;
    flex: 1 1 auto;
}
.app-header-title {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 6px;
}
.app-header-subtitle {
    font-size: 15px;
    color: #86868b;
    margin-bottom: 10px;
}
.app-header-developer {
    font-size: 15px;
    color: #0071e3;
    text-decoration: none;
}
.app-header-developer:hover {
    text-decoration: underline;
    color: #0071e3;
}
/* 标题下的相关标签 */
.app-header-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.app-header-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-size: 13px;
    line-height: 1.6;
    text-decoration: none;
    transition: background-color 0.18s, color 0.18s;
}
.app-header-tag i {
    font-size: 11px;
    opacity: 0.65;
}
.app-header-tag:hover {
    background: #0071e3;
    color: #fff;
    text-decoration: none;
}
.app-header-tag:hover i {
    opacity: 0.9;
}
.app-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}
.share-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid #e5e5ea;
    background: #ffffff;
    color: #0071e3;
    font-size: 16px;
    display: grid;
    place-items: center;
    transition: background-color 0.2s;
}
.share-btn:hover {
    background: #f5f5f7;
}
.get-btn {
    background-color: #0071e3;
    color: #ffffff;
    border: none;
    border-radius: 999px;
    padding: 10px 34px;
    font-size: 16px;
    font-weight: 500;
    transition: background-color 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.get-btn:hover {
    background-color: #0060c0;
    color: #ffffff;
}

/* ---------- 关键信息条 ---------- */
.info-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin: 30px 0;
    border-top: 1px solid #e5e5ea;
    border-bottom: 1px solid #e5e5ea;
}
.info-strip-item {
    padding: 14px 22px;
    border-right: 1px solid #e5e5ea;
}
.info-strip-item:last-child {
    border-right: none;
}
.info-strip-label {
    font-size: 11px;
    font-weight: 600;
    color: #86868b;
    letter-spacing: 0.02em;
    margin-bottom: 4px;
}
.info-strip-value {
    font-size: 16px;
    font-weight: 600;
    color: #1d1d1f;
    display: flex;
    align-items: center;
    gap: 6px;
}
.strip-stars {
    color: #ff9500;
    font-size: 11px;
    letter-spacing: 1px;
}

/* ---------- 截图横向滚动（自适应：竖屏/横屏截图均完整展示，不裁剪） ---------- */
.screenshot-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 6px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    align-items: flex-start;
}
.screenshot-scroll::-webkit-scrollbar {
    display: none;
}
.screenshot-item {
    flex: 0 0 auto;
    width: auto;
    height: auto;
    line-height: 0;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid #e5e5ea;
    scroll-snap-align: start;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    cursor: zoom-in;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
}
.screenshot-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}
.screenshot-item img {
    /* 图片多大显示多大，仅按最大高度约束（竖屏横屏均不裁剪、不留白） */
    display: block;
    width: auto;
    height: auto;
    max-height: clamp(240px, 24vw, 320px);
}
/* 宣传视频：尺寸规则与图片一致 */
.screenshot-item.video-item {
    cursor: default;
}
.screenshot-item.video-item video {
    display: block;
    width: auto;
    height: auto;
    max-height: clamp(240px, 24vw, 320px);
    background: #000;
}

/* ---------- 相册左右悬浮箭头（常显） ---------- */
.screenshot-wrap {
    position: relative;
}
.screenshot-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.06);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14);
    color: #1d1d1f;
    font-size: 24px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    opacity: 1;
    transition: background 0.2s;
}
.screenshot-nav i { pointer-events: none; }
.screenshot-nav:hover { background: #ffffff; }
.screenshot-nav.prev { left: 14px; }
.screenshot-nav.next { right: 14px; }
/* 到头的一侧 / 内容不满一屏时隐藏 */
.screenshot-nav.disabled,
.screenshot-wrap.no-scroll .screenshot-nav {
    opacity: 0 !important;
    pointer-events: none !important;
}

/* ---------- 下载渠道 ---------- */
.download-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    border: 1px solid #e5e5ea;
    border-radius: 16px;
    background: #ffffff;
    text-decoration: none;
    color: inherit;
    height: 100%;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.download-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border-color: #d0d0d6;
    color: inherit;
}
.download-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-size: 24px;
    flex-shrink: 0;
}
.download-icon.win { background: #e8f0fe; color: #0071e3; }
.download-icon.android { background: #e6f7ec; color: #34a853; }
.download-icon.ios { background: #f0f0f5; color: #1d1d1f; }
.download-meta {
    flex: 1;
    min-width: 0;
}
.download-name {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 3px;
}
.download-desc {
    font-size: 12px;
    color: #86868b;
}
.download-arrow {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #f5f5f7;
    color: #1d1d1f;
    font-size: 14px;
    flex-shrink: 0;
    transition: background 0.2s, color 0.2s;
}
.download-card:hover .download-arrow {
    background: #0071e3;
    color: #ffffff;
}

/* ---------- 通用区块 ---------- */
.detail-section {
    padding: 30px 0;
    border-bottom: 1px solid #e5e5ea;
}
.detail-section:last-of-type {
    border-bottom: none;
}
.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 16px;
}
.section-head-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #1d1d1f;
    text-decoration: none;
}
.section-head-title:hover {
    color: #0071e3;
}
/* 区块标题旁的补充说明（如专辑名称） */
.section-head-sub {
    font-size: 13px;
    font-weight: 400;
    color: #86868b;
    background: #f1f5f9;
    border-radius: 999px;
    padding: 2px 10px;
    line-height: 1.7;
}
.section-head-link {
    font-size: 15px;
    color: #0071e3;
    text-decoration: none;
    flex-shrink: 0;
}
.section-head-link:hover {
    text-decoration: underline;
    color: #0071e3;
}

/* ---------- 游戏介绍（正文排版，自适应桌面/手机） ---------- */
.description-text {
    font-size: 15px;
    line-height: 1.75;
    color: #1d1d1f;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-height: 300px;
    overflow: hidden;
    position: relative;
    transition: max-height 0.35s ease;
}
.description-text.expanded {
    max-height: 8000px;
}
/* 编辑器遗留的内联固定宽度，统一约束 */
.description-text p,
.description-text div,
.description-text span,
.description-text section {
    max-width: 100%;
}
.description-text p {
    margin: 0 0 14px;
}
.description-text p:last-child {
    margin-bottom: 0;
}
.description-text h2,
.description-text h3,
.description-text h4 {
    font-size: 17px;
    font-weight: 700;
    color: #1d1d1f;
    margin: 22px 0 12px;
    padding-left: 10px;
    border-left: 3px solid #0071e3;
    line-height: 1.4;
}
.description-text h3 { font-size: 16px; }
.description-text h4 { font-size: 15px; }
.description-text strong,
.description-text b { font-weight: 600; }
.description-text a {
    color: #0071e3;
    text-decoration: none;
    border-bottom: 1px solid rgba(0, 113, 227, 0.35);
    transition: border-color 0.2s;
}
.description-text a:hover { border-bottom-color: #0071e3; }
.description-text img {
    /* 响应式图片：不撑破容器，保持比例，圆角与卡片风格统一 */
    display: block;
    max-width: 100% !important;
    width: auto;
    height: auto !important;
    margin: 14px auto;
    border-radius: 14px;
    border: 1px solid #e5e5ea;
    cursor: zoom-in;
}
.description-text video,
.description-text iframe,
.description-text embed {
    display: block;
    max-width: 100%;
    margin: 14px auto;
    border-radius: 14px;
}
.description-text iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    border: none;
}
.description-text ul,
.description-text ol {
    margin: 0 0 14px;
    padding-left: 22px;
}
.description-text li { margin-bottom: 6px; }
.description-text li:last-child { margin-bottom: 0; }
.description-text ul li::marker { color: #0071e3; }
.description-text blockquote {
    margin: 14px 0;
    padding: 10px 16px;
    border-left: 3px solid #d0d0d6;
    background: #f5f5f7;
    border-radius: 0 10px 10px 0;
    color: #86868b;
    font-size: 14px;
}
.description-text blockquote p:last-child { margin-bottom: 0; }
.description-text table {
    width: 100%;
    border-collapse: collapse;
    margin: 14px 0;
    font-size: 14px;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.description-text th,
.description-text td {
    border: 1px solid #e5e5ea;
    padding: 8px 12px;
    text-align: left;
    white-space: nowrap;
}
.description-text th {
    background: #f5f5f7;
    font-weight: 600;
}
.description-text hr {
    border: none;
    border-top: 1px solid #e5e5ea;
    margin: 20px 0;
}
.description-text code {
    background: #f5f5f7;
    border: 1px solid #e5e5ea;
    border-radius: 6px;
    padding: 1px 6px;
    font-size: 13px;
    color: #c7254e;
}
.more-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 18px auto 0;
    min-width: 160px;
    height: 42px;
    padding: 0 36px;
    background: #ffffff;
    border: 1px solid #e5e5ea;
    border-radius: 999px;
    color: #1d1d1f;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.more-btn:hover {
    border-color: #1d1d1f;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}
.more-btn i {
    font-size: 13px;
    color: #86868b;
    transition: transform 0.25s;
}
.more-btn.expanded i {
    transform: rotate(180deg);
}

/* ---------- 版本 ---------- */
.version-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 14px;
    color: #86868b;
}
.version-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.version-list li {
    font-size: 15px;
    line-height: 1.6;
    color: #1d1d1f;
    padding-left: 18px;
    position: relative;
    margin-bottom: 8px;
}
.version-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 9px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #0071e3;
}

/* ---------- 评分总览 ---------- */
.rating-overview {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-bottom: 26px;
}
.rating-score-big {
    text-align: center;
    flex-shrink: 0;
}
.rating-score-big .num {
    font-size: 56px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
}
.rating-score-big .sub {
    font-size: 12px;
    color: #86868b;
    margin-top: 8px;
}
.rating-bars {
    flex: 1;
    max-width: 420px;
}
.rating-bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 7px;
    font-size: 12px;
    color: #86868b;
}
.rating-bar-row .bar-label {
    width: 28px;
    flex-shrink: 0;
}
.rating-bar-track {
    flex: 1;
    height: 6px;
    background: #e5e5ea;
    border-radius: 99px;
    overflow: hidden;
}
.rating-bar-fill {
    height: 100%;
    background: #1d1d1f;
    border-radius: 99px;
}

/* ---------- 评价卡片 ---------- */
.review-card {
    background: #f5f5f7;
    border-radius: 14px;
    padding: 18px;
    height: 100%;
}
.review-stars {
    color: #ff9500;
    font-size: 12px;
    letter-spacing: 1px;
    margin-bottom: 8px;
}
.review-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
}
.review-body {
    font-size: 14px;
    line-height: 1.55;
    color: #1d1d1f;
}
.review-author {
    font-size: 12px;
    color: #86868b;
    margin-top: 12px;
}

/* ---------- 信息两列 ---------- */
.info-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 44px;
}
.info-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid #e5e5ea;
    font-size: 14px;
}
.info-row:last-child {
    border-bottom: none;
}
.info-row-label {
    color: #86868b;
    flex-shrink: 0;
}
.info-row-value {
    color: #1d1d1f;
    text-align: right;
    min-width: 0;
    word-break: break-all;
}
.info-row-value a {
    color: #0071e3;
    text-decoration: none;
}
.info-row-value a:hover {
    text-decoration: underline;
}

/* ---------- 相关推荐卡片 ---------- */
.related-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border: 1px solid #e5e5ea;
    border-radius: 14px;
    background: #ffffff;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
}
.related-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.08);
    color: inherit;
}
.related-icon {
    width: 56px;
    height: 56px;
    border-radius: 13px;
    overflow: hidden;
    flex-shrink: 0;
}
.related-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.related-meta {
    min-width: 0;
}
.related-name {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.related-desc {
    font-size: 12px;
    color: #86868b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---------- 图片查看器 Lightbox ---------- */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(10, 10, 12, 0.94);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.28s ease, visibility 0.28s;
}
.lightbox.active {
    opacity: 1;
    visibility: visible;
}
.lb-img {
    max-width: min(88vw, 640px);
    max-height: 86vh;
    border-radius: 18px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
    user-select: none;
    -webkit-user-drag: none;
    display: block;
}
.lb-img.switching {
    animation: lbFade 0.3s ease;
}
@keyframes lbFade {
    from { opacity: 0; transform: scale(0.97); }
    to   { opacity: 1; transform: scale(1); }
}
.lb-btn {
    position: absolute;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    font-size: 18px;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    backdrop-filter: blur(6px);
}
.lb-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}
.lb-close { top: 22px; right: 22px; }
.lb-prev { left: 22px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 22px; top: 50%; transform: translateY(-50%); }
.lb-prev:hover,
.lb-next:hover {
    transform: translateY(-50%) scale(1.06);
}
.lb-counter {
    position: absolute;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.75);
    font-size: 13px;
    background: rgba(255, 255, 255, 0.1);
    padding: 6px 16px;
    border-radius: 999px;
    backdrop-filter: blur(6px);
    white-space: nowrap;
}

/* ---------- 响应式 ---------- */
@media (max-width: 1199px) {
    .main-content { padding: 20px 25px; }
}
@media (max-width: 767px) {
    .app-header { flex-direction: column; align-items: flex-start; gap: 18px; }
    .app-header-info { gap: 16px; }
    .app-header-icon { width: 100px; height: 100px; border-radius: 24px; }
    .app-header-title { font-size: 24px; }
    .app-header-subtitle,
    .app-header-developer { font-size: 14px; }
    .app-header-tags { gap: 6px; }
    .app-header-tag { font-size: 12px; padding: 3px 10px; }
    .app-header-actions { width: 100%; }
    .get-btn { flex: 1; justify-content: center; padding: 10px 20px; font-size: 15px; }
    .info-strip { grid-template-columns: repeat(2, 1fr); }
    .info-strip-item { padding: 12px 15px; border-bottom: 1px solid #e5e5ea; }
    .info-strip-item:nth-child(2n) { border-right: none; }
    .info-strip-item:nth-child(n + 3) { border-bottom: none; }
    .screenshot-item { border-radius: 15px; }
    .screenshot-item img { max-height: clamp(190px, 52vw, 260px); }
    .screenshot-item.video-item video { max-height: clamp(190px, 52vw, 260px); }
    .detail-section { padding: 24px 0; }
    .section-head-title { font-size: 18px; }
    .section-head-link { font-size: 14px; }
    .rating-overview { flex-direction: column; align-items: flex-start; gap: 18px; }
    .rating-bars { width: 100%; max-width: none; }
    .rating-score-big .num { font-size: 44px; }
    .info-cols { grid-template-columns: 1fr; }
    .share-btn { width: 38px; height: 38px; flex-shrink: 0; }
    .download-card { padding: 16px; }

    /* 移动端灯箱 */
    .lb-btn { width: 40px; height: 40px; font-size: 15px; }
    .lb-prev { left: 10px; }
    .lb-next { right: 10px; }
    .lb-close { top: 12px; right: 12px; }
    .lb-img { max-width: 92vw; max-height: 78vh; border-radius: 12px; }
    .lb-counter { bottom: 16px; font-size: 12px; padding: 5px 14px; }
}
