* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #fff;
    color: #333;
    font-family: Arial, "Microsoft YaHei", sans-serif;
}

.site-width {
    width: 1180px;
    max-width: calc(100% - 30px);
    margin: auto;
}

.mini-topbar {
    height: 28px;
    background: #fafafa;
    border-bottom: 1px solid #eee;
    font-size: 11px;
}

.mini-inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mini-inner a {
    margin-right: 22px;
    color: #666;
    text-decoration: none;
}

.broker-bar {
    background: #ff5500;
    color: #fff;
}

.broker-inner {
    height: 46px;
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 12px;
}

.broker-inner strong {
    font-size: 16px;
}

.broker-inner button {
    margin-left: auto;
    padding: 6px 20px;
    border: 0;
    border-radius: 18px;
    background: #fff;
    color: #ff5500;
    font-weight: 700;
}

.header-main {
    min-height: 125px;
    display: grid;
    grid-template-columns: 270px 1fr 260px;
    gap: 20px;
    align-items: center;
}

.logo-title {
    color: #f04b23;
    font-size: 29px;
    font-weight: 700;
}

.logo-domain {
    margin-top: 7px;
    color: #777;
    font-size: 13px;
}

.stock-count {
    margin-top: 6px;
    font-size: 11px;
}

.stock-count strong {
    color: #e53935;
}

.search-box {
    display: flex;
    height: 42px;
    border: 2px solid #ff5500;
}

.search-box input {
    flex: 1;
    min-width: 0;
    padding: 0 15px;
    border: 0;
    outline: 0;
    font-size: 14px;
}

.search-box button {
    width: 78px;
    border: 0;
    border-left: 1px solid #fff;
    background: #f44a12;
    color: #fff;
    cursor: pointer;
}

.search-box button.orange {
    background: #ff8a00;
}

.hot-search {
    padding-top: 8px;
    color: #777;
    font-size: 11px;
}

.qr-area {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #777;
    font-size: 10px;
}

.qr-placeholder,
.app-box {
    background: #aaa;
}

.qr-placeholder {
    width: 40px;
    height: 40px;
    margin-left: 15px;
}

.news-strip {
    background: #f4f5f6;
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
}

.news-strip-inner {
    height: 35px;
    display: flex;
    align-items: center;
    gap: 30px;
    font-size: 11px;
}

.news-product {
    margin-left: auto;
}

.category-nav {
    min-height: 88px;
    padding: 13px 0;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
}

.category-nav div {
    padding: 0 15px;
    border-right: 1px dotted #ccc;
    line-height: 26px;
    font-size: 11px;
}

.category-nav strong {
    color: #ff5500;
    margin-right: 10px;
}

.category-nav span {
    margin-right: 8px;
}

.red-line {
    width: 1180px;
    max-width: calc(100% - 30px);
    height: 3px;
    margin: auto;
    background: #ff4c21;
}

.main-content {
    padding-top: 20px;
}

.stock-panel {
    border: 1px solid #ccc;
    padding: 20px;
}

.stock-heading h1 {
    margin: 0;
    font-size: 20px;
}

.price-row {
    margin-top: 5px;
    display: flex;
    align-items: baseline;
    gap: 10px;
    color: #ef4444;
}

.price-row > strong {
    font-size: 38px;
}

.price-row span {
    font-size: 14px;
}

.realtime {
    margin-top: 4px;
    color: #777;
    font-size: 11px;
}

.chart-controls {
    display: flex;
    margin-top: 15px;
    border-top: 1px solid #ddd;
    padding-top: 10px;
}

.chart-controls button {
    width: 43px;
    height: 30px;
    border: 1px solid #ccc;
    border-right: 0;
    background: #fff;
    color: #555;
    cursor: pointer;
}

.chart-controls button:last-child {
    border-right: 1px solid #ccc;
}

.chart-controls button.active {
    background: #0783ef;
    border-color: #0783ef;
    color: #fff;
}

