:root {
  /* 主色调 - 深蓝灰系 */
  --bg: #0f172a;
  --bg-2: #1e293b;
  --bg-3: #334155;
  --bg-4: #0b1222;
  --bg-5: #1a2332;
  
  /* 文字颜色 */
  --text-1: #f8fafc;
  --text-2: #e2e8f0;
  --text-3: #94a3b8;
  --text-4: #64748b;
  
  /* 主强调色 - 蓝色系 */
  --primary: #3b82f6;
  --primary-700: #2563eb;
  --primary-500: #60a5fa;
  --primary-300: #93c5fd;
  
  /* 成功色 */
  --success: #10b981;
  --success-700: #059669;
  
  /* 警告色 */
  --warning: #f59e0b;
  
  /* 错误色 - 用于倒计时紧迫感 */
  --error: #ef4444;
  
  /* 特殊强调 */
  --accent: #8b5cf6;
  
  /* 效果变量 */
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --shadow-lg: 0 20px 40px rgba(0,0,0,.5);
  --shadow-primary: 0 8px 20px rgba(59,130,246,.25);
  --border: 1px solid rgba(148,163,184,.08);
  --radius: 16px;
  --container: 1200px;
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg);
    color: var(--text-2);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* 通用工具类 */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary-300) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* 导航栏 */
.navbar {
    height: 80px;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-1);
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-links a {
    color: var(--text-3);
    text-decoration: none;
    margin: 0 20px;
    font-weight: 500;
    transition: 0.3s;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--text-1);
}
/* 导航栏卖货按钮 */
.nav-sell-btn {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    text-decoration: none;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: 0.2s;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}
.nav-sell-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.4);
}
.btn-login {
    background: var(--bg-3);
    color: var(--text-1);
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.3s;
}

.btn-login:hover {
    background: var(--primary);
    box-shadow: var(--shadow-primary);
}

/* Hero 区域 */
.hero {
    text-align: center;
    padding: 100px 0 60px;
    background: radial-gradient(circle at top center, var(--bg-5) 0%, var(--bg) 70%);
}

.badge {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-300);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid rgba(59, 130, 246, 0.2);
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.badge:hover {
    background: rgba(59, 130, 246, 0.2);
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.2);
}
.hero h1 {
    font-size: 56px;
    color: var(--text-1);
    margin: 24px 0;
    font-weight: 800;
    letter-spacing: -1px;
}

.hero p {
    color: var(--text-3);
    font-size: 18px;
    max-width: 600px;
    margin: 0 auto 40px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-top: 40px;
    padding-top: 40px;
    border-top: var(--border);
}

.stat-item h3 {
    font-size: 32px;
    color: var(--text-1);
}

/* 拍卖卡片区域 */
.section {
    padding: 60px 0 100px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.live-dot {
    width: 10px;
    height: 10px;
    background: var(--success);
    border-radius: 50%;
    display: inline-block;
    margin-left: 8px;
    box-shadow: 0 0 10px var(--success);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.auction-grid {
    display: grid;
    /* auto-fit 配合 minmax，允许卡片缩小到 250px */
    /* 当屏幕够宽时（比如电脑），一行能放 4-5 个 */
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); 
    gap: 20px;
    padding-bottom: 60px;
}

/* 卡片组件设计 */
.card {
    background: var(--bg-2);
    border-radius: var(--radius);
    border: var(--border);
    overflow: hidden;
    transition: 0.4s ease;
    position: relative;
    box-shadow: var(--shadow);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-hover);
}

.card-image {
    position: relative; /* 必须有 */
    overflow: hidden;   /* 防止遮罩溢出 */
    width: 100%;
    aspect-ratio: 4 / 3; 
    overflow: hidden;
    background: var(--bg-4); /* 没有图片时的底色 */



}

