/* ========== 全局重置 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #ffffff;  /* 纯白背景 */
    color: #333;
    padding-bottom: 80px;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ========== 顶部标题 ========== */
.header {
    background: linear-gradient(135deg, #8B0000 0%, #2D0000 100%) !important;
    color: #fff;
    padding: 16px 16px 14px;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 4px 20px rgba(139, 0, 0, 0.35);
    border-bottom: none;
}

/* ===== 顶部三栏布局 ===== */
.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 480px;
    margin: 0 auto;
}

.header-back {
    color: #fff;
    font-size: 36px;
    font-weight: 300;
    text-decoration: none;
    padding: 0 4px;
    flex-shrink: 0;
    opacity: 0.9;
    line-height: 1;
    width: 40px;
    text-align: left;
}

.header-back:active {
    opacity: 0.6;
}

.header-title {
    text-align: center;
    flex: 1;
}

.header-title h1 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 2px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.25);
}

.header-title p {
    font-size: 12px;
    opacity: 0.85;
    margin: 0;
}

.header-placeholder {
    width: 36px;
    flex-shrink: 0;
}

/* ========== 游戏卡片列表 ========== */
.game-list {
    padding: 16px;
    max-width: 480px;
    margin: 0 auto;
    padding-bottom: 80px;
}

/* ===== 卡片背景：淡淡的粉白渐变（保留） ===== */
.game-card {
    background: linear-gradient(145deg, rgba(255, 248, 248, 0.95), rgba(255, 235, 238, 0.90));
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 18px;
    padding: 18px 16px 14px;
    margin-bottom: 18px;
    box-shadow: 0 4px 20px rgba(139, 0, 0, 0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.60);
}

.game-card:active {
    transform: scale(0.98);
}

/* ========== 右上角"热门"标识 ========== */
.badge-hot {
    position: absolute;
    top: 12px;
    right: 14px;
    font-size: 22px;
    z-index: 2;
    filter: drop-shadow(0 2px 6px rgba(139, 0, 0, 0.30));
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.15);
    }
}

/* ========== 游戏卡片链接区域 ========== */
.game-link {
    display: block;
    cursor: pointer;
}

.game-link:active .game-info {
    opacity: 0.7;
}

/* ========== 游戏信息行 ========== */
.game-info {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
    padding-right: 40px;
}

/* ===== APP图标：淡淡的粉紫渐变背景 ===== */
.game-icon {
    width: 74px;
    height: 74px;
    border-radius: 18px;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 2px 8px rgba(139, 0, 0, 0.06);
    background: linear-gradient(135deg, #fce4ec, #f3e5f5, #e8eaf6);
}

/* ===== 游戏名称区域：淡粉色渐变 ===== */
.game-meta {
    flex: 1;
    min-width: 0;
    background: linear-gradient(135deg, rgba(252, 228, 236, 0.25), rgba(243, 229, 245, 0.15));
    padding: 6px 12px 8px 12px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.30);
}

.game-name {
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #2d2d2d;
}

.game-type {
    display: inline-block;
    font-size: 12px;
    color: #8B0000;
    background: rgba(139, 0, 0, 0.10);
    padding: 0 12px;
    border-radius: 12px;
    line-height: 22px;
    margin-bottom: 4px;
    font-weight: 500;
}

.game-score {
    display: flex;
    align-items: center;
    gap: 2px;
}

.star {
    font-size: 17px;
    color: #e8e8e8;
    transition: color 0.2s;
}

.star.active {
    color: #f5a623;
}

.score-text {
    font-size: 12px;
    color: #aaa;
    margin-left: 4px;
}

