/* ============================================
   QQ交易安全查询系统 - 主样式文件 (v2优化版)
   ============================================ */

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

:root {
    /* 品牌主色 - 科技蓝 */
    --brand-primary: #2563eb;
    --brand-primary-light: #3b82f6;
    --brand-primary-dark: #1d4ed8;
    --brand-primary-subtle: #eff6ff;

    /* 语义色 */
    --brand-safe: #10b981;
    --brand-safe-light: #d1fae5;
    --brand-danger: #ef4444;
    --brand-danger-light: #fee2e2;
    --brand-warning: #f59e0b;
    --brand-warning-light: #fef3c7;

    /* 中性色 */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --border: #e2e8f0;
    --border-light: #f1f5f9;

    /* 品牌渐变 */
    --gradient-hero: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #2563eb 100%);
    --gradient-ad: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);

    /* 圆角系统 */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* 阴影系统 */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 30px rgba(37,99,235,0.15);
    --shadow-hover: 0 12px 40px rgba(0,0,0,0.12);

    /* 过渡 */
    --transition-fast: 0.15s ease;
    --transition-base: 0.25s ease;
    --transition-slow: 0.35s ease;

    /* 向后兼容别名（兼容旧版页面内联样式） */
    --primary: var(--brand-primary);
    --primary-dark: var(--brand-primary-dark);
    --primary-light: var(--brand-primary-light);
    --text-light: var(--text-muted);
    --danger: var(--brand-danger);
    --success: var(--brand-safe);
    --warning: var(--brand-warning);
    --info: var(--brand-primary);
    --bg: var(--bg-body);
    --bg-card: var(--bg-card);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: var(--brand-primary); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--brand-primary-dark); }
img { max-width: 100%; height: auto; }

.container { max-width: 1040px; margin: 0 auto; padding: 0 24px; }

/* ===== 排版层级 ===== */
.section-title {
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}
.section-subtitle {
    font-size: 15px;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 40px;
}

/* ===== 头部 ===== */
.header {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    position: relative; /* 让 .nav 的 position:absolute 以它为基准定位 */
}
.logo a {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}
.logo-img {
    height: 40px;
    width: 40px;
    vertical-align: middle;
    border-radius: 8px;
    transition: transform var(--transition-base);
}
.logo a:hover .logo-img {
    transform: scale(1.05);
}
.logo-text {
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 导航 */
.nav { display: flex; gap: 2px; }
.nav a {
    position: relative;
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color var(--transition-fast), background var(--transition-fast);
}
.nav a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 60%;
    height: 2px;
    background: var(--brand-primary);
    border-radius: 1px;
    transition: transform var(--transition-base);
}
.nav a:hover {
    background: var(--brand-primary-subtle);
    color: var(--brand-primary);
}
.nav a:hover::after {
    transform: translateX(-50%) scaleX(1);
}
.nav a.active {
    color: var(--brand-primary);
    background: var(--brand-primary-subtle);
}
.nav a.active::after {
    transform: translateX(-50%) scaleX(1);
}

/* 汉堡菜单按钮 */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px 12px;       /* 增大点击区域 */
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
    position: relative;
    z-index: 101;             /* 高于 header 的 z-index:100 */
    -webkit-tap-highlight-color: transparent;  /* 移除移动端点击高亮 */
    touch-action: manipulation;                /* 优化触摸响应 */
    user-select: none;
}
.menu-toggle:hover {
    background: var(--border-light);
}
.menu-toggle:active {
    background: var(--border);  /* 按下有视觉反馈 */
}
.menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition-base);
    transform-origin: center;
}
.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== 公告栏 ===== */
.announcement {
    background: var(--brand-warning-light);
    border-bottom: 1px solid #fde68a;
    padding: 10px 0;
    font-size: 14px;
    color: #92400e;
}
.announcement-icon { margin-right: 8px; }
.announcement .container {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== Hero区域 ===== */
.hero {
    background: var(--gradient-hero);
    color: #fff;
    padding: 100px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(59,130,246,0.15) 0%, transparent 50%),
                radial-gradient(circle at 70% 50%, rgba(59,130,246,0.1) 0%, transparent 50%);
    pointer-events: none;
}
.hero-content {
    position: relative;
    z-index: 1;
}
.hero-title {
    font-size: 42px;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}
