/* ============================================
   云服务器砍价 - 中国电商风格样式系统
   设计理念：高信息密度 + 强信任背书 + 中国用户习惯
   ============================================ */

:root {
    /* 色彩系统 - 收敛为3色：品牌蓝 + 砍价红 + 奖励金 */
    --brand-blue: #1E3A5F;            /* 品牌主色：深蓝 */
    --brand-blue-light: #E8F4FD;      /* 品牌浅蓝 */
    
    --action-red: #E34D59;            /* 砍价红：行动色 */
    --action-red-dark: #C73845;
    --action-red-light: #FFF1F2;
    
    --reward-gold: #D4A853;           /* 奖励金：成就色 */
    --reward-gold-light: #FDF8ED;
    
    /* 中性色 */
    --text-black: #1A1A1A;
    --text-dark: #333333;
    --text-body: #4A4A4A;
    --text-gray: #8C8C8C;
    --text-light: #BFBFBF;
    --text-white: #FFFFFF;
    
    /* 背景色 - 干净浅色（规范：主背景 #F6F7FB） */
    --bg-page: #F6F7FB;
    --bg-card: #FFFFFF;
    --bg-hover: #FAFBFC;
    --bg-section: #F8F9FB;
    
    /* 边框 - 统一 */
    --border-light: #E8ECF0;
    --border-default: #DFE3E8;
    
    /* 状态色 */
    --status-success: #52C41A;
    --status-warning: #FAAD14;
    --status-error: #FF4D4F;
    
    /* 统一设计Token */
    --radius: 12px;                   /* 统一圆角 */
    --radius-sm: 8px;
    --radius-full: 100px;
    
    --shadow-card: 0 1px 3px rgba(0,0,0,0.04);  /* 统一轻阴影 */
    --shadow-hover: 0 4px 12px rgba(0,0,0,0.08);
    
    /* 间距 - 紧凑 */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 12px;
    --spacing-lg: 16px;
    --spacing-xl: 20px;
    --spacing-xxl: 24px;
}

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

html {
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    overflow-y: scroll;
    width: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--bg-page);
    color: var(--text-body);
    line-height: 1.5;
    min-height: 100vh;
    padding-top: 56px;
    overflow-x: hidden;
    width: 100%;
    min-width: 1200px;
}

/* 数字字体 */
.text-price {
    font-family: "DIN Alternate", "Helvetica Neue", -apple-system, sans-serif;
    font-weight: 700;
    font-feature-settings: "tnum";
}

/* ============================================
   排版系统 - 紧凑
   ============================================ */
.fs-xs { font-size: 12px; }
.fs-sm { font-size: 13px; }
.fs-md { font-size: 14px; }
.fs-lg { font-size: 16px; }
.fs-xl { font-size: 18px; }
.fs-xxl { font-size: 22px; }
.fs-huge { font-size: 32px; }

.text-brand { color: var(--brand-blue); }
.text-red { color: var(--action-red); }
.text-gold { color: var(--reward-gold); }
.text-dark { color: var(--text-dark); }
.text-body { color: var(--text-body); }
.text-gray { color: var(--text-gray); }
.text-light { color: var(--text-light); }
.text-white { color: white; }
.text-success { color: var(--status-success); }

