* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: #172033;
    background: #f1f1f1;
}

button {
    font: inherit;
    cursor: pointer;
}

.site-width {
    width: min(1320px, calc(100% - 40px));
    margin: 0 auto;
}


/* TOP */

.top-alert {
    min-height: 34px;
    background: #ffb900;
    color: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    text-align: center;
    padding: 7px 15px;
}

.top-alert a {
    color: #0068a9;
    text-decoration: none;
    font-weight: 700;
}

.black-bar {
    background: #050505;
    color: #fff;
}

.black-bar-inner {
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.black-bar-inner > div {
    display: flex;
    gap: 24px;
}

.black-bar a {
    color: #eee;
    font-size: 11px;
    text-decoration: none;
}


/* HEADER */

.main-header {
    background: #f5f5f5;
    border-bottom: 1px solid #ddd;
}

.header-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #313844;
    text-decoration: none;
    font-size: 30px;
}

.logo-mark {
    width: 0;
    height: 0;
    border-top: 18px solid transparent;
    border-bottom: 18px solid transparent;
    border-right: 26px solid #d7193f;
    position: relative;
}

.logo-mark::after {
    content: "";
    position: absolute;
    width: 9px;
    height: 9px;
    background: #d7193f;
    border-radius: 50%;
    left: 9px;
    top: -4px;
}

.header-inner nav {
    display: flex;
    align-items: center;
    gap: 27px;
}

.header-inner nav a {
    color: #444;
    text-decoration: none;
    font-size: 12px;
}

.menu-btn {
    display: none;
    border: 0;
    background: transparent;
    font-size: 25px;
}


/* HERO */

.hero {
    height: 335px;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(
            circle at 90% 20%,
            rgba(20, 52, 188, .5),
            transparent 34%
        ),
        linear-gradient(
            110deg,
            #061128,
            #06112d 55%,
            #08154b
        );
}

.hero-pattern {
    position: absolute;
    right: -50px;
    top: -90px;
    width: 650px;
    height: 650px;
    opacity: .55;
    background-image:
        radial-gradient(
            circle,
            #172da0 4px,
            transparent 5px
        );
    background-size: 24px 24px;
    transform: rotate(-12deg);
}


/* PAGE TABS */

.page-tabs {
    background: #fff;
}

.page-tabs .site-width {
    display: flex;
}

.page-tabs button {
    height: 45px;
    padding: 0 35px;
    border: 0;
    border-right: 1px solid #ddd;
    background: #f4f4f4;
    color: #555;
    font-size: 12px;
}

.page-tabs button.active {
    background: #111;
    color: #fff;
}


/* MAIN */

.main-content {
    background: #f1f1f1;
}

.content-layout {
    background: #fff;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 20px;
    padding: 22px 12px 50px;
}

.left-content {
    min-width: 0;
}

.sidebar {
    border-left: 1px solid #eee;
    padding-left: 18px;
}

.section-line {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #2871a6;
    font-size: 11px;
    margin-bottom: 25px;
}

.section-line i {
    flex: 1;
    height: 8px;
    background: #f3f3f3;
}


/* STOCK */

.stock-card {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) 330px;
    gap: 25px;
    padding: 35px 28px 45px;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.chart-header strong {
    color: #e32929;
    font-size: 13px;
}

.chart-header span {
    color: #637083;
    font-size: 12px;
}

.chart-box {
    width: 100%;
    height: 320px;
}

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

.stock-chart h6 {
    font-size: 12px;
    margin: 18px 0 0;
}

.stock-info-container {
    padding-top: 10px;
}

.main-price {
    font-size: 34px;
    font-weight: 800;
    margin-bottom: 20px;
}

.real-time {
    margin-bottom: 12px;
    font-size: 12px;
}

.stock-table {
    width: 100%;
    border-collapse: collapse;
}

.stock-table td {
    border: 1px solid #ccd1d8;
    padding: 8px;
    font-size: 12px;
}

.stock-table td:first-child {
    width: 55%;
}