.hero-desc {
    font-size: 17px;
    opacity: 0.85;
    margin-bottom: 40px;
    line-height: 1.7;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

/* ===== 搜索框 ===== */
.search-form { max-width: 600px; margin: 0 auto; }
.search-form-sm { max-width: 500px; margin-bottom: 20px; }
.search-box {
    display: flex;
    gap: 0;
    background: #fff;
    border-radius: var(--radius-full);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    transition: box-shadow var(--transition-base), transform var(--transition-base);
}
.search-box:focus-within {
    box-shadow: 0 4px 28px rgba(37,99,235,0.35), 0 0 0 3px rgba(37,99,235,0.15);
    transform: scale(1.01);
}
.search-input {
    flex: 1;
    border: none;
    padding: 16px 24px;
    font-size: 16px;
    outline: none;
    color: var(--text-primary);
    background: #fff;
}
.search-input::placeholder { color: #bbb; }
.search-btn {
    background: var(--brand-primary);
    color: #fff;
    border: none;
    padding: 16px 36px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition-fast), transform var(--transition-fast);
    position: relative;
    overflow: hidden;
}
.search-btn:hover { background: var(--brand-primary-dark); }
.search-btn:active { transform: scale(0.97); }
.search-hint { margin-top: 10px; font-size: 13px; opacity: 0.6; }

/* 快捷查询 */
.quick-search {
    margin-top: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}
.quick-label { font-size: 14px; opacity: 0.7; }
.quick-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.quick-tag {
    display: inline-block;
    padding: 5px 16px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: var(--radius-full);
    font-size: 13px;
    color: #fff;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
}
.quick-tag:hover {
    background: rgba(255,255,255,0.25);
    border-color: rgba(255,255,255,0.3);
    color: #fff;
    transform: translateY(-1px);
}

/* ===== 功能介绍 ===== */
.features {
    padding: 80px 0;
    position: relative;
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.feature-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 36px 28px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}
.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--brand-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-slow);
}
.feature-card:nth-child(2)::before { background: var(--brand-safe); }
.feature-card:nth-child(3)::before { background: var(--brand-warning); }
.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    border-color: var(--border);
}
.feature-card:hover::before {
    transform: scaleX(1);
}
.feature-icon {
    font-size: 42px;
    margin-bottom: 18px;
    display: inline-block;
    transition: transform var(--transition-base);
}
.feature-card:hover .feature-icon {
    transform: scale(1.15) rotate(-5deg);
}
.feature-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-primary);
}
.feature-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ===== 统计区域 ===== */
.stats {
    padding: 60px 0 80px;
    background: var(--bg-card);
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.stat-item {
    background: var(--bg-body);
    border-radius: var(--radius-md);
    padding: 28px 20px;
    text-align: center;
    border: 1px solid var(--border-light);
    transition: all var(--transition-base);
    position: relative;
}
.stat-item:hover {
    border-color: var(--brand-primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.stat-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: var(--brand-primary);
    border-radius: 2px;
    opacity: 0;
    transition: opacity var(--transition-base);
}
.stat-item:hover::after {
    opacity: 1;
}
.stat-number {
    font-size: 36px;
    font-weight: 800;
    color: var(--brand-primary);
    line-height: 1.1;
    letter-spacing: -0.02em;
}
.stat-label {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 6px;
    font-weight: 500;
}

/* ===== 广告栏 ===== */
.ad-banner {
    background: var(--gradient-ad);
    padding: 16px 0;
    text-align: center;
    font-size: 15px;
    color: #fff;
}
.ad-banner a.ad-banner-link {
    color: #fff;
    text-decoration: none;
    display: block;
    transition: opacity var(--transition-fast);
}
.ad-banner a.ad-banner-link:hover {
    opacity: 0.85;
    text-decoration: underline;
}
.ad-banner .ad-banner-text {
    display: block;
}

/* ===== 查询结果页 ===== */
.main { flex: 1; padding: 30px 0; }
.result-search { margin-bottom: 20px; }

.result-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    margin-bottom: 20px;
    transition: box-shadow var(--transition-base);
}
.result-card:hover {
    box-shadow: var(--shadow-md);
}
.result-header {
    padding: 24px 30px;
    color: #fff;
}
.result-header.safe { background: var(--brand-safe); }
.result-header.danger { background: var(--brand-danger); }
.result-status {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 600;
}
.status-icon { font-size: 24px; }
.result-qq {
    margin-top: 8px;
    font-size: 14px;
    opacity: 0.9;
}
.result-body { padding: 24px 30px; }
.result-subtitle {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

/* 骗子列表 */
.scammer-list { display: flex; flex-direction: column; gap: 16px; }
.scammer-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    transition: box-shadow var(--transition-fast), border-color var(--transition-fast);
}
.scammer-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border-color: var(--brand-primary);
}
.scammer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.scammer-label { font-size: 13px; color: var(--text-muted); }
.scammer-time { font-size: 12px; color: var(--text-muted); }
.scammer-reason {
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 8px;
}
.scammer-nickname { font-size: 13px; color: var(--text-secondary); margin-bottom: 4px; }
.scammer-evidence { margin-top: 8px; }
.evidence-link {
    font-size: 13px;
    color: var(--brand-primary);
}

