/* ============================================================
   前台样式 · 与原站保持完全一致
   ============================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}

:root {
    --x-black: #000000;
    --x-dark-bg: #0F1419;
    --x-gray-text: #536471;
    --x-light-border: #EFF3F4;
    --x-card-bg: #FFFFFF;
    --x-star: #FF9500;
}

body {
    background-color: #F7F9F9;
    color: #0F1419;
}

/* 移动端顶部导航 (类似X界面) */
.x-mobile-nav {
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 0.5px solid #E1E8ED;
}

.nav-icon {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 18px;
    color: var(--x-black);
}

.nav-title {
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -0.3px;
}

/* 主要内容容器 */
.main-container {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 16px 30px;
}

/* 应用主卡片 */
.app-hero {
    background: var(--x-card-bg);
    border-radius: 28px;
    margin: 20px 0 18px;
    padding: 20px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    border: 0.5px solid #E1E8ED;
}

.app-hero-flex {
    display: flex;
    gap: 18px;
    align-items: center;
}

.app-icon-large {
    width: 90px;
    height: 90px;
    background: #000;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.app-icon-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.app-details {
    flex: 1;
}

.app-name {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.6px;
    margin-bottom: 4px;
}

.app-sub {
    font-size: 15px;
    color: var(--x-gray-text);
    margin-bottom: 8px;
}

.rating-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.stars-group {
    color: var(--x-star);
    font-size: 14px;
    letter-spacing: 1px;
}

.rating-count {
    font-size: 14px;
    color: var(--x-gray-text);
}

/* 下载按钮风格 */
.btn-get {
    display: block;
    background: var(--x-black);
    color: white;
    text-align: center;
    padding: 14px;
    border-radius: 16px;
    font-weight: 700;
    font-size: 17px;
    margin: 20px 0 16px;
    text-decoration: none;
    transition: 0.2s;
    border: none;
    cursor: pointer;
}

.btn-get:active {
    background: #2c2c2c;
    transform: scale(0.98);
}

/* 信息三栏网格 */
.info-grid-three {
    display: flex;
    justify-content: space-between;
    border-top: 0.5px solid #E1E8ED;
    padding-top: 18px;
    margin-top: 8px;
}

.info-cell {
    text-align: center;
    flex: 1;
}

.info-number {
    font-weight: 800;
    font-size: 16px;
}

.info-label-sm {
    font-size: 12px;
    color: var(--x-gray-text);
    margin-top: 4px;
}

/* 预览section (水平滑动) */
.section {
    margin: 32px 0 28px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 14px;
    padding: 0 2px;
}

.section-title {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.section-link {
    font-size: 14px;
    color: var(--x-gray-text);
    text-decoration: none;
}

.scroll-horizontal {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: thin;
    padding-bottom: 8px;
}

.scroll-horizontal::-webkit-scrollbar {
    height: 4px;
}

.preview-img {
    width: 230px;
    height: 500px;
    border-radius: 24px;
    background-color: #EFF3F4;
    flex-shrink: 0;
    object-fit: cover;
    border: 0.5px solid #E1E8ED;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.06);
}

/* 描述卡片 */
.desc-card {
    background: #FFFFFF;
    border-radius: 24px;
    padding: 20px;
    border: 0.5px solid #E1E8ED;
}

.desc-text {
    font-size: 15px;
    line-height: 1.45;
    color: #0F1419;
    margin-bottom: 12px;
}

.more-link {
    font-weight: 600;
    color: var(--x-black);
    text-decoration: none;
    font-size: 15px;
}

/* 信息表格双列 */
.info-double {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 8px;
}

.info-chip {
    background: #FFFFFF;
    border-radius: 18px;
    padding: 14px 16px;
    border: 0.5px solid #E1E8ED;
}

.info-chip-label {
    font-size: 12px;
    color: var(--x-gray-text);
    margin-bottom: 5px;
}

.info-chip-value {
    font-weight: 590;
    font-size: 16px;
}

/* 评论卡片 */
.review-item {
    background: #FFFFFF;
    border-radius: 20px;
    padding: 18px;
    margin-bottom: 12px;
    border: 0.5px solid #E1E8ED;
}

.review-head {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.reviewer-name {
    font-weight: 700;
    font-size: 15px;
}

.badge {
    background: #EFF3F4;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 20px;
    margin-left: 8px;
    font-weight: 400;
    color: #536471;
}

.review-date {
    color: var(--x-gray-text);
    font-size: 12px;
}

.review-stars {
    color: var(--x-star);
    font-size: 12px;
    margin: 6px 0 8px;
}

.review-body {
    font-size: 14px;
    line-height: 1.4;
    color: #0F1419;
}

/* 页脚 */
.footer-links-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
    margin: 32px 0 20px;
}

.footer-links-bar a {
    color: var(--x-gray-text);
    font-size: 12px;
    text-decoration: none;
}

.copyright {
    text-align: center;
    font-size: 11px;
    color: #8899A6;
    margin-bottom: 30px;
}

.btn-row {
    display: flex;
    flex-direction: row;
    gap: 12px;
    margin: 20px 0 16px;
    width: 100%;
}

.btn-row .btn-get {
    flex: 1;
    min-width: 0;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 响应式调整 */
@media (max-width: 480px) {
    .preview-img {
        width: 190px;
        height: 410px;
    }
    .app-name {
        font-size: 22px;
    }
    .app-icon-large {
        width: 75px;
        height: 75px;
    }
}

/* 桌面端保持应用商店式窄栏布局，避免宽屏拉伸 */
@media (min-width: 769px) {
    .main-container {
        width: min(720px, calc(100vw - 32px));
        max-width: none;
    }
}

/* 微信/QQ提示层 - 公共样式 */
.showDown,
#AshowDown {
    width: 100%;
    height: 100%;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    overflow: hidden;
    touch-action: none;
}

.safari {
    position: absolute;
    top: 76px;
    right: 1px;
}

.arrow {
    position: absolute;
    top: 20px;
    right: 10px;
    width: 30px;
    height: 30px;
}

.arrow img {
    width: 100%;
    height: auto;
}

.openIn {
    color: #fff;
    font-size: 17px;
    position: absolute;
    top: 90px;
    right: 60px;
    font-weight: bolder;
    font-family: fangsong;
}

/* 可选loading简单样式 (保留原有的优雅过渡但不再复杂) */
.loading-mask {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    display: none;
    justify-content: center;
    align-items: center;
}
.loading-spinner {
    background: white;
    padding: 20px 30px;
    border-radius: 16px;
    text-align: center;
}
.spinner-circle {
    width: 36px;
    height: 36px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #ff0000;
    border-radius: 50%;
    animation: spinLoad 1s linear infinite;
    margin: 0 auto 12px;
}
@keyframes spinLoad {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}
/* 新增：禁止页面滚动 */
.body-no-scroll {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
    touch-action: none;
}
.ios-guide-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10020;
    background: rgba(0, 0, 0, 0.42);
    align-items: flex-end;
    justify-content: center;
}

