/* ========================================
   HK365 - App Store 简洁风格
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --primary: #007AFF;
    --primary-dark: #0051D4;
    --text-primary: #1d1d1f;
    --text-secondary: #86868b;
    --text-light: #acacb0;
    --bg-page: #f5f5f7;
    --bg-card: #ffffff;
    --border: #d2d2d7;
    --border-light: #e5e5ea;
    --star: #ff9500;
}

html {
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
    background: var(--bg-page);
    color: var(--text-primary);
    line-height: 1.4;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ========================================
   顶部导航
   ======================================== */

.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(245, 245, 247, 0.94);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 0.5px solid var(--border-light);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 44px;
    padding: 0 16px;
}

.header-back {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    text-decoration: none;
    font-size: 17px;
    margin-left: -8px;
}

.header-back svg {
    width: 20px;
    height: 20px;
}

.header-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.header-right {
    width: 44px;
}

/* ========================================
   内容区域
   ======================================== */

.content {
    max-width: 750px;
    margin: 0 auto;
    padding-bottom: 90px;
}

/* ========================================
   应用信息区
   ======================================== */

.app-header {
    background: var(--bg-card);
    padding: 20px 16px 16px;
    display: flex;
    gap: 14px;
}

.app-icon {
    width: 102px;
    height: 102px;
    border-radius: 22px;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #007AFF, #0051D4);
    letter-spacing: 1px;
}

.app-info {
    flex: 1;
    min-width: 0;
}

.app-name {
    font-size: 21px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 2px;
}

.app-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.app-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.stars {
    color: var(--star);
    letter-spacing: -1px;
}

.rating-score {
    color: var(--text-primary);
    font-weight: 500;
}

.app-size {
    font-size: 12px;
    color: var(--text-light);
}

/* ========================================
   下载按钮
   ======================================== */

.download-btn {
    display: block;
    width: 100%;
    background: var(--primary);
    color: #fff;
    text-align: center;
    padding: 13px 0;
    border-radius: 22px;
    font-size: 17px;
    font-weight: 600;
    text-decoration: none;
    margin: 16px;
    width: calc(100% - 32px);
    box-shadow: 0 4px 14px rgba(0, 122, 255, 0.3);
}

.download-btn:active {
    background: var(--primary-dark);
    transform: scale(0.98);
}

.download-btn-secondary {
    background: var(--bg-page);
    color: var(--primary);
    box-shadow: none;
    border: 1px solid var(--border-light);
}

.download-btn-secondary:active {
    background: var(--border-light);
}

/* ========================================
   简介
   ======================================== */

.app-desc {
    background: var(--bg-card);
    margin: 0 16px 8px;
    padding: 14px 16px;
    border-radius: 14px;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ========================================
   截图
   ======================================== */

.screenshots {
    background: var(--bg-card);
    margin: 8px 16px;
    padding: 14px 0 14px 14px;
    border-radius: 14px;
}

.screenshots-title {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    padding-right: 14px;
}

.screenshot-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-right: 14px;
}

.screenshot-scroll::-webkit-scrollbar {
    display: none;
}

.screenshot-item {
    width: 140px;
    height: 280px;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-page);
}

.screenshot-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ========================================
   信息列表
   ======================================== */

.info-section {
    background: var(--bg-card);
    margin: 8px 16px;
    border-radius: 14px;
    overflow: hidden;
}

.info-row {
    display: flex;
    padding: 13px 16px;
    border-bottom: 0.5px solid var(--border-light);
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    width: 80px;
    font-size: 14px;
    color: var(--text-secondary);
}

.info-value {
    flex: 1;
    font-size: 14px;
    color: var(--text-primary);
}

.info-link {
    color: var(--primary);
    text-decoration: none;
}

.info-arrow {
    color: var(--text-light);
    font-size: 14px;
    margin-left: 4px;
}

/* ========================================
   列表卡片
   ======================================== */

.list-section {
    background: var(--bg-card);
    margin: 8px 16px;
    border-radius: 14px;
    overflow: hidden;
}

.list-header {
    padding: 14px 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 0.5px solid var(--border-light);
}