.chart-area {
    width: 100%;
    height: 330px;
    margin-top: 12px;
}

#myChart {
    width: 100% !important;
    height: 100% !important;
}

.market-info {
    margin-top: 14px;
    border-top: 1px solid #ddd;
}

.info-row {
    min-height: 45px;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    align-items: center;
    border-bottom: 1px solid #ddd;
    font-size: 12px;
}

.info-row span:nth-child(3) {
    text-align: right;
}

.info-row strong {
    color: #344054;
    text-align: right;
}

.live-result-table {
    margin-top: 20px;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.5fr 1fr 1.5fr;
    border-top: 1px solid #111;
    border-left: 1px solid #111;
}

.live-result-table > div {
    min-height: 43px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid #111;
    border-bottom: 1px solid #111;
    background: #242424;
    color: #fff;
    font-size: 12px;
}

.live-result-table .live-head {
    background: #373737;
    font-weight: 700;
}

.live-result-table .live-label {
    background: #333;
    font-weight: 700;
}

.live-result-table .live-value {
    font-size: 14px;
    font-weight: 700;
}

.updated-time {
    margin-top: 14px;
    color: #999;
    text-align: right;
    font-size: 10px;
}

.history-section {
    margin-top: 40px;
    margin-bottom: 80px;
}

.section-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.section-heading span {
    width: 5px;
    height: 26px;
    background: #ff5500;
}

.section-heading h2 {
    margin: 0;
    color: #263247;
    font-size: 27px;
}

.section-heading div {
    flex: 1;
    height: 1px;
    background: #ddd;
}

#loading-status {
    display: none;
    margin: 20px;
    text-align: center;
}

.history-wrapper {
    width: 100%;
    overflow-x: auto;
}

#nikkei-history-table {
    width: 100%;
    min-width: 900px;
    border-collapse: collapse;
    table-layout: fixed;
}

#nikkei-history-table th {
    height: 43px;
    border: 1px solid #aaa;
    background: #373737;
    color: #fff;
    font-size: 12px;
}

#nikkei-history-table thead tr:nth-child(2) th {
    background: #5b5b5b;
    font-weight: 400;
}

#nikkei-history-table td {
    height: 42px;
    padding: 7px;
    border: 1px solid #bbb;
    text-align: center;
    font-size: 12px;
}

#nikkei-history-table tbody tr:nth-child(even) td {
    background: #f5f5f5;
}

#nikkei-history-table .result-value {
    font-weight: 700;
}

footer {
    padding: 40px 0 20px;
    background: #f3f3f3;
    color: #666;
}

.footer-columns {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 25px;
}

.footer-columns > div {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 10px;
}

.footer-columns strong {
    color: #333;
    font-size: 12px;
}

.footer-columns a {
    color: #777;
    text-decoration: none;
}

.app-box {
    width: 50px;
    height: 50px;
}

.footer-links {
    width: 1180px;
    max-width: calc(100% - 30px);
    margin: 30px auto 0;
    padding-top: 20px;
    border-top: 1px dashed #ccc;
    color: #075ab4;
    text-align: center;
    font-size: 10px;
}

@media (max-width: 800px) {
    .header-main {
        grid-template-columns: 1fr;
        padding: 20px 0;
    }

    .qr-area {
        display: none;
    }

    .category-nav {
        grid-template-columns: 1fr 1fr;
    }

    .news-product {
        display: none;
    }

    .price-row > strong {
        font-size: 31px;
    }

    .chart-area {
        height: 270px;
    }

    .info-row {
        grid-template-columns: 1fr 1fr;
        padding: 8px 0;
    }

    .info-row span:nth-child(3) {
        text-align: left;
    }

    .live-result-table {
        grid-template-columns: 1.2fr .8fr 1fr .8fr 1fr;
    }

    .footer-columns {
        grid-template-columns: repeat(2, 1fr);
    }
}