/* 投票 */
.vote-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}
.vote-label { font-size: 13px; color: var(--text-muted); }
.vote-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    background: #fff;
    font-size: 13px;
    cursor: pointer;
    transition: all var(--transition-fast);
}
.vote-btn:hover {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
    background: var(--brand-primary-subtle);
}
.vote-btn:disabled { cursor: not-allowed; opacity: 0.5; }

/* ===== 操作卡片 ===== */
.action-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px 30px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}
.action-card h3 { font-size: 18px; margin-bottom: 8px; }
.action-card p { font-size: 14px; color: var(--text-secondary); margin-bottom: 16px; }

/* ===== 分页 ===== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 20px;
}
.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text-primary);
    transition: all var(--transition-fast);
}
.page-link:hover {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
    background: var(--brand-primary-subtle);
}
.page-link.active {
    background: var(--brand-primary);
    color: #fff;
    border-color: var(--brand-primary);
}

/* ===== 提交页 ===== */
.page-header { text-align: center; margin-bottom: 30px; }
.page-header h1 { font-size: 24px; margin-bottom: 8px; }
.page-header p { font-size: 14px; color: var(--text-muted); }

.submit-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    max-width: 700px;
    margin: 0 auto;
}

/* ===== 表单 ===== */
.form-group { margin-bottom: 20px; }
.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text-secondary);
}
.form-input, .form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 15px;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    font-family: inherit;
    background: #fff;
}
.form-input:focus, .form-textarea:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
    outline: none;
}
.form-textarea { resize: vertical; min-height: 100px; }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.required { color: var(--brand-danger); }

/* 文件上传 */
.file-upload {
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color var(--transition-fast), background var(--transition-fast);
    position: relative;
}
.file-upload:hover {
    border-color: var(--brand-primary);
    background: var(--brand-primary-subtle);
}
.file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}
.file-icon { font-size: 32px; display: block; margin-bottom: 8px; }
.file-text { display: block; font-size: 14px; color: var(--text-secondary); }
.file-limit { display: block; font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.file-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: var(--bg-body);
    border-radius: var(--radius-sm);
}
.file-preview img { width: 60px; height: 60px; object-fit: cover; border-radius: 4px; }
.file-name { flex: 1; font-size: 13px; color: var(--text-secondary); }
.file-remove {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--brand-danger);
    padding: 4px;
    transition: transform var(--transition-fast);
}
.file-remove:hover { transform: scale(1.2); }