.fw-normal { font-weight: 400; }
.fw-medium { font-weight: 500; }
.fw-bold { font-weight: 600; }
.fw-heavy { font-weight: 700; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

/* ============================================
   栅格系统 - 1200px（优化版）
   780 + 24 + 396 = 1200
   ============================================ */
.container {
    width: 1200px;
    margin: 0 auto;
    padding: 16px 0;
}

.row {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.col-left { flex: 0 0 780px; width: 780px; }
.col-right { 
    flex: 0 0 396px; 
    width: 396px; 
    align-self: flex-start; /* 让右侧列顶部对齐，高度自适应内容 */
}
.col-8 { flex: 0 0 780px; width: 780px; }
.col-4 { flex: 0 0 396px; width: 396px; }
.col-6 { flex: 0 0 calc(50% - 12px); }
.col-12 { width: 100%; }

/* ============================================
   顶部导航 - 国内产品风格
   ============================================ */
.pc-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 56px;
    background: #FFFFFF;
    border-bottom: 1px solid var(--border-light);
    z-index: 1000;
    display: flex;
    justify-content: center;
    overflow: hidden;
}

.pc-nav-content {
    width: 1200px;
    display: flex;
    align-items: center;
    min-width: 0;
    overflow: hidden;
}

.nav-logo {
    font-size: 18px;
    font-weight: 700;
    color: var(--brand-blue);
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    margin-right: 40px;
    flex: 0 0 auto;
    white-space: nowrap;
}

.nav-logo-icon {
    width: 28px;
    height: 28px;
    background: var(--brand-blue);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
}

.nav-links {
    display: flex;
    gap: 4px;
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    scrollbar-width: none;
}

.nav-links::-webkit-scrollbar {
    display: none;
}

.nav-item {
    color: var(--text-body);
    text-decoration: none;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    transition: all 0.15s;
    flex: 0 0 auto;
    white-space: nowrap;
}

.nav-item:hover {
    color: var(--brand-blue);
    background: var(--brand-blue-light);
}

.nav-item.active {
    color: var(--brand-blue);
    background: var(--brand-blue-light);
    font-weight: 500;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
    white-space: nowrap;
}

.nav-link {
    color: var(--text-gray);
    font-size: 13px;
    text-decoration: none;
}

.nav-link:hover {
    color: var(--brand-blue);
}

.nav-divider {
    width: 1px;
    height: 16px;
    background: var(--border-default);
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    text-decoration: none;
}

.nav-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--brand-blue-light);
}

.avatar-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-gray);
    font-size: 12px;
    line-height: 1;
    object-fit: cover;
}

.user-icon-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 50%;
    color: var(--brand-blue);
    background: linear-gradient(135deg, #EEF6FF 0%, #E6F0FF 100%);
    box-shadow: inset 0 0 0 1px rgba(47, 114, 232, 0.14);
}

.user-icon-fallback::before {
    content: '';
    width: 52%;
    height: 52%;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8Zm0 2c-4.42 0-8 2.24-8 5v1h16v-1c0-2.76-3.58-5-8-5Z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8Zm0 2c-4.42 0-8 2.24-8 5v1h16v-1c0-2.76-3.58-5-8-5Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ============================================
   卡片组件 - 统一白底 + 细边框 + 轻阴影（优化版）
   圆角：12px | 边框：1px #E9EDF3 | 阴影：很淡
   内边距：16px | 间距：16px
   ============================================ */
.card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid #E9EDF3;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    margin-bottom: 16px;
}

.card:hover {
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.1);
}

.card-compact {
    padding: 16px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #E9EDF3;
}

.card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}



