/* ==========================
   核心变量 - 分类整理 + 苹果风格统一
   ========================== */
:root {
    /* 主色调 - 红橙渐变体系 */
    --primary-red: #ff3b30;
    --primary-orange: #ff9500;
    --primary-gradient: linear-gradient(135deg, #ff3b30 0%, #ff9500 100%);
    --secondary-red: #d32f2f;
    --urgent-red: #ff375f;
    
    /* 功能色 */
    --accent-yellow: #ffcc00;
    --success-green: #34c759;
    --link-blue: #007aff;
    
    /* 中性色 - 苹果官网标准 */
    --dark: #1d1d1f;
    --light: #ffffff;
    --gray-100: #f5f5f7;  /* 苹果浅灰 */
    --gray-200: #e5e5ea;  /* 苹果中浅灰 */
    --gray-300: #d2d2d7;  /* 新增：苹果中灰 */
    --gray-600: #8e8e93;  /* 苹果深灰 */
    --gray-800: #636366;  /* 新增：苹果超深灰 */
    
    /* 阴影 - 苹果细腻阴影体系 */
    --shadow-sm: 0 2px 8px rgba(255, 59, 48, 0.1);
    --shadow-md: 0 4px 20px rgba(255, 59, 48, 0.15);
    --shadow-lg: 0 8px 30px rgba(255, 59, 48, 0.2);
    --btn-shadow: 0 4px 15px rgba(255, 59, 48, 0.3);
    --btn-shadow-active: 0 2px 8px rgba(255, 59, 48, 0.4);
    --glass-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    
    /* 液态玻璃核心变量 - 苹果官方参数 */
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-bg-dark: rgba(245, 245, 247, 0.8);
    --glass-border: rgba(200, 200, 200, 0.2);
    --glass-blur: 12px;
    --glass-border-strong: rgba(255, 255, 255, 0.5);
    
    /* 圆角 - 苹果分级体系 */
    --radius-xs: 4px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-circle: 50%;
    
    /* 过渡动画 - 苹果标准曲线 */
    --transition-fast: all 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);
    --transition-normal: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
    --transition-slow: all 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
    
    /* 排版 - 苹果SF字体体系 */
    --font-xs: 0.7rem;
    --font-sm: 0.8rem;
    --font-base: 0.85rem;
    --font-md: 0.9rem;
    --font-lg: 1rem;
    --font-xl: 1.2rem;
    --font-2xl: 1.4rem;
}

/* ==========================
   基础重置 - 增强版
   ========================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -webkit-text-size-adjust: 100%;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: linear-gradient(135deg, #fff5f5 0%, #fff0e6 100%);
    color: var(--dark);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.5;
}

/* 移动端文本选择优化 */
*:not(input):not(textarea):not(.activation-code) {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

input, textarea, .activation-code {
    -webkit-user-select: auto;
    -moz-user-select: auto;
    -ms-user-select: auto;
    user-select: auto;
}

/* ==========================
   全局通用组件
   ========================== */
/* 状态栏 - 苹果液态玻璃 */
.status-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: env(safe-area-inset-top);
    background: rgba(255, 255, 255, 0.7);
    -webkit-backdrop-filter: blur(var(--glass-blur));
    backdrop-filter: blur(var(--glass-blur));
    z-index: 9999;
}

/* 头部区域 - 优化液态玻璃质感 */
.header {
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(var(--glass-blur));
    backdrop-filter: blur(var(--glass-blur));
    padding: calc(env(safe-area-inset-top) + 10px) max(15px, env(safe-area-inset-left)) 12px max(15px, env(safe-area-inset-right));
    color: var(--dark);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: var(--glass-shadow);
    border-bottom: 1px solid var(--glass-border);
}