/* 图片本身的过渡 */
.card-image img{
    width: 100%;
    height: 100%;
    /* 核心：保持比例填满，多余部分裁切 */
    object-fit: cover; 
    /* 或者用 object-fit: contain; // 如果你想完整显示图片留黑边 */
    display: block;
    transition: transform 0.3s ease, filter 0.3s ease;
}
.card-image > div { /* 那个首字母的div */
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: bold;
    color: var(--text-3);
    background: var(--bg-3);
}
/* 悬浮遮罩层 */
.info-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.85); /* 深色半透明背景 */
    backdrop-filter: blur(4px);         /* 磨砂效果 */
    
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    text-align: center;
    
    opacity: 0;             /* 默认不可见 */
    transform: translateY(10px); /* 默认稍微下沉 */
    transition: all 0.3s ease;
    z-index: 10;            /* 在标签和倒计时之下，还是之上？建议在标签之下 */
}

/* 悬浮时的状态 */
.card-image:hover .info-overlay {
    opacity: 1;
    transform: translateY(0);
}

.card-image:hover img {
    transform: scale(1.1); /* 图片轻微放大 */
}

/* 遮罩层里的文字样式 */
.info-row {
    color: #fff;
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.info-row i { color: var(--primary-300); }

.info-desc {
    color: var(--text-3);
    font-size: 12px;
    margin-top: 8px;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 8px;
    width: 100%;
    text-align: left;
    
    /* 多行省略 */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.status-tag {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(239, 68, 68, 0.15);
    color: var(--error);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.card-body {
    padding: 16px;
}

.card-body h3 {
    color: var(--text-1);
    font-size: 18px;
    margin-bottom: 20px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.price-box {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}

.price-box .label {
    font-size: 24px; 
    color: var(--text-4);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.price-box .price {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary-300);
    font-variant-numeric: tabular-nums; /* 防止数字跳动时宽度抖动 */
}

/* 倒计时进度条 */
.progress-container {
    width: 100%;           /* 确保撑满卡片宽度 */
    height: 6px;           /* 高度 */
    background: #334155;   /* 深灰色底槽 */
    border-radius: 3px;
    overflow: hidden;      /* 超出隐藏 */
    margin: 10px 0;
}

.progress-bar {
    height: 100%;
    background: var(--warning);
    width: 100%;
    transition: width 1s linear; /* 这里的动画效果让倒计时平滑 */
}

.meta-info {
    display: flex;
    justify-content: space-between;
    color: var(--text-4);
    font-size: 13px;
    margin-bottom: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.btn-primary {
    width: 100%;
    background: var(--primary-700);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
    box-shadow: var(--shadow-primary);
}

.btn-primary:hover {
    background: var(--primary);
    transform: scale(1.02);
}

.btn-primary:active {
    transform: scale(0.98);
}
/* 黄金位样式 */
.vip-card {
    border: none !important; /* 确保去掉之前的边框 */
    box-shadow: none !important;
}
.vip-card::after {
    display: none !important; /* 确保去掉之前的标签 */
}
.auction-grid .card:nth-child(-n+4) {
    /* 改为一个稍微亮一点、带一点点蓝紫色的背景，区分于默认的深蓝灰 */
    /* 原背景是 var(--bg-2) 即 #1e293b */
    background: linear-gradient(145deg, #283655, #1e293b); 
    
    /* 可选：给一点微弱的内发光，增加高级感 */
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 
                0 10px 30px rgba(0,0,0,.35);
}

/* --- 用户头像与下拉菜单 --- */
.user-menu {
    position: relative;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: var(--bg-3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
    color: var(--primary-300);
    border: 1px solid var(--border);
}

.user-avatar:hover {
    background: var(--primary-700);
    color: #fff;
    box-shadow: 0 0 10px var(--primary-500);
}

.dropdown-menu {
    position: absolute;
    top: 50px;
    right: 0;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    width: 160px;
    padding: 8px;
    box-shadow: var(--shadow-lg);
    display: none; /* JS控制显示 */
    z-index: 1000;
    animation: slideDown 0.2s ease;
}

.dropdown-menu.show {
    display: block;
}

.user-info {
    padding: 8px 12px;
    color: var(--text-3);
    font-size: 13px;
    font-family: monospace; /* 等宽字体显示手机号更好看 */
    text-align: center;
}

.divider {
    height: 1px;
    background: var(--border);
    margin: 4px 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    color: var(--text-2);
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    transition: 0.2s;
}

.dropdown-item:hover {
    background: var(--bg-3);
    color: var(--error);
}

/* --- 登录弹窗 --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px); /* 磨砂背景 */
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 700;
    opacity: 0;
    transition: opacity 0.3s;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: var(--bg-2);
    width: 360px;
    padding: 30px;
    border-radius: 20px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    transform: scale(0.9);
    transition: transform 0.3s;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
     flex-shrink: 0;
}

.modal-header h3 {
    color: var(--text-1);
    font-size: 20px;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-3);
    font-size: 20px;
    cursor: pointer;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: var(--text-3);
    font-size: 12px;
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    background: var(--bg-4);
    border: 1px solid var(--border);
    color: var(--text-1);
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: 0.2s;
}

.form-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.code-input-group {
    display: flex;
    gap: 10px;
}
.card-price{
    text-align: end;
    padding-right: 10px;
    color: var(--success);
    font-size: 18px;
    font-weight: bold;
}
.btn-code {
    background: var(--bg-3);
    color: var(--primary-300);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0 15px;
    white-space: nowrap;
    cursor: pointer;
    font-size: 12px;
    transition: 0.2s;
}

.btn-code:hover:not(:disabled) {
    background: var(--primary-700);
    color: white;
    border-color: var(--primary-700);
}

.btn-code:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-submit {
    width: 100%;
    background: var(--primary-700);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
    transition: 0.2s;
}

.btn-submit:hover {
    background: var(--primary);
    transform: translateY(-2px);
}
/* 新增错误提示样式 */
.error-msg {
    color: var(--error); /* 红色 */
    font-size: 12px;
    margin-top: 6px;
    padding-left: 2px;
    animation: shake 0.3s ease-in-out; /* 加个抖动动画提示更明显 */
}

/* 简单的左右抖动动画 */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* 当输入框错误时，边框也变红 */
input.input-error {
    border-color: var(--error) !important;
    background: rgba(239, 68, 68, 0.05) !important;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 确认对话框 */
.confirm-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1100;
  animation: fadeIn 0.3s ease;
}

.confirm-modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

.confirm-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.confirm-modal-content {
  position: relative;
  z-index: 1101;
  width: 90%;
  max-width: 420px;
  background: linear-gradient(135deg, var(--bg-2) 0%, var(--bg-5) 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s ease;
  overflow: hidden;
}
/* 弹窗头部 */
.confirm-modal-header {
  padding: 24px 24px 16px;
  border-bottom: 1px solid rgba(148,163,184,.12);
}

.confirm-modal-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-1);
  margin: 0;
}

/* 弹窗内容 */
.confirm-modal-body {
  padding: 20px 24px;
}

.confirm-modal-message {
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
}

/* 弹窗底部 */
.confirm-modal-footer {
  display: flex;
  gap: 12px;
  padding: 16px 24px 24px;
}

/* 按钮样式 */
.confirm-btn {
  flex: 1;
  padding: 12px 24px;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  outline: none;
}

.btn-cancel {
  background: var(--bg-3);
  color: var(--text-2);
  border: 1px solid var(--border);
}

.btn-cancel:hover {
  background: var(--bg-4);
  color: var(--text-1);
  transform: translateY(-1px);
}

.btn-confirm {
  background: linear-gradient(135deg, var(--primary), var(--primary-700));
  color: white;
  box-shadow: var(--shadow-primary);
}

.btn-confirm:hover {
  background: linear-gradient(135deg, var(--primary-500), var(--primary));
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(59,130,246,.3);
}

.btn-confirm:active,
.btn-cancel:active {
  transform: translateY(0);
}

/* 动画 */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}


/* --- 宽屏弹窗 --- */
.sell-modal-wide {
    width: 800px; /* 加宽 */
    max-width: 95vw;
    max-height: 85vh; 
    padding: 0; /*以此为基准 */
    background: var(--bg-2);
    overflow: hidden;
    display: flex;    /* 启用 Flex 布局 */
    flex-direction: column; /* 垂直排列 */
}

.modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-3);
}

.modal-body-grid {
    display: grid;
    grid-template-columns: 300px 1fr; /* 左窄右宽 */
    height: 100%; /* 固定高度，内容少不用滚，内容多内部滚 */
}

/* 左侧栏 */
.col-left {
    padding: 25px;
    border-right: 1px solid var(--border);
    background: var(--bg-4); /* 稍微深一点 */
}

/* 右侧栏 */
.col-right {
    padding: 25px 40px;
    background: var(--bg-2);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.col-title {
    color: var(--text-3);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    font-weight: 700;
}

/* 图片上传 (正方形小图) */
.image-upload-square {
    width: 100%;
    aspect-ratio: 16/9; /* 长方形更适合 */
    border: 2px dashed var(--border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: var(--bg-3);
    overflow: hidden;
    transition: 0.2s;
    font-size: 14px;
    text-align: center;
}
.image-upload-square img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 关键：填满容器，多余部分裁切，保持比例 */
    /* 或者用 object-fit: contain; // 完整显示图片，可能会留黑边 */
    display: none; /* 默认隐藏，有src后JS会把它改成 block */
}
.image-upload-square:hover { border-color: var(--primary); }
.image-upload-square i { font-size: 24px; margin-bottom: 5px; color: var(--text-3); }
.upload-placeholder { display: flex; flex-direction: column; align-items: center; }

/* 紧凑表单行 */
.form-row.compact { gap: 10px; }

/* 美化 Select */
.styled-select {
    width: 100%;
    background: var(--bg-3);
    border: 1px solid var(--border);
    color: var(--text-1);
    padding: 10px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    outline: none;
}
.styled-select:focus { border-color: var(--primary); }

/* 速度切换 Tab */
.speed-tabs {
    display: flex;
    background: var(--bg-3);
    border-radius: 8px;
    padding: 4px;
    gap: 4px;
}
.speed-tab {
    flex: 1;
    text-align: center;
    padding: 8px 0;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    position: relative;
}
.speed-tab .time { font-size: 16px; font-weight: bold; color: var(--text-1); }
.speed-tab .desc { font-size: 10px; color: var(--text-3); }
.speed-tab.active { background: var(--bg-4); box-shadow: 0 2px 5px rgba(0,0,0,0.2); }
.speed-tab.vip.active .time { color: #f59e0b; }
.speed-tab.vip i { position: absolute; top: 4px; right: 4px; font-size: 10px; color: #f59e0b; }

/* 价格输入框 */
.price-input {
    font-family: 'Consolas', monospace;
    font-size: 16px;
    font-weight: bold;
    letter-spacing: 1px;
}
.calc-tip{
    font-size: 14px;
    color: var(--success);
}
/* 输入框Wrapper */
.input-wrapper { position: relative; }
.range-tip {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: var(--text-4);
    pointer-events: none;
}

/* 预览条 */
.preview-bar {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    padding: 10px;
    border-radius: 6px;
    font-size: 13px;
    text-align: center;
    margin-top: 10px;
}

/* 大按钮 */
.btn-submit-large {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-700), var(--primary));
    color: white;
    border: none;
    padding: 16px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin-top: auto; /* 推到底部 */
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    transition: 0.2s;
}
.btn-submit-large:hover { transform: translateY(-2px); box-shadow: var(--shadow-primary); }


/* 楼层间距 */
.category-section {
    margin-bottom: 60px;
}

/* 标题样式优化 */
.section-header h2 {
    font-size: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hot-title {
    color: #f59e0b; /* 金色 */
}

/* 热销榜网格特殊样式 */
.vip-grid .card {
    border: 1px solid rgba(245, 158, 11, 0.3);
    background: linear-gradient(to bottom, rgba(245, 158, 11, 0.05), var(--bg-2));
}

/* 调整网格列数 (固定4列) */
.auction-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* 响应式适配 */
@media (max-width: 1024px) {
    .auction-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .auction-grid { grid-template-columns: 1fr; }
}

/* 支付二维码弹窗 */
.payment-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1100;
  animation: fadeIn 0.3s ease;
}

.payment-modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

.payment-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.payment-modal-content {
  position: relative;
  z-index: 1101;
  width: 90%;
  max-width: 420px;
  animation: slideUp 0.3s ease;
}

.payment-modal .modal-close {
  position: absolute;
  top: -40px;
  right: 0;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: white;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 1102;
}

.payment-modal .modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

/* 支付卡片 */
.payment-card {
  background: linear-gradient(135deg, var(--bg-2) 0%, var(--bg-5) 100%);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 40px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(20px);
}

.payment-header {
  text-align: center;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(148,163,184,.12);
}

.payment-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.payment-header h2 {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-1);
  margin: 0 0 8px 0;
}

.payment-subtitle {
  color: var(--text-3);
  font-size: 14px;
  margin: 0;
}

/* 二维码容器 */
.qr-code-container {
  margin-bottom: 32px;
}

.qr-code-wrapper {
  position: relative;
  width: 100%;
  background: white;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
}

.qr-code-wrapper img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.qr-code-loading {
  text-align: center;
  color: var(--text-3);
}

.qr-code-loading .loading-spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto 12px;
  border: 4px solid rgba(59, 130, 246, 0.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.qr-code-loading p {
  margin: 0;
  font-size: 14px;
}

.qr-code-tip {
  text-align: center;
  color: var(--text-3);
  font-size: 13px;
  margin: 0;
}

/* --- 购买弹窗样式 --- */
.buy-modal-content {
    width: 480px;
    border-top: 4px solid var(--primary);
    padding: 0;
    overflow: hidden;
}

.no-border { border: none; padding-bottom: 0; }

.buy-info-card {
    padding: 0 30px;
}

.buy-timer-bar {
    background: #fee2e2;
    color: #ef4444;
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    font-family: monospace;
    font-size: 16px;
    position: relative;
    overflow: hidden;
}

.timer-progress {
    position: absolute; left:0; top:0; bottom:0;
    background: rgba(239, 68, 68, 0.2);
    width: 100%;
    transition: width 0.1s linear;
    z-index: 0;
}

.buy-item-summary {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px dashed var(--border);
}
.buy-item-summary img {
    width: 80px; height: 80px; object-fit: cover; border-radius: 8px;
    border: 1px solid var(--border);
}
.buy-details h4 {
    font-size: 16px; color: var(--text-1); margin-bottom: 8px;
    line-height: 1.4;
}
.tags .tag {
    display: inline-block;
    font-size: 12px; padding: 2px 8px; background: var(--bg-3); 
    color: var(--text-3); border-radius: 4px; margin-right: 5px;
}

.buy-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.price-large {
    font-size: 32px; color: var(--primary); font-weight: 800;
}

.buy-agreements {
    background: var(--bg-4);
    padding: 20px 30px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.warning-text {
    font-size: 13px; color: var(--warning); margin-bottom: 10px;
    display: flex; gap: 6px;
}
.checkbox-label {
    display: flex; gap: 8px; font-size: 13px; color: var(--text-2);
    cursor: pointer;
    align-items: start;
}

.buy-actions {
    padding: 20px 30px;
    display: flex; gap: 15px;
}

.btn-confirm-buy {
    flex: 2; background: var(--primary); color: #fff; border: none; 
    padding: 14px; border-radius: 10px; font-size: 16px; font-weight: bold; cursor: pointer;
    transition: 0.2s;
}
.btn-confirm-buy:hover { background: var(--primary-700); }

.btn-cancel-buy {
    flex: 1; background: transparent; border: 1px solid var(--border); 
    color: var(--text-3); border-radius: 10px; cursor: pointer;
}
.btn-cancel-buy:hover { background: var(--bg-3); color: var(--text-1); }

/* 禁用/交易中状态 */
.card-disabled {
    opacity: 0.7;
    pointer-events: none; /* 禁止点击 */
}
.btn-disabled-lock {
    background: var(--bg-3) !important;
    color: var(--text-4) !important;
    cursor: not-allowed;
}

/* 订单 Tab 样式 */
.order-tabs {
    display: flex;
    background: var(--bg-3);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.order-tab {
    flex: 1;
    text-align: center;
    padding: 15px 0;
    color: var(--text-3);
    cursor: pointer;
    font-weight: 600;
    transition: 0.2s;
    position: relative;
}

.order-tab.active {
    color: var(--text-1);
    background: var(--bg-2);
}

.order-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary);
}

/* 订单列表容器 */
.order-list-container {
    flex: 1;            /* 自动填满剩余高度 */
    overflow-y: auto;   /* 开启垂直滚动 */
    padding: 20px;
    background: var(--bg-2);
    /* 美化滚动条 (Chrome/Safari) */
    scrollbar-width: thin;
    scrollbar-color: var(--bg-3) transparent;
}
.order-list-container::-webkit-scrollbar {
    width: 6px;
}
.order-list-container::-webkit-scrollbar-thumb {
    background-color: var(--bg-3);
    border-radius: 3px;
}
/* 单个订单卡片 */
.order-card {
    background: var(--bg-4);
    border: 1px solid var(--border);
    border-radius: 16px;
    margin-bottom: 20px;
    overflow: hidden;
}
.order-card:hover {
    border-color: var(--primary-500);
}
.order-card-inner {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.order-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
}
.order-body-flex {
    display: flex;
    gap: 15px;
}
.order-img {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--bg-3);
}
.order-img-lg {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--bg-3);
    border: 1px solid var(--border);
}
.order-details-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.order-id {
    font-size: 12px;
    color: var(--text-4);
    font-family: monospace;
}