/* 兼容旧版 action-box-v2（防止其他页面报错） */
.action-box-v2 {
    width: 396px;
    background: var(--bg-card);
    border: 1px solid #E9EDF3;
    border-radius: 12px;
    padding: 20px;
    position: sticky;
    top: 88px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.action-box-v2-header {
    text-align: center;
    padding-bottom: 16px;
    border-bottom: 1px solid #E9EDF3;
    margin-bottom: 16px;
}

.action-box-v2-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.action-box-v2-desc {
    font-size: 13px;
    color: var(--text-gray);
}

.qrcode-section-v2 { text-align: center; padding: 16px; background: var(--bg-section); border-radius: 8px; margin-bottom: 16px; }
.qrcode-wrap-v2 { width: 240px; height: 240px; margin: 0 auto 12px; padding: 12px; background: white; border-radius: 8px; }
.qrcode-wrap-v2 img { width: 100%; height: 100%; }
.qrcode-tip-v2 { font-size: 13px; color: var(--text-gray); text-align: center; }
.copy-btns-v2 { display: flex; gap: 12px; margin-bottom: 16px; }
.copy-btn-v2 { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; height: 40px; background: var(--bg-section); border: 1px solid #E9EDF3; border-radius: 8px; font-size: 13px; color: var(--text-body); cursor: pointer; transition: all 0.15s; }
.copy-btn-v2:hover { border-color: var(--brand-blue); color: var(--brand-blue); }
.progress-mini-card { padding: 14px; background: var(--action-red-light); border-radius: 8px; margin-bottom: 16px; }
.progress-mini-title { font-size: 12px; color: var(--text-gray); margin-bottom: 6px; }
.progress-mini-values { display: flex; justify-content: space-between; margin-bottom: 8px; }
.progress-mini-cut { font-size: 15px; font-weight: 600; color: var(--brand-blue); }
.progress-mini-remain { font-size: 15px; font-weight: 600; color: var(--action-red); }
.progress-mini-bar { height: 8px; background: white; border-radius: 100px; overflow: hidden; margin-bottom: 6px; }
.progress-mini-fill { height: 100%; background: linear-gradient(90deg, var(--brand-blue), #3B82F6); border-radius: 100px; }
.progress-mini-info { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-gray); }
.action-box-footer { text-align: center; margin-top: 12px; }
.action-box-footer-link { font-size: 12px; color: var(--text-gray); text-decoration: none; }
.action-box-footer-link:hover { color: var(--brand-blue); }

/* ============================================
   按钮组件 - 主次分明
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 20px;
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.15s;
    white-space: nowrap;
}

/* 主按钮 - 砍价红 */
.btn-primary {
    background: var(--action-red);
    color: white;
}

.btn-primary:hover {
    background: var(--action-red-dark);
}

/* 次按钮 - 描边 */
.btn-secondary {
    background: white;
    border: 1px solid var(--border-default);
    color: var(--text-body);
}

.btn-secondary:hover {
    border-color: var(--brand-blue);
    color: var(--brand-blue);
}

/* 品牌按钮 */
.btn-brand {
    background: var(--brand-blue);
    color: white;
}

.btn-brand:hover {
    background: #162D4A;
}

/* 幽灵按钮 */
.btn-ghost {
    background: var(--bg-page);
    color: var(--text-gray);
}

.btn-ghost:hover {
    background: var(--bg-hover);
    color: var(--text-dark);
}

/* 尺寸 */
.btn-sm { height: 32px; padding: 0 14px; font-size: 13px; }
.btn-lg { height: 48px; padding: 0 28px; font-size: 16px; font-weight: 600; }
.btn-block { width: 100%; }

.btn-disabled, .btn:disabled {
    background: #E8E8E8;
    color: var(--text-light);
    cursor: not-allowed;
}

/* ============================================
   标签 - 小胶囊
   ============================================ */
.tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 500;
    border-radius: 4px;
    white-space: nowrap;
}

.tag-red { background: var(--action-red-light); color: var(--action-red); }
.tag-red-solid { background: var(--action-red); color: white; }
.tag-gold { background: var(--reward-gold-light); color: #8B6914; }
.tag-blue { background: var(--brand-blue-light); color: var(--brand-blue); }
.tag-success { background: #F6FFED; color: var(--status-success); }
.tag-gray { background: #F5F5F5; color: var(--text-gray); }

/* ============================================
   指标条 - 横向左对齐（国内风格）
   ============================================ */
.metric-bar {
    display: flex;
    align-items: center;
    padding: var(--spacing-lg);
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
}

.metric-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1;
}

.metric-value.text-red { color: var(--action-red); }
.metric-value.text-brand { color: var(--brand-blue); }
.metric-value.text-success { color: var(--status-success); }

.metric-unit {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-gray);
    margin-left: 4px;
}

.metric-info {
    margin-left: 12px;
}

.metric-label {
    font-size: 13px;
    color: var(--text-gray);
}

.metric-trend {
    font-size: 12px;
    color: var(--status-success);
    margin-top: 2px;
}

.metric-icon {
    margin-left: auto;
    width: 40px;
    height: 40px;
    background: var(--bg-section);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

/* ============================================
   商品卡片 - 白底 + 小色点缀（拼多多式但高级）
   ============================================ */
.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: var(--spacing-lg);
    cursor: pointer;
    transition: all 0.15s;
}

.product-card:hover {
    border-color: var(--brand-blue);
    box-shadow: var(--shadow-hover);
}

.product-header {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.product-icon {
    width: 48px;
    height: 48px;
    background: var(--brand-blue-light);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.product-title {
    flex: 1;
}

.product-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.product-specs {
    font-size: 13px;
    color: var(--text-gray);
}

.product-price-row {
    display: flex;
    align-items: baseline;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
}

.product-price-label {
    font-size: 12px;
    color: var(--text-gray);
}

.product-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--action-red);
}

.product-price .unit {
    font-size: 14px;
    font-weight: 400;
}

.product-original {
    font-size: 13px;
    color: var(--text-light);
    text-decoration: line-through;
}

.product-meta {
    font-size: 12px;
    color: var(--text-gray);
    margin-bottom: var(--spacing-md);
}

.product-actions {
    display: flex;
    gap: var(--spacing-sm);
}

/* ============================================
   行动盒子 - 首页右侧核心
   ============================================ */
.action-box {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: var(--spacing-xl);
    position: sticky;
    top: 72px;
}

.action-box-header {
    text-align: center;
    padding-bottom: var(--spacing-lg);
    border-bottom: 1px solid var(--border-light);
    margin-bottom: var(--spacing-lg);
}

.action-box-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.action-box-desc {
    font-size: 13px;
    color: var(--text-gray);
}

/* 扫码区域 */
.qrcode-section {
    text-align: center;
    padding: var(--spacing-lg);
    background: var(--bg-section);
    border-radius: var(--radius-sm);
    margin-bottom: var(--spacing-lg);
}

.qrcode-wrap {
    width: 140px;
    height: 140px;
    margin: 0 auto var(--spacing-md);
    padding: 8px;
    background: white;
    border-radius: var(--radius-sm);
}

.qrcode-wrap img {
    width: 100%;
    height: 100%;
}

.qrcode-tip {
    font-size: 13px;
    color: var(--text-gray);
}

/* 复制按钮组 */
.copy-btns {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
}

.copy-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    background: var(--bg-section);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-body);
    cursor: pointer;
    transition: all 0.15s;
}

.copy-btn:hover {
    border-color: var(--brand-blue);
    color: var(--brand-blue);
}

/* 进度预览 */
.progress-preview {
    padding: var(--spacing-lg);
    background: var(--action-red-light);
    border-radius: var(--radius-sm);
    margin-bottom: var(--spacing-lg);
}

.progress-preview-title {
    font-size: 13px;
    color: var(--text-gray);
    margin-bottom: var(--spacing-sm);
}

.progress-preview-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--action-red);
    margin-bottom: var(--spacing-sm);
}

