* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --dark: #0d1117;
    --navy: #111c2e;
    --navy-light: #18263b;
    --gold: #e5a400;
    --gold-light: #ffc107;
    --blue: #467ff7;
    --green: #16b364;
    --red: #e5484d;
    --text: #172033;
    --muted: #7b8493;
    --border: #e6e9ee;
    --background: #f3f5f8;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.5;
}

.site-header {
    width: 100%;
    height: 72px;
    background: #0c0d0f;
    border-top: 1px solid #553b00;
    position: relative;
    z-index: 100;
}

.header-inner {
    width: min(1180px, calc(100% - 40px));
    height: 100%;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 35px;
}

.logo,
.footer-logo {
    text-decoration: none;
    color: #fff;
    font-weight: 800;
    letter-spacing: 1.5px;
    font-size: 21px;
    white-space: nowrap;
}

.logo span,
.footer-logo span {
    color: var(--gold-light);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-left: auto;
}

.main-nav a {
    position: relative;
    text-decoration: none;
    color: #b7bbc3;
    font-size: 13px;
    padding: 26px 0 23px;
    transition: 0.25s;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--gold-light);
}

.main-nav a.active::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 15px;
    width: 100%;
    height: 2px;
    background: var(--gold);
}

.vip-button {
    text-decoration: none;
    background: linear-gradient(
        135deg,
        #f7b500,
        #c98c00
    );
    color: #111;
    font-size: 12px;
    font-weight: 800;
    padding: 13px 22px;
    border-radius: 5px;
    white-space: nowrap;
}

.hero {
    min-height: 265px;
    position: relative;
    display: flex;
    align-items: center;
    background:
        linear-gradient(
            90deg,
            rgba(9, 17, 29, 0.97),
            rgba(11, 25, 45, 0.88)
        );
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    width: 480px;
    height: 480px;
    border-radius: 50%;
    background: rgba(70, 127, 247, 0.08);
    right: -100px;
    top: -200px;
}

.hero::after {
    content: "";
    position: absolute;
    width: 300px;
    height: 300px;
    border: 1px solid rgba(255, 193, 7, 0.15);
    border-radius: 50%;
    right: 160px;
    bottom: -230px;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1100px, calc(100% - 40px));
    margin: auto;
    color: white;
}

.hero-tag {
    color: var(--gold-light);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
}

.hero h1 {
    margin-top: 8px;
    font-size: 40px;
    line-height: 1.15;
}

.hero h1 span {
    color: var(--gold-light);
}

.hero p {
    max-width: 560px;
    color: #aeb8c8;
    margin-top: 13px;
    font-size: 14px;
}

.hero-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 22px;
    padding: 7px 12px;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.05);
    border-radius: 50px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #1ed760;
    box-shadow: 0 0 10px #1ed760;
}

.page-container {
    width: min(1100px, calc(100% - 40px));
    margin: -45px auto 70px;
    position: relative;
    z-index: 10;
}

.market-card,
.history-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: 0 15px 45px rgba(20, 33, 52, 0.08);
}

.market-card {
    padding: 30px;
}

.market-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--border);
}

.section-label {
    display: block;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.7px;
    color: var(--blue);
    margin-bottom: 5px;
}

.market-header h2,
.history-header h2 {
    font-size: 25px;
    line-height: 1.2;
}

.market-header p,
.history-header p {
    margin-top: 5px;
    color: var(--muted);
    font-size: 13px;
}

.live-badge {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 10px;
    font-weight: 800;
    color: var(--green);
    background: #edfdf4;
    border: 1px solid #cef4dd;
    padding: 8px 11px;
    border-radius: 50px;
}

.live-badge span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green);
}

.price-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    padding: 28px 0;
}

.price-label {
    display: block;
    font-size: 10px;
    color: var(--muted);
    font-weight: 700;
    letter-spacing: 1.4px;
}

.main-price h3 {
    font-size: 45px;
    line-height: 1.1;
    letter-spacing: -1px;
    margin-top: 3px;
}

.price-change {
    margin-top: 8px;
    color: var(--green);
    display: flex;
    gap: 5px;
    font-size: 13px;
    font-weight: 700;
}

.market-mini-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    min-width: 450px;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.market-mini-stats div {
    padding: 15px 20px;
    border-right: 1px solid var(--border);
}

.market-mini-stats div:last-child {
    border-right: 0;
}

.market-mini-stats span {
    display: block;
    color: var(--muted);
    font-size: 10px;
    margin-bottom: 5px;
}

.market-mini-stats strong {
    font-size: 14px;
}

.market-content {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 30px;
}