.list-item {
    display: flex;
    align-items: center;
    padding: 13px 16px;
    border-bottom: 0.5px solid var(--border-light);
    text-decoration: none;
    color: inherit;
}

.list-item:last-child {
    border-bottom: none;
}

.list-item:active {
    background: var(--bg-page);
}

.list-icon {
    width: 38px;
    height: 38px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
}

.list-icon svg {
    width: 20px;
    height: 20px;
    color: #fff;
}

.list-icon.blue { background: var(--primary); }
.list-icon.green { background: #34c759; }
.list-icon.orange { background: #ff9500; }
.list-icon.purple { background: #af52de; }
.list-icon.red { background: #ff3b30; }
.list-icon.gray { background: #8e8e93; }

.list-text {
    flex: 1;
    min-width: 0;
}

.list-title {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.list-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
}

.list-arrow {
    color: var(--text-light);
    font-size: 18px;
    font-weight: 300;
}

.list-arrow svg {
    width: 16px;
    height: 16px;
}

/* ========================================
   帮助卡片
   ======================================== */

.help-section {
    background: var(--bg-card);
    margin: 8px 16px;
    border-radius: 14px;
    padding: 16px;
}

.help-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.help-item {
    margin-bottom: 16px;
}

.help-item:last-child {
    margin-bottom: 0;
}

.help-q {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 6px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.help-q::before {
    content: 'Q';
    color: var(--primary);
    font-weight: 700;
}

.help-a {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    padding-left: 20px;
}

.help-a li {
    margin-bottom: 4px;
    list-style: none;
    position: relative;
    padding-left: 12px;
}

.help-a li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 4px;
    height: 4px;
    background: var(--text-light);
    border-radius: 50%;
}

/* ========================================
   底部固定栏
   ======================================== */

.bottom-bar {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 750px;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-top: 0.5px solid var(--border-light);
    padding: 10px 16px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    display: flex;
    gap: 10px;
    z-index: 999;
}

.bottom-btn {
    flex: 1;
    padding: 12px 0;
    text-align: center;
    border-radius: 20px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.bottom-btn svg {
    width: 16px;
    height: 16px;
}

.bottom-btn-primary {
    background: var(--primary);
    color: #fff;
    flex: 2;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

.bottom-btn-secondary {
    background: var(--bg-page);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}

.bottom-btn:active {
    opacity: 0.85;
}

/* ========================================
   微信提示页
   ======================================== */

.notice-page {
    min-height: 50vh;
    background: #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    text-align: center;
}

.notice-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.notice-icon svg {
    width: 40px;
    height: 40px;
    color: var(--primary);
}

.notice-title {
    font-size: 22px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 12px;
}

.notice-desc {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.7;
    margin-bottom: 32px;
}

.notice-steps {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    padding: 20px;
    width: 100%;
    max-width: 320px;
    text-align: left;
}

.notice-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}

.notice-step:last-child {
    margin-bottom: 0;
}

.notice-step-num {
    width: 22px;
    height: 22px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.notice-step-text {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
    padding-top: 2px;
}

.notice-step-text strong {
    color: #fff;
}

.notice-btn {
    display: inline-block;
    margin-top: 28px;
    padding: 12px 32px;
    background: var(--primary);
    color: #fff;
    border-radius: 22px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
}

/* ========================================
   评分星星
   ======================================== */

.star-full { color: var(--star); }
.star-empty { color: var(--border); }

/* ========================================
   分割线
   ======================================== */

.divider {
    height: 8px;
    background: var(--bg-page);
}

/* ========================================
   加载动画
   ======================================== */

.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 0;
}

.loading-text {
    margin-top: 12px;
    font-size: 13px;
    color: var(--text-light);
}

.progress-bar {
    width: 120px;
    height: 3px;
    background: var(--border-light);
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar::after {
    content: '';
    display: block;
    width: 50%;
    height: 100%;
    background: var(--primary);
    border-radius: 2px;
    animation: loading 1.2s ease-in-out infinite;
}

@keyframes loading {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(300%); }
}

/* ========================================
   响应式
   ======================================== */

@media (max-width: 375px) {
    .app-icon {
        width: 88px;
        height: 88px;
        border-radius: 18px;
    }
    
    .app-name {
        font-size: 19px;
    }
}