.progress-bar {
    height: 8px;
    background: white;
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--action-red);
    border-radius: var(--radius-full);
    transition: width 0.5s ease;
}

.progress-lg .progress-bar {
    height: 12px;
}

/* ============================================
   玩法步骤
   ============================================ */
.steps-section {
    display: flex;
    gap: var(--spacing-lg);
    padding: var(--spacing-xl) 0;
}

.step-item {
    flex: 1;
    text-align: center;
    position: relative;
}

.step-item::after {
    content: '';
    position: absolute;
    top: 24px;
    right: -32px;
    width: 48px;
    height: 2px;
    background: var(--border-default);
}

.step-item:last-child::after {
    display: none;
}

.step-icon {
    width: 48px;
    height: 48px;
    background: var(--brand-blue-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--spacing-md);
    font-size: 20px;
}

.step-num {
    position: absolute;
    top: -4px;
    right: calc(50% - 28px);
    width: 18px;
    height: 18px;
    background: var(--brand-blue);
    color: white;
    font-size: 11px;
    font-weight: 600;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.step-desc {
    font-size: 12px;
    color: var(--text-gray);
}

/* ============================================
   成功榜 - 紧凑列表
   ============================================ */
.success-list {
    max-height: 280px;
    overflow-y: auto;
}

.success-item {
    display: flex;
    align-items: center;
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid var(--border-light);
}

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

.success-rank {
    width: 24px;
    height: 24px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-gray);
    display: flex;
    align-items: center;
    justify-content: center;
}