.order-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.order-title {
    font-size: 16px;
    color: var(--text-1);
    margin: 0 0 4px 0;
}

.order-status {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
    margin-left: 10px;
}
/* 规格栅格 */
.specs-grid {
    display: flex;
    gap: 10px;
    font-size: 12px;
    color: var(--text-3);
}
.specs-grid span {
    background: var(--bg-3);
    padding: 2px 6px;
    border-radius: 4px;
}

/* 状态颜色 */
.status-active { background: rgba(16, 185, 129, 0.1); color: var(--success); border: 1px solid rgba(16, 185, 129, 0.2); } /* 交易中/已支付 */
.status-pending { background: rgba(245, 158, 11, 0.1); color: var(--warning); border: 1px solid rgba(245, 158, 11, 0.2); } /* 待支付 */
.status-completed { background: var(--bg-3); color: var(--text-3); }

.order-details {
    font-size: 13px;
    color: var(--text-3);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.order-price-row {
    display: flex;
    justify-content: space-between;
    align-items: end;
    margin-top: 10px;
}

.order-price {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-1);
}

.order-price small {
    font-size: 12px;
    color: var(--text-4);
    font-weight: normal;
}

.order-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* 支付佣金按钮 */
.btn-pay-fee {
    background: var(--warning);
    color: #000;
    border: none;
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    animation: pulse-btn 2s infinite;
}