.stock-table td:last-child {
    font-weight: 500;
}


/* RESULT */

.result-section {
    margin-top: 20px;
    padding: 28px;
    border-top: 1px solid #eee;
}

.result-title {
    margin-bottom: 18px;
}

.result-title span,
.history-heading span {
    color: #d7193f;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
}

.result-title h2 {
    margin: 5px 0 0;
    font-size: 20px;
}

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

.result-table {
    width: 100%;
    min-width: 550px;
    border-collapse: collapse;
    table-layout: fixed;
}

.result-table th,
.result-table td {
    border: 1px solid #d2d6dc;
    text-align: center;
}

.result-table th {
    background: #f5f5f5;
    padding: 13px 10px;
    font-size: 12px;
}

.result-table td {
    padding: 15px 10px;
    font-size: 14px;
}

.result-number {
    color: #172033;
    font-size: 18px !important;
    font-weight: 700;
}


/* HISTORY */

.history-section {
    margin-top: 120px;
    padding: 28px;
}

.history-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 20px;
}

.history-heading h2 {
    font-size: 25px;
    margin: 5px 0 0;
}

.history-count {
    color: #7d8794;
    font-size: 11px;
}

.history-table {
    width: 100%;
    min-width: 600px;
    border-collapse: collapse;
    table-layout: fixed;
}

.history-table th,
.history-table td {
    border: 1px solid #d5d8dd;
    text-align: center;
}

.history-table th {
    padding: 12px;
    background: #f5f5f5;
    font-size: 12px;
}

.history-table td {
    padding: 10px;
    font-size: 12px;
}

.history-table tbody tr:hover {
    background: #f8fafc;
}


/* SIDEBAR */

.ad-content {
    color: #555;
    font-size: 12px;
    line-height: 1.6;
}

.ad-content p {
    margin: 0 0 22px;
}

.news-box {
    margin-top: 570px;
}

.news-box article {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 10px;
    border-bottom: 1px solid #ddd;
    padding: 9px 0;
}

.news-image {
    height: 55px;
    background:
        linear-gradient(
            135deg,
            #d9d9d9,
            #999
        );
}

.news-box article p {
    font-size: 10px;
    margin: 0;
    line-height: 1.4;
}


/* FOOTER */

footer {
    background: #081326;
    color: #fff;
    padding: 30px 0;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-inner span {
    color: #a9b2c1;
    font-size: 12px;
}


/* RESPONSIVE */

@media (max-width: 1000px) {

    .content-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: none;
    }

    .stock-card {
        grid-template-columns: minmax(0, 1fr) 280px;
    }

}


@media (max-width: 750px) {

    .site-width {
        width: calc(100% - 24px);
    }

    .black-bar {
        display: none;
    }

    .header-inner {
        min-height: 65px;
    }

    .header-inner nav {
        display: none;
        position: absolute;
        left: 0;
        right: 0;
        top: 99px;
        background: #fff;
        padding: 15px;
        z-index: 100;
        flex-direction: column;
        align-items: flex-start;
    }

    .header-inner nav.open {
        display: flex;
    }

    .menu-btn {
        display: block;
    }

    .hero {
        height: 210px;
    }

    .stock-card {
        grid-template-columns: 1fr;
        padding: 25px 15px;
    }

    .stock-info-container {
        order: -1;
    }

    .chart-box {
        height: 280px;
    }

    .result-section,
    .history-section {
        padding: 20px 15px;
    }

    .history-section {
        margin-top: 50px;
    }

}


@media (max-width: 480px) {

    .logo {
        font-size: 24px;
    }

    .top-alert {
        font-size: 10px;
    }

    .hero {
        height: 160px;
    }

    .page-tabs button {
        padding: 0 18px;
        font-size: 10px;
    }

    .main-price {
        font-size: 30px;
    }

    .chart-box {
        height: 240px;
    }

    .history-heading {
        display: block;
    }

    .history-count {
        margin-top: 8px;
    }

}