.success-rank.top-1 { color: var(--reward-gold); }
.success-rank.top-2 { color: #A0A0A0; }
.success-rank.top-3 { color: #CD7F32; }

.success-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--brand-blue-light);
    margin: 0 var(--spacing-sm);
}

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

.success-name {
    font-size: 13px;
    color: var(--text-dark);
}

.success-time {
    font-size: 11px;
    color: var(--text-light);
}

.success-product {
    font-size: 12px;
    color: var(--text-gray);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============================================
   实时动态滚动
   ============================================ */
.live-ticker {
    background: var(--bg-section);
    border-radius: var(--radius-sm);
    padding: var(--spacing-sm) var(--spacing-lg);
    overflow: hidden;
}

.live-ticker-content {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 13px;
    color: var(--text-body);
    animation: ticker-slide 15s linear infinite;
}

@keyframes ticker-slide {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ============================================
   保障区
   ============================================ */
.guarantee-section {
    display: flex;
    gap: var(--spacing-lg);
    padding: 35px var(--spacing-xl);
    min-height: 92px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    align-items: center;
}

.guarantee-item {
    flex: 1;
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.guarantee-icon {
    width: 40px;
    height: 40px;
    background: var(--bg-section);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.guarantee-text {
    font-size: 13px;
}

.guarantee-title {
    color: var(--text-dark);
    font-weight: 500;
}

.guarantee-desc {
    color: var(--text-gray);
    font-size: 12px;
}

/* ============================================
   规则摘要
   ============================================ */
.rules-summary {
    display: flex;
    gap: var(--spacing-xl);
    padding: var(--spacing-lg);
    background: var(--bg-section);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-gray);
}

.rules-summary-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.rules-summary-item::before {
    content: '•';
    color: var(--text-light);
}

/* ============================================
   进度条
   ============================================ */
.progress-container {
    height: 8px;
    background: var(--bg-section);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-container.progress-lg {
    height: 12px;
}

/* ============================================
   头像
   ============================================ */
.avatar {
    border-radius: 50%;
    background: var(--brand-blue-light);
    flex-shrink: 0;
}

.avatar-xs { width: 24px; height: 24px; }
.avatar-sm { width: 32px; height: 32px; }
.avatar-md { width: 40px; height: 40px; }
.avatar-lg { width: 56px; height: 56px; }
.avatar-xl { width: 80px; height: 80px; }

/* ============================================
   弹窗
   ============================================ */
.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: 2000;
}

.modal-overlay.show {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    width: 480px;
    max-width: 90vw;
    border-radius: var(--radius);
    position: relative;
    animation: modal-in 0.2s ease-out;
    overflow: hidden;
}

@keyframes modal-in {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
    padding: var(--spacing-xl);
    text-align: center;
    background: var(--bg-section);
}

.modal-body {
    padding: var(--spacing-xl);
}

.modal-footer {
    padding: var(--spacing-lg) var(--spacing-xl) var(--spacing-xl);
    display: flex;
    gap: var(--spacing-md);
}

.close-modal {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0,0,0,0.05);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--text-gray);
}

.close-modal:hover {
    background: rgba(0,0,0,0.1);
}

/* ============================================
   倒计时
   ============================================ */
.countdown {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.countdown-item {
    background: var(--text-dark);
    color: white;
    padding: 4px 6px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    min-width: 24px;
    text-align: center;
    font-family: "DIN Alternate", monospace;
}

.countdown-sep {
    color: var(--text-dark);
    font-weight: 600;
}

/* ============================================
   工具类
   ============================================ */
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-5 { margin-top: 20px; }

.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-5 { margin-bottom: 20px; }

.ml-1 { margin-left: 4px; }
.ml-2 { margin-left: 8px; }
.mr-1 { margin-right: 4px; }
.mr-2 { margin-right: 8px; }

.p-3 { padding: 12px; }
.p-4 { padding: 16px; }
.p-5 { padding: 20px; }

.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-5 { gap: 20px; }

.d-flex { display: flex; }
.flex-column { flex-direction: column; }
.flex-1 { flex: 1; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }

/* ============================================
   助力记录
   ============================================ */
.support-record {
    display: flex;
    align-items: center;
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid var(--border-light);
}

.support-record:last-child {
    border-bottom: none;
}

.support-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--brand-blue-light);
    margin-right: var(--spacing-md);
}