/* 价格栅格 */
.price-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 10px;
    background: var(--bg-2);
    padding: 8px;
    border-radius: 6px;
    margin-top: 4px;
    font-size: 12px;
    color: var(--text-3);
}
.price-grid.two-col { grid-template-columns: 1fr 1fr; }

.deal-price-highlight {
    grid-column: span 2;
    color: var(--primary);
    font-weight: bold;
    font-size: 14px;
    border-top: 1px dashed var(--border);
    margin-top: 2px;
    padding-top: 2px;
}
.deal-price-highlight.full-width { grid-column: span 2; }

.order-time {
    font-size: 12px;
    color: var(--text-4);
    margin-top: auto;
    text-align: right;
}

/* 支付框 */
.fee-payment-box {
    background: rgba(245, 158, 11, 0.05);
    border: 1px solid rgba(245, 158, 11, 0.2);
    padding: 15px;
    border-radius: 8px;
    margin-top: 5px;
}

.fee-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--text-2);
}
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }

.fee-tip {
    font-size: 12px;
    color: var(--text-3);
    margin-bottom: 12px;
    display: flex;
    align-items: start;
    gap: 5px;
}

.btn-pay-fee-lg {
    width: 100%;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    border: none;
    padding: 10px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
    transition: 0.2s;
}
.btn-pay-fee-lg:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(245, 158, 11, 0.3); }