.stock-info {
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.stock-info-title {
    background: var(--navy);
    color: white;
    font-size: 11px;
    letter-spacing: 1px;
    font-weight: 700;
    padding: 14px 16px;
}

.info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 15px;
    border-bottom: 1px solid var(--border);
    font-size: 12px;
}

.info-row:last-child {
    border-bottom: 0;
}

.info-row span {
    color: var(--muted);
}

.info-row strong {
    color: #26364b;
}

.chart-side {
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 18px;
}

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

.chart-title {
    display: block;
    font-size: 10px;
    font-weight: 800;
    color: var(--muted);
    letter-spacing: 1px;
}

.chart-date {
    display: block;
    font-size: 13px;
    font-weight: 700;
    margin-top: 3px;
}

.time-tabs {
    display: flex;
    border: 1px solid var(--border);
    border-radius: 5px;
    overflow: hidden;
}

.tab {
    border: 0;
    background: white;
    color: #7b8493;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 10px;
    border-right: 1px solid var(--border);
}

.tab:last-child {
    border-right: 0;
}

.tab.active {
    background: #24364a;
    color: white;
}

.chart-container {
    position: relative;
    width: 100%;
    height: 360px;
}

.today-result {
    margin-top: 30px;
    border-top: 1px solid var(--border);
    padding-top: 25px;
}

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

.result-heading h3 {
    font-size: 20px;
}

.result-time {
    color: var(--muted);
    font-size: 11px;
}

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

.lottery-table,
.history-table {
    width: 100%;
    border-collapse: collapse;
}

.lottery-table th,
.history-table th {
    background: #f3f5f8;
    color: #536071;
    padding: 13px;
    border: 1px solid #e0e4e9;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .4px;
}

.lottery-table td,
.history-table td {
    text-align: center;
    padding: 14px;
    border: 1px solid #e6e9ee;
    font-size: 14px;
}

.lottery-table tbody td:nth-child(2),
.lottery-table tbody td:nth-child(3) {
    font-weight: 800;
    font-size: 19px;
    color: #172033;
}

.history-card {
    margin-top: 25px;
    overflow: hidden;
}

.history-header {
    padding: 26px 30px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.history-icon {
    width: 40px;
    height: 40px;
    background: #eef3ff;
    color: var(--blue);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-weight: 700;
}

.history-table th {
    background: var(--navy);
    color: #fff;
    border-color: #25334a;
}

.history-table tbody tr:nth-child(even) {
    background: #f8f9fb;
}

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

.history-table td:nth-child(2),
.history-table td:nth-child(3) {
    font-weight: 700;
}

.site-footer {
    background: #0d1117;
    color: white;
}

.footer-inner {
    width: min(1100px, calc(100% - 40px));
    margin: auto;
    padding: 40px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.footer-inner p {
    color: #747d89;
    font-size: 12px;
    margin-top: 8px;
}

.footer-links {
    display: flex;
    gap: 25px;
}

.footer-links a {
    text-decoration: none;
    color: #8f98a5;
    font-size: 12px;
}

.footer-links a:hover {
    color: var(--gold-light);
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid #1b222d;
    color: #626b77;
    font-size: 11px;
    padding: 17px;
}

@media (max-width: 900px) {
    .main-nav {
        display: none;
    }

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

    .price-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .market-mini-stats {
        min-width: 0;
        width: 100%;
    }

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

    .stock-info-title {
        grid-column: 1 / -1;
    }

    .info-row {
        border-right: 1px solid var(--border);
    }
}

@media (max-width: 650px) {
    .site-header {
        height: 64px;
    }

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

    .logo {
        font-size: 16px;
    }

    .vip-button {
        padding: 10px 12px;
        font-size: 9px;
    }

    .hero {
        min-height: 230px;
    }

    .hero-content {
        width: calc(100% - 30px);
    }

    .hero h1 {
        font-size: 31px;
    }

    .page-container {
        width: calc(100% - 20px);
        margin-top: -30px;
    }

    .market-card {
        padding: 18px;
    }

    .market-header {
        gap: 15px;
    }

    .market-header h2 {
        font-size: 20px;
    }

    .live-badge {
        font-size: 8px;
    }

    .main-price h3 {
        font-size: 37px;
    }

    .market-mini-stats {
        grid-template-columns: 1fr;
    }

    .market-mini-stats div {
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    .market-mini-stats div:last-child {
        border-bottom: 0;
    }

    .stock-info {
        display: block;
    }

    .chart-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .time-tabs {
        width: 100%;
    }

    .tab {
        flex: 1;
        padding: 8px 5px;
    }

    .chart-container {
        height: 300px;
    }

    .result-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .lottery-table,
    .history-table {
        min-width: 550px;
    }

    .history-header {
        padding: 22px 20px 16px;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-links {
        flex-wrap: wrap;
    }
}