.support-info { flex: 1; }
.support-name { font-size: 13px; color: var(--text-dark); }
.support-time { font-size: 12px; color: var(--text-light); }
.support-amount { font-size: 14px; font-weight: 600; color: var(--action-red); }

/* ============================================
   任务行
   ============================================ */
.task-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--bg-section);
    border-radius: var(--radius-sm);
    margin-bottom: var(--spacing-sm);
}

.task-row:last-child { margin-bottom: 0; }

.task-info { flex: 1; }
.task-title { font-size: 14px; font-weight: 500; color: var(--text-dark); }
.task-desc { font-size: 12px; color: var(--text-gray); }
.task-reward { font-size: 14px; font-weight: 600; color: var(--action-red); margin-right: var(--spacing-md); }

/* ============================================
   排行榜
   ============================================ */
.rank-podium {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 24px;
    padding: 40px 20px 30px;
    background: var(--bg-section);
    border-radius: var(--radius);
    margin-bottom: var(--spacing-xl);
}

.rank-podium-item { text-align: center; flex: 1; }
.rank-crown { font-size: 24px; margin-bottom: 8px; }
.rank-name { font-size: 13px; font-weight: 500; color: var(--text-dark); margin-top: 8px; }
.rank-company { font-size: 11px; color: var(--text-gray); }
.rank-time { font-size: 12px; color: var(--reward-gold); margin-top: 4px; }

.rank-podium-block {
    height: 60px;
    margin-top: 12px;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
}

.rank-tag {
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 600;
    border-radius: var(--radius-full);
}

.rank-list-item {
    display: flex;
    align-items: center;
    padding: var(--spacing-md) var(--spacing-lg);
    border-bottom: 1px solid var(--border-light);
    gap: var(--spacing-md);
}

.rank-list-item:hover { background: var(--bg-hover); }
.rank-list-item:last-child { border-bottom: none; }

.rank-list-rank {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg-section);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-gray);
}

.rank-list-info { flex: 1; }
.rank-list-name { font-size: 13px; font-weight: 500; color: var(--text-dark); }
.rank-list-desc { font-size: 12px; color: var(--text-gray); }
.rank-list-time { font-size: 13px; font-weight: 600; color: var(--reward-gold); }

/* ============================================
   里程碑
   ============================================ */
.milestone-bar {
    display: flex;
    justify-content: space-between;
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-lg);
}

.milestone-item { text-align: center; position: relative; z-index: 1; }

.milestone-icon {
    width: 36px;
    height: 36px;
    background: var(--bg-section);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 6px;
    font-size: 16px;
    border: 2px solid var(--border-default);
}

.milestone-item.active .milestone-icon {
    background: var(--reward-gold-light);
    border-color: var(--reward-gold);
}

.milestone-item.completed .milestone-icon {
    background: var(--status-success);
    border-color: var(--status-success);
    color: white;
}

.milestone-label { font-size: 11px; color: var(--text-gray); }

/* ============================================
   首砍/成功动画
   ============================================ */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.anim-pulse { animation: pulse 2s ease-in-out infinite; }

@keyframes pop {
    0% { transform: scale(0.8); opacity: 0; }
    70% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

.anim-pop { animation: pop 0.4s ease-out forwards; }

/* 滚动条 */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #D9D9D9; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #BFBFBF; }

/* ============================================
   sticky侧边栏
   ============================================ */
.sticky-sidebar {
    position: sticky;
    top: 72px;
}

/* ============================================
   商品卡片 - 列表式
   ============================================ */
.item-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.15s;
}

.item-card:hover {
    border-color: var(--brand-blue);
    box-shadow: var(--shadow-hover);
}

.item-img-wrap {
    position: relative;
    padding-top: 60%;
    background: var(--bg-section);
}

.item-tag {
    position: absolute;
    top: 8px;
    left: 8px;
}