/* 联系方式栏 */
.order-footer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 5px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

.contact-blur {
    color: var(--text-4);
    font-size: 13px;
}
.contact-info-box {
    color: var(--primary-300);
    font-size: 14px;
}

/* 小按钮 */
.btn-outline-danger {
    border: 1px solid var(--bg-3);
    background: transparent;
    color: var(--text-3);
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: 0.2s;
}
.btn-outline-danger:hover {
    border-color: var(--error);
    color: var(--error);
}

.btn-text-gray {
    background: none; border: none;
    color: var(--text-4);
    font-size: 12px;
    cursor: pointer;
    text-decoration: underline;
}
.btn-text-gray:hover { color: var(--text-2); }

/* 交易提示框 */
.trade-tip-box {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    padding: 10px;
    border-radius: 6px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
}
@keyframes pulse-btn {
    0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7); }
    70% { box-shadow: 0 0 0 6px rgba(245, 158, 11, 0); }
    100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

.contact-info-box {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-300);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    border: 1px dashed rgba(59, 130, 246, 0.3);
}
.loading-placeholder {
    text-align: center;
    padding: 40px;
    color: var(--text-4);
}

.btn-confirm-trade {
    background: var(--primary-700);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: 0.2s;
}
.btn-confirm-trade:hover {
    background: var(--primary);
    transform: scale(1.05);
}