/* 多文件上传预览列表 */
.file-preview-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}
.file-preview-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: var(--bg-body);
    border-radius: var(--radius-sm);
}
.file-preview-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--border);
}
.file-preview-item .file-name {
    flex: 1;
    font-size: 13px;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.file-preview-item .file-size {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
}
.hint { font-size: 12px; color: var(--text-secondary); font-weight: normal; }

/* ===== 证据缩略图和画廊 ===== */
.evi-thumb {
    width: 64px; height: 64px; border-radius: var(--radius-sm); overflow: hidden;
    cursor: pointer; border: 2px solid var(--border);
    transition: border-color var(--transition-fast), transform var(--transition-fast);
    position: relative;
    flex-shrink: 0;
}
.evi-thumb:hover { border-color: var(--brand-primary); transform: scale(1.08); }
.evi-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.gallery-modal {
    display: none; position: fixed; top: 0; left: 0;
    width: 100%; height: 100%; z-index: 2000;
    align-items: center; justify-content: center;
}
.gallery-modal.show { display: flex; }
.gallery-overlay {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%; background: rgba(0,0,0,0.88);
}
.gallery-container {
    position: relative; display: flex; flex-direction: column;
    max-width: 92vw; max-height: 92vh;
    border-radius: var(--radius-lg); overflow: hidden; background: #111;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.gallery-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 18px; background: rgba(0,0,0,0.6); color: #fff; z-index: 1;
}
.gallery-counter { font-size: 13px; opacity: 0.8; }
.gallery-actions { display: flex; gap: 10px; align-items: center; }
.gallery-download {
    background: rgba(255,255,255,0.15); border: none; color: #fff;
    font-size: 13px; cursor: pointer; padding: 4px 12px; border-radius: 4px;
    text-decoration: none; transition: background var(--transition-fast);
}
.gallery-download:hover { background: rgba(255,255,255,0.3); color: #fff; }
.gallery-close {
    background: none; border: none; color: #fff;
    font-size: 22px; cursor: pointer; padding: 4px 8px;
    opacity: 0.7; transition: opacity var(--transition-fast);
}
.gallery-close:hover { opacity: 1; }
.gallery-body {
    display: flex; align-items: center; justify-content: center;
    position: relative; min-height: 320px;
}
.gallery-image-wrap {
    display: flex; align-items: center; justify-content: center;
    padding: 16px; max-width: 100%;
}
.gallery-image-wrap img {
    max-width: 100%; max-height: 78vh;
    object-fit: contain; border-radius: 4px;
}
.gallery-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 44px; height: 44px;
    background: rgba(255,255,255,0.12); border: none; border-radius: 50%;
    color: #fff; font-size: 26px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background var(--transition-fast); z-index: 1; line-height: 1;
}
.gallery-nav:hover { background: rgba(255,255,255,0.3); }
.gallery-prev { left: 10px; }
.gallery-next { right: 10px; }

.tag-evidence {
    display: inline-flex; align-items: center; padding: 2px 10px;
    border-radius: 12px; font-size: 12px; background: var(--brand-primary-subtle);
    color: var(--brand-primary);
    cursor: pointer; transition: background var(--transition-fast);
}
.tag-evidence:hover { background: #dbeafe; }

/* 提交须知 */
.submit-notice {
    background: var(--brand-warning-light);
    border: 1px solid #fde68a;
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin-top: 20px;
}
.submit-notice h4 { font-size: 14px; margin-bottom: 8px; color: #b45309; }
.submit-notice ul { padding-left: 18px; }
.submit-notice li { font-size: 13px; color: #92400e; margin-bottom: 4px; }

/* ===== 按钮 ===== */
.btn {
    display: inline-block;
    padding: 10px 24px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: center;
}
.btn-primary { background: var(--brand-primary); color: #fff; }
.btn-primary:hover { background: var(--brand-primary-dark); }
.btn-success { background: var(--brand-safe); color: #fff; }
.btn-success:hover { background: #059669; }
.btn-danger { background: var(--brand-danger); color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-secondary { background: #94a3b8; color: #fff; }
.btn-secondary:hover { background: #64748b; }
.btn-block { display: block; width: 100%; }
.btn-sm { padding: 6px 14px; font-size: 13px; border-radius: var(--radius-sm); }

/* ===== 提示/警告 ===== */
.alert {
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-size: 14px;
    margin-bottom: 20px;
}
.alert-success { background: var(--brand-safe-light); color: #065f46; border: 1px solid #a7f3d0; }
.alert-error { background: var(--brand-danger-light); color: #991b1b; border: 1px solid #fecaca; }
.alert-info { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }
.alert-warning { background: var(--brand-warning-light); color: #92400e; border: 1px solid #fde68a; }

/* ===== 底部 ===== */
.footer {
    background: #0f172a;
    color: rgba(255,255,255,0.55);
    text-align: center;
    padding: 24px 0;
    font-size: 13px;
    margin-top: auto;
    border-top: 1px solid rgba(255,255,255,0.05);
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .container { padding: 0 16px; }

    .header-inner { height: 56px; }
    .logo-text { font-size: 16px; }
    .logo-img { height: 32px; width: 32px; }

    /* 移动端菜单折叠 */
    .menu-toggle { display: flex; }
    .nav {
        display: none;
        position: absolute;
        top: 56px;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        gap: 0;
        padding: 8px 16px 16px;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-md);
    }
    .nav.open { display: flex; }
    .nav a {
        padding: 12px 16px;
        border-radius: var(--radius-sm);
        font-size: 15px;
    }
    .nav a::after { display: none; }

    .hero { padding: 60px 0 50px; }
    .hero-title { font-size: 28px; }
    .hero-desc { font-size: 15px; margin-bottom: 30px; }

    .search-box {
        flex-direction: column;
        border-radius: var(--radius-md);
    }
    .search-box:focus-within { transform: none; }
    .search-input {
        border-radius: var(--radius-md) var(--radius-md) 0 0;
        padding: 14px 18px;
    }
    .search-btn {
        border-radius: 0 0 var(--radius-md) var(--radius-md);
        padding: 14px 18px;
    }

    .features { padding: 50px 0; }
    .features-grid { grid-template-columns: 1fr; gap: 16px; }
    .feature-card { padding: 28px 20px; }

    .section-title { font-size: 22px; }
    .section-subtitle { font-size: 14px; margin-bottom: 28px; }

    .stats { padding: 40px 0 50px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .stat-item { padding: 20px 16px; }
    .stat-number { font-size: 28px; }

    .result-header { padding: 16px 20px; }
    .result-body { padding: 16px 20px; }
    .vote-bar { flex-wrap: wrap; }

    .quick-search { gap: 8px; }
    .quick-label { font-size: 13px; }
    .quick-tag { padding: 4px 12px; font-size: 12px; }
}

/* 平板适配 */
@media (min-width: 769px) and (max-width: 1024px) {
    .features-grid { gap: 18px; }
    .feature-card { padding: 28px 20px; }
    .stats-grid { gap: 14px; }
    .hero-title { font-size: 36px; }
}

/* ===== 辅助类 ===== */
.text-center { text-align: center; }
.empty {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    font-size: 14px;
}

/* ===== 购号系统 ===== */
.buy-container {
    max-width: 960px;
    margin: 0 auto;
    padding: 30px 20px;
    flex: 1;
}

.buy-header {
    text-align: center;
    margin-bottom: 30px;
}

.buy-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 8px;
}

.buy-desc {
    color: var(--text-muted);
    font-size: 14px;
    margin: 0;
}

.buy-login-tip {
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.buy-login-tip p {
    font-size: 16px;
    color: var(--text-secondary);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.product-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 24px 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: box-shadow var(--transition-base), transform var(--transition-base);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.product-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.product-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.4;
}

.product-price {
    margin-bottom: 16px;
}

.price-num {
    font-size: 28px;
    font-weight: 700;
    color: var(--brand-primary);
}

.price-unit {
    font-size: 14px;
    color: var(--text-muted);
    margin-left: 4px;
}

.product-btn {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-light));
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity var(--transition-fast);
}

.product-btn:hover { opacity: 0.9; }
.product-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* 弹窗 */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 480px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 0;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.modal-body {
    padding: 20px 24px 24px;
}

.order-detail-loading,
.order-detail-error {
    text-align: center;
    padding: 30px 0;
    color: var(--text-muted);
    font-size: 14px;
}

.order-detail-card {
    background: var(--bg-body);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 16px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light);
}

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

.detail-label {
    font-size: 13px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.detail-value {
    font-size: 14px;
    color: var(--text-primary);
    text-align: right;
    word-break: break-all;
}

.phone-num { font-weight: 600; color: var(--brand-primary); }
.code-num {
    font-weight: 700;
    font-size: 18px;
    color: var(--brand-safe);
    letter-spacing: 2px;
}

.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 500;
}

.status-queue { background: #fef3c7; color: #d97706; }
.status-wait { background: #dbeafe; color: #2563eb; }
.status-done { background: #d1fae5; color: #059669; }
.status-error { background: #fee2e2; color: #dc2626; }
.status-closed { background: #f3f4f6; color: #6b7280; }

.order-detail-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.action-btn {
    padding: 10px 16px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity var(--transition-fast);
}

.action-btn:hover { opacity: 0.85; }

.action-code { background: var(--brand-primary); color: #fff; }
.action-success { background: var(--brand-safe); color: #fff; }
.action-fail { background: var(--brand-danger); color: #fff; }
.action-old { background: #f59e0b; color: #fff; }
.action-close { background: #f3f4f6; color: var(--text-secondary); }

.feedback-group {
    display: flex;
    gap: 8px;
}

.feedback-group .action-btn { flex: 1; }

.polling-hint {
    text-align: center;
    padding: 12px;
    color: var(--text-muted);
    font-size: 13px;
    background: #fef3c7;
    border-radius: var(--radius-sm);
}

/* 订单列表 */
.orders-toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.toolbar-btn {
    padding: 8px 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    font-size: 14px;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    color: var(--text-secondary);
    display: inline-block;
}

.toolbar-btn:hover {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}

.toolbar-link {
    background: var(--brand-primary);
    color: #fff;
    border-color: var(--brand-primary);
}

.toolbar-link:hover { color: #fff; opacity: 0.9; }

.order-loading {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

.order-item {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin-bottom: 10px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: box-shadow var(--transition-fast);
}

.order-item:hover { box-shadow: var(--shadow-hover); }

.order-item-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.order-item-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.order-item-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--brand-primary);
}

.order-item-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.order-item-no {
    font-size: 12px;
    color: var(--text-muted);
    font-family: monospace;
}

.order-item-time {
    font-size: 12px;
    color: var(--text-muted);
}

.order-item-status {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid var(--border-light);
}

.orders-pagination {
    margin-top: 20px;
}

.page-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.page-btn {
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    font-size: 14px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.page-btn:hover {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}

.page-info {
    font-size: 14px;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 12px;
    }
    .buy-title { font-size: 22px; }
    .price-num { font-size: 24px; }
    .feedback-group { flex-direction: column; }
    .order-item-top { flex-direction: column; align-items: flex-start; gap: 4px; }
    .order-item-bottom { flex-direction: column; align-items: flex-start; gap: 4px; }
}