.item-info {
    padding: var(--spacing-md);
}

.item-name {
    font-size: 13px;
    color: var(--text-dark);
    margin-bottom: 4px;
    font-weight: 500;
}

.item-price-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.item-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--action-red);
}

.item-price-unit { font-size: 12px; }

.item-original-price {
    font-size: 12px;
    color: var(--text-light);
    text-decoration: line-through;
}

.item-meta {
    font-size: 11px;
    color: var(--text-gray);
    margin-top: 4px;
}

/* ============================================
   空状态
   ============================================ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.5; }
.empty-title { font-size: 15px; color: var(--text-dark); margin-bottom: 8px; }
.empty-desc { font-size: 13px; color: var(--text-gray); margin-bottom: 20px; }

/* ============================================
   魔方用户中心框架嵌入
   ============================================ */
body.bargain-clientarea-body,
body.bargain-clientarea-body.has-console-bar,
body.bargain-clientarea-body.final-push-page {
    padding-top: 0;
    min-width: 0;
}

body.bargain-clientarea-body {
    height: 100vh;
    overflow: hidden;
}

.bargain-clientarea-template {
    height: 100vh;
    min-height: 0;
    overflow: hidden;
}

.bargain-clientarea-template .bargain-clientarea-frame,
.bargain-clientarea-template .bargain-clientarea-inner {
    height: 100vh;
    min-height: 0;
    overflow: hidden;
}

.bargain-clientarea-template .bargain-clientarea-inner {
    display: flex;
    flex-direction: column;
}

.bargain-clientarea-template .bargain-clientarea-main {
    background: var(--bg-page);
    height: calc(100vh - 40px - 0.48rem);
    min-height: 0;
    padding: 0 20px 20px;
    padding-top: 0 !important;
    overflow: auto;
}

.bargain-clientarea-template .bargain-clientarea-content {
    position: relative;
    z-index: 0;
    min-width: 0;
    margin-top: 0 !important;
    padding-top: 16px !important;
}

.bargain-clientarea-template .pc-nav {
    position: sticky;
    top: 0;
    left: auto;
    width: calc(100% + 40px);
    max-width: none;
    height: 56px;
    flex: 0 0 56px;
    z-index: 2000;
    margin: 0 -20px;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    display: flex !important;
    background: #FFFFFF;
    border: 0;
    border-bottom: 1px solid var(--border-light);
    border-radius: 0;
    box-shadow: 0 1px 0 rgba(232, 236, 240, 0.95);
    overflow: hidden;
    isolation: isolate;
    transform: translateZ(0);
}

.bargain-clientarea-template .pc-nav-content {
    width: 100%;
    padding: 0 24px;
}

.bargain-clientarea-body .bargain-clientarea-template .console-bar,
.bargain-clientarea-body .bargain-clientarea-template .urgent-bar {
    position: sticky;
    top: 56px;
    left: auto;
    width: 100%;
    z-index: 19;
    margin-bottom: 16px;
}

.bargain-clientarea-body .bargain-clientarea-template .console-bar-inner,
.bargain-clientarea-body .bargain-clientarea-template .urgent-bar-content {
    width: 100%;
    max-width: 1200px;
}

.bargain-clientarea-body.has-console-bar .bargain-clientarea-template .sidebar-sticky,
.bargain-clientarea-body:not(.has-console-bar) .bargain-clientarea-template .sidebar-sticky {
    top: 72px;
}

.bargain-clientarea-template .ranking-sidebar {
    top: 72px;
}

.bargain-clientarea-template .container {
    width: min(1200px, 100%);
    max-width: 1200px;
}

.bargain-clientarea-template .bargain-clientarea-content > :first-child {
    margin-top: 0 !important;
}

.bargain-clientarea-template .ranking-page {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.bargain-clientarea-template .bargain-clientarea-content > .container {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.bargain-clientarea-template .ranking-container {
    width: min(1200px, 100%);
    max-width: 1200px;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

@media (max-width: 1240px) {
    .bargain-clientarea-template .ranking-container {
        padding: 0 0 16px !important;
    }
}