// ... existing code ...

/* --- 底部 Footer 样式 --- */
.site-footer {
    background: var(--bg-4); /* 深色背景 */
    border-top: 1px solid var(--border);
    padding: 60px 0 40px;
    margin-top: 80px; /* 与上方内容的间距 */
    position: relative;
    z-index: 10;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
}

/* 左侧信息 */
.footer-info {
    flex: 1;
    max-width: 500px;
}

.footer-brand {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-1);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-desc {
    color: var(--text-3);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 30px;
}

.footer-beian {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.footer-beian p {
    color: var(--text-4);
    font-size: 13px;
}

.beian-link {
    color: var(--text-4);
    font-size: 13px;
    text-decoration: none;
    transition: color 0.2s;
    width: fit-content;
}

.beian-link:hover {
    color: var(--primary); /* 悬停变亮色 */
    text-decoration: underline;
}

/* 右侧二维码组 */
.footer-qr-group {
    display: flex;
    gap: 30px;
}

.qr-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.qr-box {
    width: 120px;
    height: 120px;
    background: #fff; /* 白底衬托二维码 */
    padding: 8px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2); 
}

.qr-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.qr-item span {
    color: var(--text-2);
    font-size: 13px;
    font-weight: 500;
}

/* 移动端适配：垂直排列 */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-info {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .footer-qr-group {
        margin-top: 20px;
        gap: 20px;
    }
    
    .qr-box {
        width: 100px;
        height: 100px;
    }
}