* {
    box-sizing: border-box;
}

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

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

.top-line {
    height: 3px;
    background: #f2dada;
}

.topbar {
    height: 34px;
    background: #fafafa;
    border-bottom: 1px solid #e5e5e5;
    font-size: 11px;
}

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

.topbar-inner span {
    margin-left: 18px;
}

.topbar-inner a {
    color: #0068b7;
    text-decoration: none;
}

.header {
    background: #fff;
}

.header-main {
    height: 72px;
    display: flex;
    align-items: center;
}

.site-logo {
    width: 260px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0b3284;
    color: white;
    font-size: 28px;
    font-weight: bold;
}

.header-links {
    flex: 1;
    display: flex;
    gap: 19px;
    align-items: center;
    font-size: 12px;
}

.header-button {
    width: 110px;
    height: 36px;
    border: 0;
    background: #951414;
    color: #fff;
    font-weight: bold;
}

.main-nav {
    background: #06347c;
}

.nav-inner {
    height: 44px;
    display: flex;
    align-items: center;
    gap: 22px;
    white-space: nowrap;
    overflow: hidden;
}

.nav-inner a {
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: bold;
}

.nav-inner a.yellow {
    color: #fff000;
}

.sub-nav {
    border-bottom: 2px solid #163d80;
}

.sub-nav-inner {
    height: 65px;
    display: flex;
    align-items: center;
    gap: 25px;
}

.sub-links {
    display: flex;
    gap: 32px;
    font-size: 12px;
}

.app-download {
    padding: 8px 15px;
    border: 1px solid #ddd;
    font-size: 12px;
}

.search-box {
    display: flex;
    height: 40px;
}

.search-box select {
    width: 130px;
    border: 1px solid #bbb;
    background: #f8f8f8;
}

.search-box input {
    width: 210px;
    border: 1px solid #bbb;
    border-left: 0;
    padding: 0 12px;
    outline: none;
}

.search-box button {
    width: 45px;
    border: 0;
    background: #333;
    color: white;
}

.sub-right {
    margin-left: auto;
    font-size: 11px;
}

.sub-right b {
    margin: 0 10px;
    color: red;
}

.market-card {
    margin-top: 22px;
    padding: 20px;
    border: 1px solid #cfcfcf;
}

.market-title {
    font-size: 18px;
    font-weight: bold;
}

.price-line {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: 7px;
    color: #ef4444;
}

.price-line > span {
    font-size: 40px;
    line-height: 1;
    font-weight: 700;
}

.price-line small {
    font-size: 14px;
}

.market-status {
    margin-top: 9px;
    color: #777;
    font-size: 11px;
}

.separator {
    height: 1px;
    margin-top: 13px;
    background: #ddd;
}

.chart-controls {
    display: flex;
    margin-top: 11px;
}

.chart-controls button {
    min-width: 62px;
    height: 31px;
    padding: 0 10px;
    border: 1px solid #bbb;
    border-right: 0;
    background: #fff;
    color: #333;
    cursor: pointer;
}

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

.chart-controls button.active {
    border-color: #087ff5;
    background: #087ff5;
    color: #fff;
}

.chart-container {
    height: 400px;
    padding: 15px 8px 0;
}

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

.market-information {
    margin-top: 10px;
    border-top: 1px solid #ddd;
}

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

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

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

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

.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: 13px;
}

.result-table .result-head {
    background: #363636;
    font-weight: bold;
}

.result-table .session {
    background: #333;
    font-weight: bold;
}

.result-number {
    font-size: 16px !important;
    font-weight: 700;
}

.update-date {
    padding-top: 12px;
    color: #999;
    text-align: right;
    font-size: 10px;
}

.history-section {
    margin-top: 45px;
    margin-bottom: 420px;
}

.history-section h2 {
    margin: 0 0 22px;
    color: #263246;
    font-size: 28px;
}

.loading-status {
    display: none;
    padding: 20px;
    text-align: center;
    font-weight: bold;
}

.table-scroll {
    width: 100%;
    overflow-x: auto;
}

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

#nikkei-history-table th {
    height: 45px;
    border: 1px solid #aaa;
    background: #383838;
    color: white;
    font-size: 12px;
}

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

#nikkei-history-table th:first-child {
    width: 240px;
}

#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 {
    border-top: 1px solid #ddd;
    padding: 20px 0 40px;
    color: #777;
    font-size: 10px;
}

.risk-text {
    padding: 15px 0 25px;
    border-bottom: 1px solid #ddd;
    line-height: 20px;
}

.footer-service,
.footer-links,
.copyright {
    margin-top: 20px;
    text-align: center;
}

.footer-links {
    color: #333;
}

@media (max-width: 850px) {

    .header-links {
        display: none;
    }

    .site-logo {
        flex: 1;
    }

    .nav-inner {
        gap: 15px;
        overflow-x: auto;
    }

    .sub-nav-inner {
        height: auto;
        padding: 12px 0;
        flex-wrap: wrap;
    }

    .sub-right {
        display: none;
    }

    .search-box {
        width: 100%;
    }

    .search-box input {
        flex: 1;
        width: auto;
    }

    .price-line > span {
        font-size: 32px;
    }

    .chart-container {
        height: 300px;
    }

    .chart-controls {
        overflow-x: auto;
    }

    .chart-controls button {
        flex-shrink: 0;
    }

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

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

    .result-table {
        grid-template-columns:
            1.3fr
            1fr
            1fr
            1fr
            1fr;
    }

    .history-section {
        margin-bottom: 150px;
    }
}