/* ========== 全局样式 ========== */
.game-download-enhanced {
    max-width: 1280px;
    margin: 0 auto;
    border: 1px solid #d4d4d4;
    border-radius: 28px;
    background: #ffffff;
    box-shadow: none;
}
.game-download-enhanced .enhanced-inner {
    padding: 28px 32px;
}

/* ========== 面包屑导航样式 ========== */
.game-breadcrumb {
    max-width: 1280px;
    margin: 0 auto 20px auto;
    padding: 10px 0;
    font-size: 14px;
    color: #666;
}
.game-breadcrumb a {
    color: #666;
    text-decoration: none;
}
.game-breadcrumb a:hover {
    color: #e67e22;
}
.game-breadcrumb .separator {
    margin: 0 8px;
    color: #ccc;
}
.game-breadcrumb .current {
    color: #333;
    font-weight: 500;
}

/* ========== 头部区域样式 ========== */
.enhanced-header-sticky {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 24px;
    align-items: start;
    margin-bottom: 28px;
    overflow: visible;
    position: sticky;
    top: 60px;
    z-index: 998;
    background: #ffffff;
    padding: 20px 28px;
    border: 1px solid #d4d4d4;
    border-radius: 28px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}
.enhanced-header-sticky .enhanced-icon {
    width: 88px;
    height: 88px;
    border-radius: 28px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}