.header::before {
    position: absolute;
    top: 8px;
    right: max(15px, env(safe-area-inset-right));
    font-size: var(--font-sm);
    opacity: 0.9;
    background: rgba(0, 0, 0, 0.05);
    color: var(--dark);
    padding: 2px 8px;
    border-radius: 10px;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-title {
    font-size: var(--font-xl);
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 6px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.header-actions {
    display: flex;
    gap: 10px;
}

/* 头部按钮 - 优化点击反馈 */
.header-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    border-radius: var(--radius-circle);
    background: var(--glass-bg-dark);
    border: 1px solid var(--glass-border);
    color: var(--dark);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
    font-size: var(--font-lg);
}

.header-btn:active {
    background: rgba(235, 235, 245, 0.9);
    transform: scale(0.95);
    border-color: rgba(200, 200, 200, 0.4);
}

/* 主要内容区域 - 优化间距和安全区域 */
.main-content {
    margin-top: calc(env(safe-area-inset-top) + 60px);
    padding: 15px max(12px, env(safe-area-inset-left)) 20px max(12px, env(safe-area-inset-right));
    min-height: calc(100vh - 80px);
}

/* ==========================
   核心业务组件
   ========================== */
/* 轮播图 - 强化苹果液态玻璃质感 */
.slider-container {
    background: rgba(255, 255, 255, 0.15);
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 15px;
    box-shadow: 
        0 8px 30px rgba(0, 0, 0, 0.08),
        0 2px 10px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    height: 140px;
    position: relative;
    border: 1px solid var(--glass-border-strong);
}

.slider-item {
    width: 100%;
    height: 100%;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark);
    font-size: var(--font-lg);
    font-weight: 600;
    text-align: center;
    padding: 15px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.slider-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: var(--radius-circle);
    background: rgba(255, 255, 255, 0.4);
    transition: var(--transition-normal);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.dot.active {
    width: 16px;
    border-radius: var(--radius-xs);
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.9);
}

/* 紧急通知条 - 优化动画流畅度 */
.urgent-notice {
    background: linear-gradient(90deg, #ff375f, #ff6b9d);
    color: white;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: noticePulse 3s infinite ease-in-out;
}

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

.notice-icon {
    font-size: var(--font-base);
    margin-right: 8px;
    animation: pulse 2s infinite;
}

.notice-text {
    flex: 1;
    font-size: var(--font-base);
    font-weight: 500;
}

.notice-countdown {
    background: rgba(255, 255, 255, 0.2);
    padding: 3px 8px;
    border-radius: 15px;
    font-size: var(--font-sm);
    font-weight: 600;
    min-width: 80px;
    text-align: center;
}

@keyframes pulse {
    0% { opacity: 0.7; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
    100% { opacity: 0.7; transform: scale(1); }
}

/* 快捷入口 - 优化液态玻璃交互 */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.quick-action {
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(var(--glass-blur));
    backdrop-filter: blur(var(--glass-blur));
    border-radius: var(--radius-md);
    padding: 12px 8px;
    text-align: center;
    box-shadow: var(--glass-shadow);
    cursor: pointer;
    text-decoration: none;
    color: var(--dark);
    border: 1px solid var(--glass-border);
    position: relative;
    overflow: hidden;
    transition: var(--transition-fast);
}

.quick-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.quick-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-200) 100%);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 6px;
    font-size: var(--font-lg);
    color: var(--dark);
    transition: transform 0.3s ease;
}

.quick-action:hover .quick-icon {
    transform: scale(1.1);
}

.quick-name {
    font-size: var(--font-xs);
    color: var(--dark);
    font-weight: 600;
}

/* 商品列表 - 优化网格间距 */
.product-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

/* 商品卡片 - 优化悬浮效果 */
.product-card {
    background: var(--light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.8) !important;
    transition: var(--transition-normal);
}

.product-card:hover, .product-card:active {
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 10px 25px rgba(255, 59, 48, 0.2);
    border-color: var(--primary-red);
}

