:root {
    --bg: #1a1a1a;
    --panel: #252525;
    --header: #18293a;
    --gold: #ffbf24;
    --gold-light: #ffc400;
    --green: #38bd8a;
    --red: #fe5555;
    --blue: #29b6f6;
    --text: #e8eef3;
    --muted: #b8c4ce;
    --border: #444;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
    margin: 0;
    background: #10151c;
    color: var(--text);
    font-family: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    padding-bottom: calc(66px + env(safe-area-inset-bottom));
}

.container {
    width: 100%;
    max-width: none;
    min-height: 100vh;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    background: var(--bg);
}
/* 顶部 */
.quote-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 12px 15px;
    background: var(--header);
}

.page-logo {
    display: flex;
    align-items: center;
    height: 52px;
}

.logo {
    width: 180px;
    height: 52px;
    object-fit: contain;
}

.logo-text {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--gold);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quote-status {
    font-size: 14px;
    color: var(--red);
}

.quote-status.online { color: var(--green); }

.page-time {
    min-width: 64px;
    text-align: right;
    font-size: 14px;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.qr-btn {
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid #33404e;
    border-radius: 10px;
    background: #0f141b;
    color: var(--gold);
    cursor: pointer;
}

.qr-btn-text {
    font-size: 13px;
    color: var(--gold);
    white-space: nowrap;
}

/* 滚动公告 */
.marquee-wrapper {
    width: 100%;
    height: 34px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: var(--panel);
    border-top: 1px solid var(--red);
    border-bottom: 1px solid var(--red);
}

.marquee-text {
    white-space: nowrap;
    padding-left: 100%;
    display: inline-block;
    color: var(--gold-light);
    font-weight: 700;
    font-size: 16px;
    animation: marquee 18s linear infinite;
}

@keyframes marquee {
    to { transform: translateX(-100%); }
}

/* 报价表 */
.quote-price-table {
    flex: 1;
    color: #eee;
    min-height: 320px;
}

.row {
    display: flex;
    align-items: stretch;
}

.col-name { width: 24%; }
.col-buy { width: 19%; 
           display: flex;
           justify-content: center; /* 水平居中 */
        align-items: center;
}
.col-sell { width: 19%; }
.col-change { width: 19%; }
.col-range { width: 19%; }

.price-table-header {
    background: #000;
    font-weight: 700;
    font-size: 24px;
}

.price-table-header .col {
    padding: 12px 0;
    text-align: center;
    border-right: 1px solid var(--border);
    line-height: 1.1;
}

.price-table-header .col:last-child { border-right: none; }

.price-row {
    font-size: 23px;
}

.price-row .col {
    padding: 7px 0;
    text-align: center;
    border-right: 1px solid var(--border);
    line-height: 1.2;
}

.price-row .col:last-child { border-right: none; }

.price-row:nth-child(even) { background: #000; }

.symbol-name {
    color: var(--gold);
    font-size: 24px;
    padding-left: 0;
    text-align: center !important;
}

.symbol-unit {
    display: block;
    font-size: 12px;
    color: var(--muted);
    margin-top: 2px;
    text-align: center;
}

.price-rise { color: var(--red); }
.price-fall { color: var(--green); }
.price-flat { color: #e8e8e8; }

.high-low {
    font-size: 18px;
    color: #e8e8e8;
    font-variant-numeric: tabular-nums;
}

.change-main {
    display: block;
    font-size: 18px;
    line-height: 1.05;
}

.change-sub {
    display: block;
    font-size: 12px;
    opacity: 0.85;
    margin-top: 2px;
}

/* 底部 */
.page-footer {
    background: #2b3036;
    color: #d4dee3;
    padding: 5px 0 88px;
}

.page-memo {
    list-style: none;
    margin: 0;
    padding: 12px 0;
}

.page-memo li {
    padding: 2px 12px;
    font-size: 13px;
    line-height: 1.6;
    color: #d4dee3;
}

.page-memo .red { color: var(--red); }

.bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: flex;
    justify-content: space-around;
    gap: 6px;
    padding: 9px 10px calc(9px + env(safe-area-inset-bottom));
    background: #1d232b;
    border-top: 1px solid #333;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.55);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    min-width: 56px;
    padding: 6px 10px;
    border: 1px solid #2c3440;
    border-radius: 14px;
    background: linear-gradient(145deg, #232a33, #161b21);
    box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.45), -2px -2px 8px rgba(255, 255, 255, 0.04);
    color: #b0b6bd;
    font-size: 12px;
    text-decoration: none;
}

.nav-icon {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.nav-item.active {
    color: var(--gold);
    border-color: #5a4420;
    background: linear-gradient(145deg, #33270f, #1a1712);
    box-shadow: inset 2px 2px 6px rgba(255, 191, 36, 0.08), 4px 4px 10px rgba(0, 0, 0, 0.5);
}

/* 二维码弹窗 */
.qrcode-dialog {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qrcode-dialog[hidden] { display: none; }

.qrcode-mask {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
}

.qrcode-panel {
    position: relative;
    width: min(88vw, 420px);
    background: #1a1a1a;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.qrcode-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    font-size: 16px;
    color: #fff;
    border-bottom: 1px solid #2b3036;
}

.qrcode-close {
    border: 0;
    background: transparent;
    color: #9aa7b1;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

.qrcode-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
}

.qrcode-content img {
    width: 100%;
    max-height: 38vh;
    object-fit: contain;
    border-radius: 10px;
}

.qrcode-empty {
    margin: 30px 0;
    text-align: center;
    color: var(--muted);
}

@media (max-width: 380px) {
    .qr-btn-text { font-size: 11px; }
    .price-table-header { font-size: 13px; }
    .price-row { font-size: 13px; }
    .symbol-name { font-size: 13px; padding-left: 0; }
    .symbol-unit { font-size: 10px; }
    .change-main { font-size: 12px; }
    .change-sub { font-size: 10px; }
    .high-low { font-size: 11px; }
    .price-table-header .col,
    .price-row .col { padding: 6px 2px; }
}

@media (min-width: 768px) {
    .container {
        width: 100%;
    }
    .price-table-header { font-size: 25px; }
    .price-row { font-size: 24px; }
    .symbol-name { font-size: 25px; }
    .change-main { font-size: 20px; }
    .change-sub { font-size: 14px; }
    .high-low { font-size: 19px; }
}

@media (min-width: 1400px) {
    .container {
        width: 100%;
    }
    .quote-page-header {
        padding: 18px 24px 22px;
    }
    .logo { height: 64px; width: 230px; }
    .logo-text { font-size: 30px; }
    .marquee-wrapper { height: 42px; }
    .marquee-text { font-size: 20px; }
    .price-table-header { font-size: 30px; }
    .price-row { font-size: 29px; }
    .symbol-name { font-size: 30px; }
    .symbol-unit { font-size: 16px; }
    .change-main { font-size: 25px; }
    .change-sub { font-size: 17px; }
    .high-low { font-size: 23px; }
    .price-table-header .col { padding: 16px 0; }
    .price-row .col { padding: 10px 0; }
    .page-memo li { font-size: 15px; padding-left: 24px; padding-right: 24px; }
}
