/* ==================== 1. 变量与基础重置 ==================== */
:root {
    --bg-body: #000000;
    --bg-header: #111111;
    --bg-row-1: #0a0a0a;
    --bg-row-2: #1a1a1a;
    --bg-disclaimer: #111111;
    --text-main: #ffffff;
    --marquee-text-main: #f8d715;
    --text-muted: #888888;
    --border-color: #333333;
    --color-gold: #e6b800;
    --color-red: #ff3333;
    --color-green: #00cc00;
    --color-price-neutral: #aaa;
    --font-price: "DIN Alternate", "Droid Sans Mono", "Roboto Mono", "Menlo", monospace;
  	--color-beian:#555;
}

body.light-mode {
    --bg-body: #f0f2f5;
    --bg-header: #f8f9fa;
    --bg-row-1: #ffffff;
    --bg-row-2: #f7f8fa;
    --bg-disclaimer: #f8f9fa;
    --text-main: #111111;
    --marquee-text-main: #fc6d26;
    --text-muted: #666666;
    --border-color: #e8e8e8;
    --color-green: #009900;
    --color-gold: #b8860b;
    --color-price-neutral: #888888;
  	--color-beian:#bbb;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: 16px; }
body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    padding-bottom: 120px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ==================== 2. 头部与状态栏 ==================== */
.header {
    background-color: var(--bg-header);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px 20px;
    border-bottom: 2px solid #ffffff;
    transition: background-color 0.3s ease;
}
body.light-mode .header { border-bottom-color: #ffffff; }

.logo { 
    display: flex; 
    align-items: center; 
    gap: 8px; 
    font-size: 22px; 
    font-weight: bold; 
    line-height: 1; 
}
.logo img { 
    width: 130px; 
    transition: opacity 0.3s; 
    display: block;
    /* 已移除 margin: -10px 0 负边距，避免破坏基线对齐计算 */
}
.logo-sub {
    color: var(--color-gold);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 1px;
    align-self: flex-end;
    padding-bottom: 4px;
}
/* 保留原 .logo span 样式，但限定不影响 .logo-sub */
.logo > span:not(.logo-sub) { 
    font-size: 12px; 
    margin-left: 6px; 
    opacity: 0.6; 
    font-weight: normal; 
}

/* 右侧二维码区域 */
.header-qrcodes {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    height: 100%;
}
.qr-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    height: 100%;
}
.qr-item img {
    height: 74px;
    width: auto;
    display: block;
    object-fit: contain;
    border-radius: 4px;
    background: #fff;
    padding: 2px;
    margin-bottom: 2px;
}
.qr-text {
    color: #fff;
    font-size: 12px;
    line-height: 1;
    margin-bottom: -2px;
    white-space: nowrap;
}

/* 浅色/深色按钮：隐藏但保留 DOM */
.theme-btn {
    background: var(--border-color);
    border: none;
    color: var(--text-main);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: filter 0.2s ease;
    display: none;
}
.theme-btn:hover { filter: brightness(1.2); }

.status-bar {
    background-color: var(--bg-header);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 12px 20px;
    font-size: 14px;
    color: var(--text-muted);
    gap: 10px;
    transition: background-color 0.3s ease;
}
.header-time { color: var(--color-red); font-family: var(--font-price); }

/* ==================== 3. 滚动公告栏 ==================== */
.sub-header {
    background-color: var(--bg-row-2);
    border-bottom: 1px solid var(--border-color);
    width: 100%;
    min-width: 400px;
}

.marquee-static {
    text-align: center;
    color: var(--marquee-text-main);
    padding: 8px 20px;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.marquee-scroll-container { overflow: hidden; width: 100%; }
.marquee-track { display: inline-block; white-space: nowrap; transform: translateX(0); will-change: transform; }
.marquee-item { color: var(--marquee-text-main); }
#marketStatus { display: none; }

/* ==================== 4. 核心表格样式 ==================== */
.table-container {
    width: 100%;
    overflow-x: auto;
    background-color: var(--bg-body);
    transition: background-color 0.3s ease;
}
.market-table { width: 100%; min-width: 400px; border-collapse: collapse; text-align: center; }
.market-table th,
.market-table td {
    padding: 6px 6px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
    text-align: center;
    transition: background-color 0.2s;
}
.market-table th { background-color: var(--bg-row-2); color: var(--text-main); font-weight: 600; font-size: 18px; }
tbody tr:nth-child(odd) { background-color: var(--bg-row-1); }
tbody tr:nth-child(even) { background-color: var(--bg-row-2); }
tbody tr:hover { background-color: var(--border-color) !important; }

.col-product {
    width: 28%;
    text-align: left !important;
    padding-left: 24px !important;
    color: var(--color-gold);
    font-weight: 600;
    font-size: 18px;
}
.col-price { font-family: var(--font-price); font-size: 18px; font-weight: 600; letter-spacing: 0.5px; }
.c-red { color: var(--color-red); }
.c-green { color: var(--color-green); }
.c-neutral { color: var(--color-price-neutral); }
.price-pair { display: flex; flex-direction: column; align-items: center; line-height: 1.2; }

.disclaimer {
    position: fixed; bottom: 0; left: 0; width: 100%;
    background-color: var(--bg-disclaimer);
    padding: 6px 20px 8px 20px;
    font-size: 12px; color: var(--text-muted); line-height: 1.6; z-index: 100;
    transition: background-color 0.3s ease;
}
.disclaimer-title { font-size: 13px; color: var(--color-red); margin-bottom: 3px; }

/* ==================== 5. PC端响应式 ==================== */
@media (min-width: 768px) {
    .header, .status-bar { padding: 4px 32px; }
    .marquee-static { padding: 10px 32px; font-size: 13px; }
}

@media (min-width: 1024px) {
    .header, .status-bar, .table-container, .disclaimer {
        width: 90%; max-width: 1400px; margin-left: auto; margin-right: auto;
    }
    .header { padding: 4px 32px; }
    .status-bar { justify-content: flex-end; padding: 12px 32px; }
    .table-container { margin-top: 24px; }
    .disclaimer { left: 50%; transform: translateX(-50%); }
    .market-table th { font-size: 20px; }
    .col-product { font-size: 20px; padding-left: 32px !important; }
    .col-price { font-size: 20px; font-weight: 700; }
    .price-pair { line-height: 1.2; gap: 1px; }
    .market-table th, .market-table td { padding: 8px 12px; }
    .logo { font-size: 24px; }
    .logo img { width: 150px; }
    .logo-sub { font-size: 16px; padding-bottom: 5px; }
    .qr-item img { height: 80px; }
    .qr-text { font-size: 13px; }
    .status-bar { font-size: 15px; }
    .header-time { font-size: 16px; }
    .sub-header { font-size: 14px; }
    .marquee-static { padding: 10px 32px; font-size: 14px; }
}

@media (min-width: 1600px) {
    .header, .status-bar, .table-container, .disclaimer { width: 85%; max-width: 1600px; }
    .table-container { margin-top: 32px; }
    .market-table th { font-size: 22px; }
    .col-product { font-size: 22px; padding-left: 48px !important; }
    .col-price { font-size: 22px; letter-spacing: 1px; }
    .market-table th, .market-table td { padding: 10px 16px; }
    .logo { font-size: 28px; }
    .logo img { width: 170px; }
    .logo-sub { font-size: 18px; padding-bottom: 6px; }
    .qr-item img { height: 86px; }
    .qr-text { font-size: 14px; }
    .status-bar { font-size: 16px; }
    .header-time { font-size: 18px; }
    .sub-header { font-size: 16px; }
    .marquee-static { padding: 12px 48px; font-size: 16px; }
}

/* ==================== 6. 移动端（≤700px 换行） ==================== */
@media (max-width: 700px) {
    .header { padding: 2px 14px 4px; }
    .logo { 
        display: grid; 
        grid-template-columns: max-content; 
        grid-template-rows: auto auto; 
        column-gap: 0; 
        row-gap: 0; 
        align-items: end; 
        justify-items: start; 
        height: auto; 
    }
    .logo img { width: 160px; display: block; }
    .logo-sub { 
        margin: 2px 0 0 0; 
        padding: 0; 
        font-size: 12px; 
        white-space: nowrap; 
        justify-self: end; 
    }
    .header-qrcodes { gap: 8px; }
    .qr-item img { height: 52px; }
    .qr-text { font-size: 10px; }
}
.beian{color:var(--color-beian);}