/* ========== 三个按钮 ========== */
.game-actions {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.game-actions .btn {
    flex: 1;
    text-align: center;
    padding: 11px 0;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    position: relative;
    z-index: 3;
}

.game-actions .btn:active {
    transform: scale(0.93);
}

.btn-download {
    background: linear-gradient(135deg, #8B0000, #5C0000);
    color: #fff;
    box-shadow: 0 3px 12px rgba(139, 0, 0, 0.25);
}

.btn-benefit {
    background: linear-gradient(135deg, #c0392b, #922B21);
    color: #fff;
    box-shadow: 0 3px 12px rgba(192, 57, 43, 0.25);
}

.btn-agency {
    background: linear-gradient(135deg, #1a7a5a, #0d4a3a);
    color: #fff;
    box-shadow: 0 3px 12px rgba(26, 122, 90, 0.25);
}

/* ========== 详情页 ========== */
.detail-header {
    background: linear-gradient(135deg, #8B0000 0%, #2D0000 100%) !important;
    color: #fff;
    padding: 16px 16px 14px;
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 16px rgba(139, 0, 0, 0.25);
}

.detail-header .back-btn {
    font-size: 18px;
    font-weight: 600;
    opacity: 0.90;
    padding: 4px 10px 4px 4px;
    border-radius: 8px;
}

.detail-header .back-btn:active {
    background: rgba(255,255,255,0.15);
}

.detail-header h1 {
    font-size: 18px;
    font-weight: 600;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Tab导航 */
.tab-nav {
    display: flex;
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    position: sticky;
    top: 60px;
    z-index: 9;
    box-shadow: 0 1px 4px rgba(0,0,0,0.02);
}

.tab-nav .tab-item {
    flex: 1;
    text-align: center;
    padding: 14px 0 12px;
    font-size: 14px;
    font-weight: 500;
    color: #999;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
}

.tab-nav .tab-item.active {
    color: #8B0000;
    border-bottom-color: #8B0000;
}

.tab-nav .tab-item:active {
    background: #fafafa;
}

/* 详情内容 */
.detail-content {
    padding: 20px 16px 30px;
    max-width: 480px;
    margin: 0 auto;
    min-height: 300px;
    background: #fff;
}

.detail-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    display: block;
    margin: 10px 0;
}

.detail-content video {
    max-width: 100%;
    border-radius: 10px;
    display: block;
    margin: 10px 0;
}

.detail-content p {
    line-height: 1.9;
    margin-bottom: 12px;
    word-wrap: break-word;
}

.detail-content .btn-download-big {
    display: inline-block;
    background: linear-gradient(135deg, #8B0000, #5C0000);
    color: #fff;
    padding: 14px 44px;
    border-radius: 30px;
    font-size: 18px;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(139, 0, 0, 0.35);
}

.detail-content .btn-download-big:active {
    transform: scale(0.96);
}

/* ========== 客服悬浮窗 ========== */
.float-window {
    position: fixed;
    bottom: 90px;
    left: 16px;
    z-index: 999;
}

.float-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8B0000, #5C0000);
    color: #fff;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 24px rgba(139, 0, 0, 0.45);
    cursor: pointer;
    transition: all 0.3s;
    user-select: none;
}

.float-btn:active {
    transform: scale(0.85);
}

.float-content {
    display: none;
    background: #fff;
    border-radius: 18px;
    padding: 16px 18px 14px;
    margin-bottom: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    min-width: 160px;
    max-width: 220px;
    border: 1px solid rgba(139, 0, 0, 0.08);
    animation: floatIn 0.3s ease;
}

.float-content.open {
    display: block;
}

@keyframes floatIn {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.92);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.float-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 14px;
    color: #333;
    padding-bottom: 10px;
    border-bottom: 1px solid #f5f5f5;
    margin-bottom: 10px;
}

.float-close {
    background: none;
    border: none;
    font-size: 18px;
    color: #bbb;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

.float-close:active {
    color: #333;
}

.float-body p {
    font-size: 14px;
    padding: 4px 0;
    color: #555;
    word-break: break-all;
}

.float-body p:last-child {
    margin-bottom: 0;
}

/* ========== 空状态 ========== */
.empty-tip {
    text-align: center;
    padding: 60px 20px;
    color: #aaa;
    font-size: 16px;
    background: rgba(255,255,255,0.5);
    border-radius: 16px;
}

/* ========== 底部版权 ========== */
.footer {
    text-align: center;
    padding: 20px 0 30px;
    font-size: 12px;
    color: #ccc;
    border-top: 1px solid #f0f0f0;
    margin-top: 10px;
    background: #fff;
    padding-bottom: 100px;
}

/* ========== 响应式微调 ========== */
@media (max-width: 400px) {
    .game-icon {
        width: 62px;
        height: 62px;
    }
    .game-name {
        font-size: 17px;
    }
    .game-actions .btn {
        font-size: 12px;
        padding: 9px 0;
    }
    .badge-hot {
        font-size: 18px;
        top: 10px;
        right: 12px;
    }
    .game-info {
        padding-right: 34px;
    }
    .game-meta {
        padding: 4px 10px 6px 10px;
    }
}