.enhanced-header-sticky .enhanced-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.enhanced-header-sticky .info-center {
    flex: 1;
    min-width: 0;
}
.enhanced-header-sticky .enhanced-title {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
}
.enhanced-header-sticky .enhanced-title h1 {
    font-size: 2rem;
    font-weight: 800;
    margin: 0;
    color: #2c2418;
    letter-spacing: -0.3px;
}
.enhanced-header-sticky .enhanced-rating {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffffcc;
    backdrop-filter: blur(4px);
    padding: 6px 14px;
    border-radius: 60px;
    font-size: 1rem;
    font-weight: 700;
    color: #e67e22;
    border: 1px solid #ffe0b5;
}
.enhanced-header-sticky .enhanced-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    font-size: 0.95rem;
    color: #5d5343;
    margin-bottom: 20px;
}
.enhanced-header-sticky .enhanced-meta span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 250, 240, 0.8);
    padding: 5px 14px;
    border-radius: 40px;
}
.enhanced-header-sticky .compact-buttons {
    display: flex;
    flex-wrap: nowrap;
    gap: 16px;
    margin-top: 35px;
    position: relative;
    left: -118px;
}
.enhanced-header-sticky .btn-compact {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 36px;
    border-radius: 60px;
    font-size: 0.9rem;
    font-weight: 700;
    transition: 0.2s;
    cursor: pointer;
    border: none;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    min-width: 170px;
    white-space: nowrap;
    flex-shrink: 0;
}
.enhanced-header-sticky .btn-android-compact { background: #07c160; color: white; }
.enhanced-header-sticky .btn-android-compact:hover { background: #05a14d; transform: translateY(-2px); }
.enhanced-header-sticky .btn-ios-compact { background: #2c2c2e; color: white; }
.enhanced-header-sticky .btn-ios-compact:hover { background: #1c1c1e; transform: translateY(-2px); }
.enhanced-header-sticky .btn-pc-compact { background: #2c3e66; color: white; }
.enhanced-header-sticky .btn-pc-compact:hover { background: #1f2f4f; transform: translateY(-2px); }
.enhanced-header-sticky .qr-fixed {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #fffaf2;
    border-radius: 24px;
    padding: 12px;
    border: 1px solid #ffe6cd;
    gap: 8px;
    width: 120px;
    max-width: 100%;
}
.enhanced-header-sticky .qr-fixed img {
    width: 90px;
    height: 90px;
    border-radius: 16px;
    background: white;
    padding: 4px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.enhanced-header-sticky .qr-fixed span {
    font-size: 0.75rem;
    font-weight: 600;
    color: #b87c4a;
    background: #fff2e6;
    padding: 4px 10px;
    border-radius: 40px;
}

/* ========== 章节标题样式 ========== */
.section-title {
    background: #fffaf2;
    padding: 14px 20px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 1.3rem;
    color: #3e2c1c;
    display: flex;
    align-items: center;
    gap: 10px;
    border-left: 5px solid #f5a623;
    margin-bottom: 20px;
    width: 100%;
}
.section-title i {
    font-size: 1.25rem;
    color: #e67e22;
}

/* ========== 详细信息区域 ========== */
.detail-section {
    background: #fffef7;
    border-radius: 24px;
    margin: 20px 0 24px;
    border: 1px solid #f5e9dd;
    overflow: hidden;
}
.detail-content {
    padding: 20px 24px;
    display: block;
}
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px 24px;
}
.info-item {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    border-bottom: 1px dashed #f0e2d2;
    padding-bottom: 8px;
    font-size: 0.95rem;
}
.info-label {
    width: 100px;
    font-weight: 700;
    color: #b87c4a;
    font-size: 0.95rem;
}
.info-value {
    flex: 1;
    color: #4a3a2a;
    font-size: 0.95rem;
}
.permission-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.permission-badge {
    background: #f5ede3;
    padding: 3px 12px;
    border-radius: 30px;
    font-size: 0.75rem;
    color: #7a5a3a;
    display: inline-flex;
    white-space: nowrap;
}
.permission-more-btn {
    background: none;
    border: none;
    color: #e67e22;
    font-size: 0.75rem;
    cursor: pointer;
    padding: 4px 0;
    margin-top: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.permission-more-btn:hover {
    color: #b87c4a;
}
.permission-hidden {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* ========== 视频区域 ========== */
.video-wrapper {
    margin: 24px 0;
    display: flex;
    justify-content: center;
}
.video-wrapper video {
    width: 70%;
    max-width: 560px;
    border-radius: 24px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    background: #111;
}

/* ========== 截图区域 ========== */
.screenshots-area {
    margin: 20px 0 28px;
}
.image-tiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 24px;
    margin-top: 16px;
}
.tile-img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 24px;
    box-shadow: 0 12px 22px rgba(0, 0, 0, 0.12);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    cursor: pointer;
    background-color: #faf7f2;
    display: block;
}
.tile-img:hover {
    transform: scale(1.02);
    box-shadow: 0 18px 28px rgba(0, 0, 0, 0.18);
}

/* ========== 介绍区域 ========== */
.description-text {
    background: #fefaf5;
    padding: 24px 28px;
    border-radius: 28px;
    line-height: 1.75;
    color: #3c2e1f;
    font-size: 1.05rem;
    margin-top: 0;
    margin-bottom: 20px;
}

/* ========== 底部区域 ========== */
.footer-note {
    display: flex;
    justify-content: space-between;
    margin-top: 32px;
    padding-top: 18px;
    border-top: 1px solid #f5e2ce;
    font-size: 0.85rem;
    flex-wrap: wrap;
    gap: 12px;
}
.report-enhanced {
    color: #ad8b67;
    cursor: pointer;
    font-weight: 600;
    display: inline-flex;
    gap: 8px;
    align-items: center;
}
.notice-enhanced {
    color: #b39c7c;
}

/* ========== 修复父主题灯箱与 sticky 元素冲突 ========== */
.mfp-wrap {
    z-index: 10000 !important;
}
.mfp-bg {
    z-index: 9999 !important;
}
.mfp-close {
    z-index: 10001 !important;
    font-size: 28px !important;
    font-family: Arial, sans-serif !important;
    right: 10px !important;
    top: 10px !important;
    opacity: 1 !important;
    color: #fff !important;
    background: rgba(0,0,0,0.5) !important;
    width: 40px !important;
    height: 40px !important;
    line-height: 40px !important;
    border-radius: 50% !important;
    text-align: center !important;
}
.mfp-close:hover {
    background: rgba(0,0,0,0.8) !important;
}
.mfp-container {
    z-index: 10000 !important;
}

/* ========== 响应式样式 ========== */
@media (max-width: 900px) {
    .enhanced-header-sticky .btn-compact {
        padding: 8px 20px;
        min-width: 130px;
        font-size: 0.85rem;
    }
    .enhanced-header-sticky .compact-buttons {
        gap: 12px;
    }
}
@media (max-width: 820px) {
    .enhanced-header-sticky {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
        gap: 20px;
        top: 50px;
        padding: 16px 20px;
    }
    .enhanced-header-sticky .info-center {
        text-align: center;
        width: 100%;
    }
    .enhanced-header-sticky .enhanced-title {
        justify-content: center;
    }
    .enhanced-header-sticky .enhanced-meta {
        justify-content: center;
    }
    .enhanced-header-sticky .compact-buttons {
        justify-content: center;
        left: 0;
        flex-wrap: wrap;
        margin-top: 20px;
    }
    .enhanced-header-sticky .qr-fixed {
        margin-top: 0;
        align-self: center;
        justify-self: center;
    }
    .game-breadcrumb {
        text-align: center;
    }
}
@media (max-width: 720px) {
    .enhanced-header-sticky .btn-compact {
        padding: 8px 16px;
        min-width: 110px;
        font-size: 0.8rem;
    }
    .enhanced-header-sticky .compact-buttons {
        gap: 8px;
    }
    .description-text {
        font-size: 1rem;
        padding: 18px;
    }
    .info-value {
        font-size: 0.9rem;
    }
    .enhanced-meta span {
        font-size: 0.85rem;
    }
}
@media (max-width: 680px) {
    .enhanced-header-sticky .enhanced-inner { padding: 18px; }
    .video-wrapper video { width: 95%; }
}
@media (max-width: 550px) {
    .enhanced-header-sticky .btn-compact {
        padding: 6px 12px;
        min-width: 90px;
        font-size: 0.7rem;
        gap: 4px;
    }
    .enhanced-header-sticky .compact-buttons {
        gap: 6px;
    }
    .enhanced-header-sticky .qr-fixed {
        width: 100px;
        padding: 8px;
    }
    .enhanced-header-sticky .qr-fixed img {
        width: 70px;
        height: 70px;
    }
    .section-title {
        font-size: 1.1rem;
        padding: 10px 16px;
    }
}

/* 两列布局及侧边栏跟随滚动 */
.download-page-wrapper {
    display: flex;
    flex-wrap: wrap;
    max-width: 1280px;
    margin: 2rem auto;
    gap: 2rem;
}
.download-content-area {
    flex: 3;
    min-width: 0;
}
.download-sidebar {
    flex: 1;
    min-width: 260px;
    max-width: 320px;
    position: sticky;
    top: 20px;
    align-self: flex-start;
}
@media (max-width: 768px) {
    .download-page-wrapper {
        flex-direction: column;
    }
    .download-sidebar {
        min-width: auto;
        max-width: 100%;
        position: static;
    }
}

/* ========== 热门游戏推荐样式 ========== */
.widget-hot-games {
    background: #fff;
    border-radius: 16px;
    margin-bottom: 20px;
    overflow: hidden;
    border: 1px solid #f0e2d2;
}
.widget-hot-games .widget-title {
    background: #fffaf2;
    padding: 14px 16px;
    font-size: 1.1rem;
    font-weight: bold;
    margin: 0;
    border-bottom: 1px solid #f0e2d2;
    color: #3e2c1c;
}
.hot-games-list {
    display: flex;
    flex-direction: column;
    padding: 12px;
    gap: 12px;
}
.hot-game-item {
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    padding: 12px;
    border-radius: 16px;
    transition: all 0.2s ease;
    background: #fefaf5;
    border: 1px solid #f5e9dd;
    max-width: 100%;
    overflow: hidden;
}
.hot-game-item:hover {
    background: #fff5ea;
    border-color: #e6d5c0;
    transform: translateX(4px);
}
.hot-game-logo {
    width: 60px !important;
    min-width: 60px;
    max-width: 60px;
    height: 60px !important;
    min-height: 60px;
    max-height: 60px;
    border-radius: 16px;
    object-fit: cover;
    flex-shrink: 0;
    background: #f0e2d2;
}
.hot-game-logo-placeholder {
    width: 60px;
    min-width: 60px;
    height: 60px;
    border-radius: 16px;
    background: #f0e2d2;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    flex-shrink: 0;
}
.hot-game-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}
.hot-game-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #3e2c1c;
    line-height: 1.3;
    margin-bottom: 6px;
    word-break: break-word;
}
.hot-game-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.hot-game-category {
    font-size: 0.85rem;
    color: #e67e22;
    background: #fff2e6;
    padding: 2px 8px;
    border-radius: 12px;
    display: inline-block;
    width: fit-content;
}
.hot-game-rating {
    font-size: 0.95rem;
    color: #ff9800;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.hot-game-rating i {
    font-size: 0.85rem;
}
.hot-game-item:hover .hot-game-title {
    color: #e67e22;
}

/* ========== 实用软件应用样式 ========== */
.widget-apps {
    background: #fff;
    border-radius: 16px;
    margin-bottom: 20px;
    overflow: hidden;
    border: 1px solid #f0e2d2;
}
.widget-apps .widget-title {
    background: #fffaf2;
    padding: 14px 16px;
    font-size: 1.1rem;
    font-weight: bold;
    margin: 0;
    border-bottom: 1px solid #f0e2d2;
    color: #3e2c1c;
}
.apps-grid {
    display: flex;
    gap: 12px;
    padding: 16px;
}
.apps-column {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.app-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    padding: 12px;
    border-radius: 16px;
    transition: all 0.2s ease;
    background: #fefaf5;
    border: 1px solid #f5e9dd;
}
.app-item:hover {
    background: #fff5ea;
    border-color: #e6d5c0;
    transform: translateY(-2px);
}
.app-logo {
    width: 80px !important;
    min-width: 80px;
    max-width: 80px;
    height: 80px !important;
    min-height: 80px;
    max-height: 80px;
    border-radius: 16px;
    object-fit: cover;
    margin-bottom: 10px;
    background: #f0e2d2;
}
.app-logo-placeholder {
    width: 80px;
    min-width: 80px;
    height: 80px;
    border-radius: 16px;
    background: #f0e2d2;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin-bottom: 10px;
}
.app-title {
    font-size: 1rem;
    font-weight: 700;
    color: #3e2c1c;
    line-height: 1.3;
    word-break: break-word;
}
.app-item:hover .app-title {
    color: #e67e22;
}
@media (max-width: 768px) {
    .apps-grid {
        flex-direction: column;
    }
    .app-logo,
    .app-logo-placeholder {
        width: 70px;
        min-width: 70px;
        height: 70px;
    }
    .app-title {
        font-size: 0.75rem;
    }
}

/* ========== 归档页样式 ========== */
.download-archive {
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px;
}
.archive-header {
    margin-bottom: 30px;
    text-align: center;
}
.archive-title {
    font-size: 2rem;
    font-weight: 800;
    color: #2c2418;
    margin-bottom: 10px;
}
.archive-description {
    color: #666;
    font-size: 1rem;
}
.download-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}
.download-card {
    background: #fff;
    border: 1px solid #f0e2d2;
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    color: inherit;
    display: block;
}
.download-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}
.download-card-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}
.download-card-content {
    padding: 16px;
}
.download-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2c2418;
    margin-bottom: 8px;
}
.download-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.75rem;
    color: #b87c4a;
}
.download-card-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}
.pagination .page-numbers {
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid #f0e2d2;
    border-radius: 8px;
    text-decoration: none;
    color: #2c2418;
}
.pagination .page-numbers.current {
    background: #e67e22;
    border-color: #e67e22;
    color: #fff;
}
.pagination .page-numbers:hover:not(.current) {
    background: #fffaf2;
}