.ios-guide-modal.is-visible {
    display: flex;
}

.ios-guide-panel {
    width: min(100%, 680px);
    height: min(82vh, 760px);
    background: #fff;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.18);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.ios-guide-header {
    position: sticky;
    top: 0;
    z-index: 1;
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid #ececec;
}

.ios-guide-title {
    font-size: 19px;
    font-weight: 600;
    color: #222;
}

.ios-guide-close {
    position: absolute;
    right: 14px;
    top: 11px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: #f2f2f2;
    color: #666;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.ios-guide-body {
    padding: 8px 18px 34px;
}

.ios-guide-step {
    padding: 18px 0 22px;
    border-bottom: 1px solid #ececec;
}

.ios-guide-step:last-child {
    border-bottom: 0;
}

.ios-guide-step p {
    margin: 0 0 12px;
    color: #333;
    font-size: 15px;
    line-height: 1.55;
    font-weight: 500;
}

.ios-guide-step img {
    display: block;
    width: min(100%, 360px);
    height: auto;
    margin: 0 auto;
    border-radius: 8px;
    border: 1px solid #e3e3e3;
}

.ios-guide-lock {
    overflow: hidden;
}

/* 百度 APP 内点击下载 · 浏览器打开引导弹窗 */
.bg-modal {
    position: fixed;
    inset: 0;
    z-index: 10030;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.7);
    -webkit-tap-highlight-color: transparent;
}

.bg-panel {
    width: 300px;
    max-width: 100%;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.32);
    animation: bgModalIn 0.24s ease;
}

@keyframes bgModalIn {
    from {
        opacity: 0;
        transform: scale(0.94);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.bg-body {
    padding: 26px 22px 20px;
    text-align: center;
}

.bg-logo {
    width: 68px;
    height: 68px;
    margin: 0 auto 16px;
    border-radius: 19px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14);
}

.bg-logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bg-title {
    font-size: 18px;
    font-weight: 700;
    color: #0F1419;
    margin-bottom: 8px;
}

.bg-sub {
    font-size: 14px;
    color: #536471;
    line-height: 1.5;
    margin-bottom: 8px;
}

.bg-tip {
    font-size: 13px;
    color: #8899A6;
    line-height: 1.45;
    white-space: pre-line;
}

.bg-actions {
    display: flex;
    border-top: 1px solid #EFF3F4;
}

.bg-btn {
    flex: 1;
    padding: 14px;
    border: 0;
    background: #fff;
    color: #007AFF;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
}

.bg-btn:active {
    background: #F7F9F9;
}

.bg-btn + .bg-btn {
    border-left: 1px solid #EFF3F4;
}

.bg-btn-primary {
    font-weight: 700;
}

.bg-open {
    display: block;
    padding: 14px;
    border-top: 1px solid #EFF3F4;
    color: #007AFF;
    font-size: 15px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
}

.bg-open:active {
    background: #F7F9F9;
}

@media (min-width: 700px) {
    .ios-guide-modal {
        align-items: center;
        padding: 24px;
    }

    .ios-guide-panel {
        border-radius: 12px;
    }
}
