/* Screenshots page - iOS 26 gallery style (unified with app-page-modern) */

.screenshots-page {
    width: 100%;
    background: linear-gradient(180deg, #f4f5f9 0%, #e8ecf1 100%);
    min-height: 100vh;
    padding: 36px 0;
    margin-top: 0;
}

.screenshots-header {
    width: 100%;
    background: linear-gradient(135deg, #0285e5 0%, #0061b8 100%);
    padding: 52px 20px 34px;
    margin-bottom: 30px;
    box-shadow: 0 8px 24px rgba(2, 133, 229, 0.28);
}

.screenshots-header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.screenshots-header-main {
    text-align: center;
    margin-bottom: 20px;
}

.screenshots-title-main {
    margin: 0 0 10px;
    font-size: 2.4em;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.screenshots-badge {
    font-size: 1em;
}

.screenshots-subtitle {
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.05em;
}

.screenshots-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.screenshots-gallery {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(244, 249, 255, 0.82) 100%);
    border: 1px solid rgba(2, 133, 229, 0.08);
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(2, 133, 229, 0.08);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 20px;
}

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

/* 玻璃卡片（参考设计文件） */
.shot-card {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 26px;
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.04), 0 2px 10px 0 rgba(0, 0, 0, 0.02);
    padding: 18px;
    transition: all 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.shot-card:hover {
    border-color: rgba(99, 102, 241, 0.35);
    box-shadow: 0 22px 48px -12px rgba(99, 102, 241, 0.12), 0 4px 16px rgba(0, 0, 0, 0.04);
    transform: translateY(-3px);
}

.shot-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    gap: 12px;
}

.shot-app-info {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.shot-app-info > div {
    min-width: 0;
}

.shot-app-icon {
    width: 48px;
    height: 48px;
    border-radius: 18px;
    object-fit: cover;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 6px 16px rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
    background: #f0f2f5;
}

.shot-app-name {
    margin: 0;
    font-size: 1.1em;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}

.shot-app-name a {
    color: inherit;
    text-decoration: none;
    transition: color .2s ease;
}

.shot-app-name a:hover {
    color: #0285e5;
}

.shot-app-meta {
    margin: 2px 0 0;
    font-size: 0.8em;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.shot-btn-details {
    display: inline-block;
    flex-shrink: 0;
    background: linear-gradient(135deg, #0285e5 0%, #0061b8 100%);
    color: #ffffff;
    padding: 7px 14px;
    border-radius: 999px;
    text-decoration: none;
    font-size: 0.82em;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all .2s ease;
    box-shadow: 0 2px 8px rgba(2, 133, 229, 0.2);
}

.shot-btn-details:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(2, 133, 229, 0.3);
}

/* 横向滚动截图画廊（隐藏滚动条） */
.shot-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 4px 0 10px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x;
}

.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* 展开全部截图：从单行横滚切换为多行铺开 */
.shot-scroll.expanded {
    flex-wrap: wrap;
    overflow: visible;
}

.shot-item {
    flex-shrink: 0;
    cursor: pointer;
    height: 265px;
    width: max-content;
}

.shot-item-frame {
    height: 265px;
    width: max-content;
    border-radius: 14px;
    overflow: hidden;
    background: #f1f5f9;
    position: relative;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(15, 23, 42, 0.08);
    display: inline-block;
}

.shot-item-img {
    height: 265px;
    width: auto;
    max-width: none;
    object-fit: contain;
    display: block;
    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.shot-item:hover .shot-item-img {
    transform: scale(1.05);
}

.shot-empty {
    padding: 30px;
    text-align: center;
    border-radius: 12px;
    background: rgba(2, 133, 229, 0.05);
    color: #4f5d6b;
}

.shot-limit-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 8px auto 0;
    width: fit-content;
    padding: 6px 16px;
    border-radius: 999px;
    background: rgba(2, 133, 229, 0.08);
    border: 1px solid rgba(2, 133, 229, 0.2);
    color: #0269b3;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
}

.shot-limit-hint:hover {
    background: rgba(2, 133, 229, 0.14);
    border-color: rgba(2, 133, 229, 0.32);
    color: #024f85;
}

/* display:flex 会覆盖 [hidden] 的 UA 默认样式，需显式屏蔽 */
.shot-limit-hint[hidden] {
    display: none;
}

.shot-lightbox-nav[hidden] {
    display: none;
}

.shot-limit-icon {
    font-size: 13px;
    line-height: 1;
}

.shot-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.shot-tags {
    display: flex;
    gap: 6px;
}

.shot-tag {
    padding: 4px 10px;
    border-radius: 8px;
    background: #f1f5f9;
    color: #475569;
    font-size: 0.75em;
    font-weight: 600;
}

.shot-count {
    font-size: 0.78em;
    color: #94a3b8;
}

.game_empty {
    margin: 10px;
    padding: 20px;
    text-align: center;
    border-radius: 12px;
    background: rgba(2, 133, 229, 0.05);
    color: #4f5d6b;
}

.screenshots-page #pagination {
    margin: 24px 8px 6px;
    text-align: center;
}

/* 高清截图放大弹窗 (iOS 26 极致通透微粒风格) */
.shot-lightbox {
    position: fixed;
    inset: 0;
    z-index: 50;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: max(16px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
}

.shot-lightbox.open {
    opacity: 1;
    pointer-events: auto;
}

/* 弹窗主体：按图片真实渲染尺寸自适应收缩，不再按横竖屏切换固定宽度，
   避免竖屏时容器过大、横屏时图片被挤压过小 */
.shot-lightbox-content {
    position: relative;
    width: fit-content;
    max-width: min(94vw, 860px);
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(36px) saturate(190%);
    -webkit-backdrop-filter: blur(36px) saturate(190%);
    border-radius: 26px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.65);
    box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.8);
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.shot-lightbox.open .shot-lightbox-content {
    transform: scale(1);
}

/* 关闭按钮：右上角毛玻璃轻量小圆钮 */
.shot-lightbox-close {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    font-size: 0.85em;
    transition: all .2s ease;
    z-index: 15;
}

.shot-lightbox-close:hover {
    background: #e11d48;
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

/* 图片展示台外层包装：随图片尺寸收缩，为左右箭头提供定位基准 */
.shot-lightbox-stage {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
}

/* 图片暗调展示框：完全贴合图片真实渲染尺寸，横竖屏均不留多余空白 */
.shot-lightbox-frame {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    overflow: hidden;
    background: radial-gradient(circle at center, #1e2430 0%, #0c0f14 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
    position: relative;
}

.shot-lightbox-frame img {
    display: block;
    /* 弹窗图片最大显示尺寸（竖屏）：想微调弹窗大小只需改这两个值（宽度上限 / 高度上限） */
    max-width: min(82vw, 640px);
    max-height: min(64vh, 560px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

/* 横屏截图独立放宽上限，避免被竖屏窄宽度限制显得过小 */
.shot-lightbox-frame.landscape img {
    max-width: min(92vw, 980px);
    max-height: min(58vh, 540px);
}

/* 左右箭头：参考 Info 详情页翻页按钮（小巧圆角矩形、贴图片左右缘、垂直居中） */
.shot-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 12;
    width: 42px;
    height: 26px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.shot-lightbox-nav:hover {
    background: rgba(2, 133, 229, 0.9);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-50%) scale(1.06);
    box-shadow: 0 6px 16px rgba(2, 133, 229, 0.4);
}

.shot-lightbox-prev {
    left: 10px;
}

.shot-lightbox-next {
    right: 10px;
}

/* 弹窗底部操作栏：完全居中、文字+按钮垂直排列 */
.shot-lightbox-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    text-align: center;
    width: 100%;
}

.shot-lightbox-caption {
    text-align: center;
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    line-height: 1.4;
    max-width: 90%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shot-lightbox-action {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

/* 查看大图按钮：iOS 26 ghost 轻量胶囊（细边框蓝字），hover 填充品牌蓝 */
.shot-lightbox-full {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 5px 16px;
    border-radius: 999px;
    background: transparent;
    color: #0285e5;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid rgba(2, 133, 229, 0.45);
    text-decoration: none;
    transition: all 0.2s ease;
}

.shot-lightbox-full:hover {
    background: #0285e5;
    color: #ffffff;
    border-color: #0285e5;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(2, 133, 229, 0.35);
}

.shot-ext-icon {
    display: inline-block;
    vertical-align: middle;
    stroke-width: 2.2;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.shot-lightbox-full:hover .shot-ext-icon {
    transform: translate(1px, -1px);
}

@media (max-width: 768px) {
    .screenshots-page {
        padding: 24px 0;
    }

    .screenshots-header {
        padding: 36px 14px 26px;
    }

    .screenshots-title-main {
        font-size: 1.8em;
    }

    .screenshots-subtitle {
        font-size: 0.95em;
    }

    .screenshots-container {
        padding: 0 14px;
    }

    .screenshots-gallery {
        padding: 14px;
    }

    .shot-lightbox-content {
        max-width: calc(100vw - 20px);
        padding: 10px;
        border-radius: 20px;
    }

    .shot-lightbox-frame img {
        max-width: calc(100vw - 92px);
        max-height: calc(100svh - 170px);
    }

    .shot-lightbox-close {
        top: -6px;
        right: -6px;
        width: 28px;
        height: 28px;
        font-size: 0.75em;
    }

    .shot-lightbox-nav {
        width: 36px;
        height: 24px;
    }

    .shot-lightbox-prev {
        left: 6px;
    }

    .shot-lightbox-next {
        right: 6px;
    }

    .shot-lightbox-full {
        padding: 5px 14px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .screenshots-title-main {
        font-size: 1.45em;
    }

    .shot-card-header {
        flex-direction: column;
        align-items: flex-start;
    }
}