/* ========== 截图轮播样式 ========== */
.screenshot-slider {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    margin: 20px 0 28px;
}

/* 滑动容器 */
.slider-container {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.slider-container::-webkit-scrollbar {
    display: none;
}

/* 单个图片项 */
.slider-item {
    flex: 0 0 100%;
    scroll-snap-align: start;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f5f0e8;
    min-height: 300px;
}
.slider-item img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    display: block;
}

/* 箭头按钮 */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    z-index: 10;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.slider-arrow:hover {
    background: rgba(0, 0, 0, 0.8);
}
.slider-arrow.prev {
    left: 10px;
}
.slider-arrow.next {
    right: 10px;
}

/* 分页点 */
.slider-dots {
    position: absolute;
    bottom: 15px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 10;
}
.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.2s;
}
.dot.active {
    width: 20px;
    border-radius: 4px;
    background: #fff;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .slider-arrow {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
    .slider-item {
        min-height: 200px;
    }
}
/* ========== 评分按钮样式 ========== */
.rating-btn {
    background: linear-gradient(135deg, #e67e22, #f39c12);
    border: none;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-left: 10px;
}

.rating-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(230, 126, 34, 0.4);
}

/* ========== 评分弹窗样式 ========== */
.rating-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
}

.rating-modal-content {
    background: #fff;
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: modalFadeIn 0.2s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.rating-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
}

.rating-modal-close {
    font-size: 24px;
    cursor: pointer;
    color: #999;
    transition: color 0.2s;
}

.rating-modal-close:hover {
    color: #333;
}

.rating-modal-body {
    padding: 24px 20px;
    text-align: center;
}

.rating-stars-10 {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.star-10 {
    font-size: 28px;
    color: #ff9800;
    cursor: pointer;
    transition: transform 0.1s;
}

.star-10:hover {
    transform: scale(1.1);
}

.rating-tip {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 10px;
}

.rating-selected {
    font-size: 0.9rem;
    color: #e67e22;
    font-weight: 500;
}

.rating-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid #eee;
}

.rating-submit {
    background: linear-gradient(135deg, #07c160, #05a14d);
    border: none;
    color: white;
    padding: 8px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: transform 0.2s;
}

.rating-submit:hover {
    transform: translateY(-1px);
}

.rating-cancel {
    background: #f5f5f5;
    border: 1px solid #ddd;
    color: #666;
    padding: 8px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.rating-cancel:hover {
    background: #eee;
}