.product-image {
    width: 100%;
    aspect-ratio: 1/1;
    background: linear-gradient(135deg, #ffeaea 0%, #fff0e0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* 兼容不支持aspect-ratio的浏览器 */
@supports not (aspect-ratio: 1/1) {
    .product-image {
        padding-top: 100%;
        height: 0;
    }
    
    .product-image img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

/* 商品标签体系 */
.product-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--accent-yellow);
    color: var(--dark);
    padding: 3px 8px;
    border-radius: 15px;
    font-size: var(--font-xs);
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(255, 204, 0, 0.3);
    z-index: 2;
}

.stock-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: var(--urgent-red);
    color: white;
    padding: 3px 8px;
    border-radius: 15px;
    font-size: var(--font-xs);
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(255, 55, 95, 0.3);
    z-index: 2;
    display: none;
}

.stock-low .stock-badge {
    display: block;
}

/* 排名标签 - 优化渐变和阴影 */
.rank-label {
    position: absolute;
    top: 0;
    left: 0;
    width: 40px;
    height: 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    padding: 6px 0;
    line-height: 1;
    letter-spacing: 0;
    border-radius: 0 0 12px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.rank-1.rank-label { background: linear-gradient(135deg, #ffd700 0%, #ff9500 100%); }
.rank-2.rank-label { background: linear-gradient(135deg, #c0c0c0 0%, #8e8e93 100%); }
.rank-3.rank-label { background: linear-gradient(135deg, #cd7f32 0%, #a0522d 100%); }
.rank-4.rank-label, .rank-5.rank-label, .rank-6.rank-label, 
.rank-7.rank-label, .rank-8.rank-label, .rank-9.rank-label, 
.rank-10.rank-label { background: linear-gradient(135deg, #ff6b6b 0%, #ff375f 100%); }

.rank-label .top-text {
    font-size: var(--font-sm);
    font-weight: 800;
    color: white;
    margin-bottom: 2px;
    text-transform: uppercase;
}

.rank-label .rank-number {
    font-size: var(--font-2xl);
    font-weight: 900;
    color: white;
    line-height: 1;
}

/* 商品信息区域 - 优化间距 */
.product-info {
    padding: 12px;
}

.product-name, .short-title, .title-part {
    font-size: var(--font-md);
    font-weight: normal;
    color: var(--dark);
    line-height: 1.4;
}

.short-title {
    text-align: center;
    margin-bottom: 8px;
    padding: 3px 0;
    min-height: 1.3em;
}

.long-title {
    text-align: left;
}

.title-part {
    display: block;
    margin-bottom: 2px;
    word-break: break-all;
}

.desc-part {
    font-size: var(--font-sm);
    font-weight: 600;
    color: var(--gray-800);
    line-height: 1.2;
    display: block;
    word-break: break-all;
}

/* 商品标签和倒计时 */
.product-tag {
    display: inline-block;
    background: var(--primary-gradient);
    color: white;
    font-size: 0.6rem;
    padding: 1px 6px;
    border-radius: var(--radius-xs);
    margin-right: 4px;
    font-weight: 700;
    vertical-align: middle;
}

.discount-countdown {
    background: linear-gradient(90deg, #ff3b30, #ff9500);
    color: white;
    padding: 3px 6px;
    border-radius: var(--radius-xs);
    font-size: var(--font-sm);
    font-weight: 600;
    margin-top: 4px;
    display: inline-block;
}

.countdown-timer {
    font-weight: 800;
    margin-left: 2px;
}

/* 价格和销量行 - 优化对齐 */
.product-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
}

.price-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.product-price {
    font-size: var(--font-lg);
    font-weight: 800;
    color: var(--primary-red);
    display: flex;
    align-items: center;
    gap: 4px;
    text-shadow: 0 1px 2px rgba(255,59,48,0.1);
    line-height: 1.2;
}

.product-price::before {
    content: '¥';
    font-size: var(--font-base);
    opacity: 0.9;
}

.product-original-price {
    font-size: var(--font-xs);
    color: var(--gray-600);
    text-decoration: line-through;
    margin-top: 2px;
    line-height: 1;
}

.product-sales {
    font-size: var(--font-sm);
    color: var(--gray-600);
    display: flex;
    align-items: center;
    gap: 4px;
}

.sales-count {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #ff6b35;
    font-weight: 600;
}

.sales-count::before {
    content: '🔥';
    font-size: var(--font-sm);
}

/* 购买按钮 - 优化点击效果 */
.buy-now-btn {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: var(--font-sm);
    font-weight: 700;
    cursor: pointer;
    min-height: 36px;
    min-width: 90px;
    box-shadow: var(--btn-shadow);
    transition: var(--transition-fast);
    z-index: 3;
}

.buy-now-btn:hover, .buy-now-btn:active {
    transform: scale(1.05);
    box-shadow: var(--btn-shadow-active);
    background: linear-gradient(135deg, #ff2d20 0%, #ff8800 100%);
}

/* 促销横幅 - 优化光泽动画 */
.promo-banner {
    background: linear-gradient(90deg, #ff6b6b, #ffa726);
    color: white;
    padding: 12px;
    border-radius: var(--radius-md);
    margin: 15px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.promo-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 200%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    animation: bannerShine 3s infinite;
}

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

.promo-icon {
    font-size: 1.8rem;
}

.promo-content h4 {
    font-size: var(--font-lg);
    font-weight: 700;
    margin-bottom: 4px;
}

.promo-content p {
    font-size: var(--font-base);
    opacity: 0.9;
}

/* 保障服务卡片 - 优化视觉层次 */
.guarantee-card {
    background: var(--light);
    color: var(--dark);
    padding: 20px 15px;
    border-radius: var(--radius-lg);
    margin-top: 20px;
    box-shadow: var(--shadow-lg);
    text-align: center;
    position: relative;
}

.guarantee-title {
    font-size: var(--font-xl);
    font-weight: 900;
    margin-bottom: 10px;
    color: var(--dark);
}

.guarantee-content {
    font-size: var(--font-md);
    line-height: 1.5;
    color: var(--gray-800);
    margin-bottom: 15px;
}

.guarantee-highlights {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
}

.highlight-item {
    background: #fff5f5;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: var(--font-sm);
    font-weight: 600;
    color: var(--primary-red);
    border: 1px solid #ffe0e0;
    transition: var(--transition-fast);
}

.highlight-item:hover {
    transform: scale(1.05);
    background: #ffe0e0;
}

.highlight-item::before {
    content: '✓ ';
    color: var(--primary-red);
    font-weight: 900;
}

.guarantee-tag {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--primary-red);
    color: white;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: var(--font-xs);
    font-weight: 900;
}

/* 实时成交模块 - 优化滚动体验 */
.trust-section {
    background: var(--light);
    border-radius: var(--radius-lg);
    padding: 15px;
    margin: 20px 0 60px 0;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
}

.trust-title {
    font-size: var(--font-lg);
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.trust-title::before {
    content: '🛡️';
    font-size: 1.2rem;
}

.deals-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 120px;
    overflow-y: auto;
    padding-right: 5px;
}

/* 优化滚动条样式 */
.deals-list::-webkit-scrollbar {
    width: 4px;
}

.deals-list::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: var(--radius-xs);
}

.deals-list::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: var(--radius-xs);
}

.deal-item {
    background: #fff5f5;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: var(--font-sm);
    color: var(--primary-red);
    border: 1px solid #ffe0e0;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition-fast);
}

.deal-item:hover {
    background: #ffe0e0;
    transform: scale(1.03);
}

.deal-item::before {
    content: '✅';
    font-size: var(--font-xs);
}

/* ==========================
   弹窗组件 - 全面优化
   ========================== */
/* 基础模态框 - 苹果风格 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--light);
    border-radius: var(--radius-xl);
    padding: 20px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalFadeIn 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
    position: relative;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    font-size: var(--font-xl);
    font-weight: 800;
    margin-bottom: 15px;
    text-align: center;
    color: var(--dark);
}

.modal-body {
    font-size: var(--font-md);
    line-height: 1.5;
    margin-bottom: 20px;
    text-align: center;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.modal-btn {
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    border: none;
    font-size: var(--font-md);
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-fast);
}

.modal-btn-primary {
    background: var(--primary-gradient);
    color: white;
    flex: 1;
}

.modal-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--btn-shadow);
}

.modal-btn-secondary {
    background: var(--gray-100);
    color: var(--dark);
    flex: 1;
}

.modal-btn-secondary:hover {
    background: var(--gray-200);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    border-radius: var(--radius-circle);
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition-fast);
}

.modal-close:hover {
    background: var(--gray-200);
}

/* 购买提示气泡 - 强化液态玻璃 */
.purchase-notification {
    position: fixed;
    bottom: 100px;
    right: 15px;
    background: rgba(255, 255, 255, 0.18);
    color: var(--dark);
    padding: 14px 18px;
    border-radius: var(--radius-lg);
    box-shadow: 
        0 8px 30px rgba(0, 0, 0, 0.08),
        0 2px 10px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    z-index: 999;
    max-width: 280px;
    font-size: var(--font-base);
    line-height: 1.4;
    animation: slideInRight 0.5s ease, slideOutRight 0.5s ease 5s forwards;
    display: none;
    border: 1px solid var(--glass-border-strong);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0.98;
    transform: perspective(1000px) translateZ(0);
    transition: var(--transition-fast);
}

.purchase-notification:hover {
    transform: perspective(1000px) translateZ(5px);
    box-shadow: 
        0 10px 35px rgba(0, 0, 0, 0.1),
        0 3px 12px rgba(0, 0, 0, 0.07),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
    opacity: 1;
}

@keyframes slideInRight {
    from { transform: perspective(1000px) translateX(100%) translateZ(0); opacity: 0; }
    to { transform: perspective(1000px) translateX(0) translateZ(0); opacity: 0.98; }
}

@keyframes slideOutRight {
    from { transform: perspective(1000px) translateX(0) translateZ(0); opacity: 0.98; }
    to { transform: perspective(1000px) translateX(100%) translateZ(0); opacity: 0; }
}

.purchase-notification::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
    border-radius: var(--radius-lg);
    pointer-events: none;
}

.notification-text {
    font-weight: 500;
    opacity: 0.95;
    text-align: center;
}

.notification-time, .notification-phone, .notification-price, .notification-product {
    font-weight: 700;
}

.notification-phone { color: var(--accent-yellow); }
.notification-price { color: var(--primary-red); }

.notification-close {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(255, 255, 255, 0.2);
    width: 18px;
    height: 18px;
    border-radius: var(--radius-circle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-xs);
    cursor: pointer;
    opacity: 0.7;
    transition: var(--transition-fast);
}

.notification-close:hover {
    opacity: 1;
}

/* 视频弹窗 - 彻底修复溢出问题 */
#dealVideoModal.modal-overlay {
    display: none !important;
    justify-content: center !important;
    align-items: center !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0,0,0,0.7) !important;
    z-index: 9999 !important;
    overflow: hidden !important;
}

.deal-video-modal-content {
    max-width: 95vw !important;
    width: 360px !important;
    max-height: 90vh !important;
    padding: 15px !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    border-radius: var(--radius-lg) !important;
    background: var(--light) !important;
    position: relative !important;
}

.deal-video-wrapper {
    width: 100% !important;
    flex: 1 !important;
    overflow: hidden !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 10px 0 !important;
}

/* 9:16竖屏视频容器 - 精准比例控制 */
.video-aspect-container {
    position: relative !important;
    width: 100% !important;
    max-width: 300px !important;
    max-height: calc(100% - 40px) !important;
    aspect-ratio: 9/16 !important;
    background: #000 !important;
    border-radius: var(--radius-md) !important;
    overflow: hidden !important;
}

#dealVideo, #dealVideoCover {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

/* ==========================
   功能按钮和状态
   ========================== */
/* 加载动画 - 优化速度 */
.loading {
    text-align: center;
    padding: 20px;
    color: var(--gray-600);
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 59, 48, 0.3);
    border-radius: var(--radius-circle);
    border-top-color: var(--primary-red);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 空状态 - 优化视觉 */
.empty-state {
    text-align: center;
    padding: 30px 15px;
    color: var(--gray-600);
}

.empty-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    opacity: 0.5;
}

/* 卡密选择列表 - 优化交互 */
.card-code-list {
    margin: 15px 0;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    background: var(--light);
}

.card-code-item {
    padding: 12px 15px;
    border-bottom: 1px solid var(--gray-100);
    cursor: pointer;
    transition: background var(--transition-normal);
}

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

.card-code-item:hover {
    background: var(--gray-100);
}

.card-code-item.selected {
    background: #e8f4ff;
    border-left: 3px solid var(--link-blue);
}

.card-code-item .order-info {
    font-size: var(--font-sm);
    color: var(--gray-800);
    margin-top: 5px;
}

/* 功能按钮 - 统一样式 */
.guide-buy-btn, .download-btn, .copy-btn {
    width: 100%;
    padding: 10px;
    border-radius: var(--radius-sm);
    border: none;
    font-size: var(--font-md);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    margin-top: 8px;
}

.guide-buy-btn {
    background: var(--primary-gradient);
    color: white;
    margin-top: 15px;
}

.download-btn {
    background: linear-gradient(135deg, #34c759 0%, #00c853 100%);
    color: white;
}

.copy-btn {
    background: linear-gradient(135deg, #007aff 0%, #5ac8fa 100%);
    color: white;
}

.guide-buy-btn:hover, .download-btn:hover, .copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* 下载结果 - 优化样式 */
.download-result {
    padding: 15px;
    border-radius: var(--radius-sm);
    background: #f0fff4;
    margin-top: 15px;
}

.activation-code {
    color: var(--primary-red);
    font-weight: 700;
    font-size: var(--font-lg);
    margin: 10px 0;
    word-break: break-all;
    padding: 8px;
    background: rgba(255, 59, 48, 0.05);
    border-radius: var(--radius-xs);
    text-align: center;
}

/* ==========================
   响应式适配 - 增强版
   ========================== */
/* 平板设备 */
@media (min-width: 768px) and (max-width: 1024px) {
    .product-list {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }

    .main-content {
        padding: 20px;
        max-width: 768px;
        margin-left: auto;
        margin-right: auto;
    }

    .slider-container {
        height: 180px;
    }
    
    .guarantee-card {
        padding: 25px 20px;
    }
    
    .guarantee-highlights {
        gap: 12px;
    }
    
    .purchase-notification {
        bottom: 120px;
        right: 20px;
        max-width: 320px;
    }
}

/* 桌面设备 */
@media (min-width: 1025px) {
    .product-list {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }

    .main-content {
        padding: 30px;
        max-width: 1200px;
        margin-left: auto;
        margin-right: auto;
    }

    .slider-container {
        height: 200px;
    }
    
    .guarantee-card {
        padding: 30px 25px;
        margin-top: 30px;
    }
    
    .guarantee-highlights {
        gap: 15px;
    }
    
    .purchase-notification {
        bottom: 150px;
        right: 30px;
        max-width: 350px;
    }
}

/* 小屏手机 (320px以下) */
@media (max-width: 320px) {
    .product-list {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .header-title {
        font-size: var(--font-lg);
    }
    
    .slider-item {
        font-size: var(--font-base);
    }
    
    .guarantee-card {
        margin-top: 15px;
        padding: 15px 12px;
    }
    
    .guarantee-highlights {
        flex-direction: column;
        align-items: center;
    }
    
    .purchase-notification {
        bottom: 80px;
        right: 10px;
        max-width: 240px;
    }
    
    .deal-video-modal-content {
        width: 98vw !important;
        padding: 10px !important;
    }
    
    .video-aspect-container {
        max-width: 280px !important;
    }
}