* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: #f7f5f5;
    color: #202938;
    font-family:
        "Noto Sans Lao",
        "Phetsarath OT",
        Arial,
        sans-serif;
    font-size: 14px;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

button,
input {
    font-family: inherit;
}

.site-container {
    width: 1180px;
    max-width: calc(100% - 28px);
    margin-left: auto;
    margin-right: auto;
}

.site-header {
    border-bottom: 1px solid #eadfe1;
    background: #fff;
}

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

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-flag {
    width: 45px;
    height: 45px;
}

.brand-flag svg {
    width: 100%;
    height: 100%;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-text strong {
    color: #620018;
    font-family: Arial, sans-serif;
    font-size: 19px;
}

.brand-text small {
    margin-top: 2px;
    color: #8b8b8b;
    font-size: 10px;
}

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

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #33b66c;
    box-shadow: 0 0 0 5px rgba(51,182,108,0.12);
    animation: statusPulse 1.6s infinite;
}

@keyframes statusPulse {
    50% {
        box-shadow: 0 0 0 9px rgba(51,182,108,0);
    }
}

.header-status div {
    display: flex;
    flex-direction: column;
}

.header-status strong {
    font-size: 12px;
}

.header-status small {
    margin-top: 2px;
    color: #999;
    font-size: 10px;
}

.main-nav {
    background: #580014;
}

.nav-links {
    min-height: 51px;
    display: flex;
    align-items: stretch;
    justify-content: center;
}

.nav-links a {
    min-height: 51px;
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
    background: rgba(255,255,255,0.1);
}

.mobile-menu-button {
    display: none;
    width: 100%;
    height: 50px;
    padding: 0 14px;
    border: 0;
    background: #580014;
    color: white;
    text-align: left;
    font-weight: 700;
    cursor: pointer;
}

.hero-section {
    padding: 25px 0 0;
}

.hero-banner {
    height: 285px;
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    box-shadow: 0 14px 35px rgba(79,0,18,0.12);
}

.hero-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-banner::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(32,0,9,0.75),
        rgba(32,0,9,0.16),
        rgba(32,0,9,0)
    );
}

.hero-overlay {
    width: 430px;
    position: absolute;
    left: 45px;
    top: 50%;
    z-index: 2;
    transform: translateY(-50%);
    color: white;
}

.hero-badge {
    width: max-content;
    margin-bottom: 12px;
    padding: 6px 12px;
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 50px;
    background: rgba(255,255,255,0.1);
    font-family: Arial;
    font-size: 10px;
    letter-spacing: 1px;
}

.hero-overlay h1 {
    margin: 0 0 8px;
    font-size: 38px;
}

.hero-overlay p {
    margin: 0 0 18px;
    color: #eee;
    line-height: 1.5;
}

.hero-time {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.hero-time span {
    color: #ff4b58;
}

.hero-time strong {
    font-family: Arial;
    font-size: 17px;
}

.quick-stats {
    margin-top: -28px;
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 15px;
}

.stat-card {
    min-height: 85px;
    padding: 15px 18px;
    display: flex;
    align-items: center;
    gap: 13px;
    border: 1px solid #eee4e6;
    border-radius: 12px;
    background: white;
    box-shadow: 0 8px 25px rgba(50,0,12,0.07);
}

.stat-icon {
    width: 43px;
    height: 43px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #fff1f3;
    color: #7a001c;
    font-family: Arial;
    font-size: 18px;
}

.stat-card div:last-child {
    display: flex;
    flex-direction: column;
}

.stat-card span {
    color: #999;
    font-size: 10px;
}

.stat-card strong {
    margin-top: 4px;
    color: #2b3442;
    font-family: Arial;
    font-size: 14px;
}

.main-grid {
    display: grid;
    grid-template-columns: 240px minmax(0, 500px) 280px;
    justify-content: space-between;
    align-items: start;
    gap: 24px;
    padding: 40px 0 55px;
}

.left-sidebar,
.result-column,
.right-sidebar {
    min-width: 0;
}

.ad-card {
    margin-bottom: 22px;
    overflow: hidden;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 6px 20px rgba(0,0,0,0.05);
}

.ad-card img {
    width: 100%;
    height: auto;
}

.side-panel {
    margin-bottom: 22px;
    padding: 18px;
    border: 1px solid #eee4e6;
    border-radius: 12px;
    background: white;
    box-shadow: 0 6px 20px rgba(0,0,0,0.04);
}

.panel-heading {
    margin-bottom: 17px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #400010;
    font-size: 13px;
    font-weight: 700;
}

.heading-line {
    width: 3px;
    height: 18px;
    display: inline-block;
    border-radius: 4px;
    background: #c31f3d;
}

.mini-news-list a {
    padding: 12px 0;
    display: flex;
    gap: 10px;
    border-bottom: 1px solid #eee;
}

.mini-news-list a:last-child {
    border-bottom: 0;
}

.news-date {
    width: 40px;
    height: 43px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: #6b0019;
    color: white;
    font-family: Arial;
    font-size: 13px;
    font-weight: 700;
}

.news-date small {
    font-size: 8px;
    opacity: .75;
}

.mini-news-list strong {
    color: #333;
    font-size: 11px;
    line-height: 1.45;
}

.mini-news-list p {
    margin: 4px 0 0;
    color: #999;
    font-size: 9px;
    line-height: 1.45;
}

.custom-container {
    overflow: hidden;
    border: 1px solid #eadfe2;
    border-radius: 18px;
    background: white;
    box-shadow: 0 15px 35px rgba(87,0,20,0.08);
}

.custom-header {
    min-height: 92px;
    padding: 17px 20px;
    display: flex;
    align-items: center;
    gap: 13px;
    border-bottom: 3px solid #e28c35;
    background: linear-gradient(
        110deg,
        #4b0012,
        #71001d
    );
    color: white;
}

.custom-flag-wrapper {
    width: 48px;
    flex-shrink: 0;
}

.custom-flag {
    width: 46px;
    height: 46px;
}

.custom-title-block {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.custom-title-block strong {
    font-size: 15px;
    line-height: 1.4;
}

.custom-title-block span {
    color: #e8d8dd;
    font-size: 10px;
}

.live-label {
    padding: 5px 8px;
    border-radius: 50px;
    background: #ef3d50;
    font-family: Arial;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .8px;
}

.custom-body {
    padding: 25px 22px 28px;
    background: linear-gradient(
        #fff8f8,
        #ffffff
    );
}

.custom-section-title {
    margin-bottom: 19px;
    color: #a47780;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
}

.custom-numbers {
    display: flex;
    justify-content: center;
    gap: 9px;
    margin-bottom: 14px;
}

.custom-numbers > div {
    width: 52px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #efb0a0;
    border-radius: 9px;
    background: white;
    color: #7b071d;
    font-family: Arial, sans-serif;
    font-size: 25px;
    font-weight: 800;
    box-shadow: 0 4px 12px rgba(95,0,20,0.06);
}

.result-status {
    margin-bottom: 20px;
    color: #aaa;
    text-align: center;
    font-size: 9px;
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    overflow: hidden;
    border-radius: 8px;
}

.custom-table thead th {
    height: 46px;
    padding: 9px 17px;
    background: #580014;
    color: white;
    font-size: 10px;
}

.custom-table thead th:first-child {
    text-align: left;
}

.custom-table thead th:last-child {
    text-align: right;
}

.custom-table tbody td {
    height: 54px;
    padding: 8px 18px;
    border-bottom: 1px solid #eee9ea;
    font-size: 11px;
}

.custom-table tbody td:first-child {
    color: #657386;
    text-align: left;
}

.custom-table tbody td:last-child {
    color: #263347;
    text-align: right;
    font-family: Arial;
    font-weight: 700;
}

.highlight-prize {
    color: #c72f47 !important;
    font-size: 14px !important;
}

.information-card {
    margin-top: 18px;
    padding: 14px 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    border: 1px solid #e7e8ec;
    border-radius: 10px;
    background: white;
}

.info-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    background: #fff0f3;
    color: #7e0a22;
    font-family: Arial;
    font-weight: 700;
}

.information-card strong {
    font-size: 11px;
}

.information-card p {
    margin: 4px 0 0;
    color: #8f8f8f;
    font-size: 9px;
    line-height: 1.5;
}

.schedule-list div {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #eee;
}

.schedule-list div:last-child {
    border-bottom: 0;
}

.schedule-list span {
    color: #555;
    font-size: 10px;
}

.schedule-list strong {
    padding: 5px 8px;
    border-radius: 5px;
    background: #fff0f3;
    color: #700019;
    font-family: Arial;
    font-size: 10px;
}

.analytics-card {
    margin-bottom: 22px;
    padding: 18px;
    border: 1px solid #eee4e6;
    border-radius: 12px;
    background: white;
    box-shadow: 0 6px 20px rgba(0,0,0,0.04);
}

.analytics-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.analytics-header div {
    display: flex;
    flex-direction: column;
}

.analytics-header span {
    color: #999;
    font-size: 9px;
}

.analytics-header strong {
    margin-top: 3px;
    font-size: 14px;
}

.fake-percent {
    padding: 4px 7px;
    border-radius: 5px;
    background: #effaf3;
    color: #40a867 !important;
    font-family: Arial;
}

.fake-chart {
    height: 120px;
    margin-top: 25px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px;
}

.fake-chart span {
    flex: 1;
    border-radius: 5px 5px 0 0;
    background: linear-gradient(
        #c13552,
        #6c0019
    );
}

.chart-labels {
    margin-top: 7px;
    display: flex;
    justify-content: space-around;
    color: #999;
    font-size: 8px;
}

.news-section {
    padding: 55px 0;
    background: #fff;
}

.section-title-row {
    margin-bottom: 25px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}

.section-title-row span {
    color: #b05669;
    font-family: Arial;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.2px;
}

.section-title-row h2 {
    margin: 4px 0 0;
    color: #2b2730;
    font-size: 24px;
}

.section-title-row > a {
    color: #7a001c;
    font-size: 11px;
}

.news-cards {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 20px;
}

.news-feature {
    overflow: hidden;
    border: 1px solid #eee4e6;
    border-radius: 12px;
    background: white;
    transition: transform .2s ease, box-shadow .2s ease;
}

.news-feature:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(65,0,15,0.08);
}

.news-thumb {
    height: 150px;
    padding: 15px;
    display: flex;
    align-items: flex-end;
    background-size: cover;
}

.news-thumb-one {
    background: linear-gradient(
        135deg,
        #5f0016,
        #b1334e
    );
}

.news-thumb-two {
    background: linear-gradient(
        135deg,
        #1f2230,
        #6b0019
    );
}

.news-thumb-three {
    background: linear-gradient(
        135deg,
        #7c1730,
        #d77786
    );
}

.news-thumb span {
    padding: 5px 8px;
    border-radius: 50px;
    background: rgba(255,255,255,.15);
    color: white;
    font-family: Arial;
    font-size: 8px;
    letter-spacing: 1px;
}

.news-body {
    padding: 17px;
}

.news-body small {
    color: #aaa;
    font-family: Arial;
    font-size: 9px;
}

.news-body h3 {
    margin: 7px 0;
    color: #30303a;
    font-size: 14px;
    line-height: 1.5;
}

.news-body p {
    margin: 0;
    color: #898989;
    font-size: 10px;
    line-height: 1.65;
}

.history-section {
    padding: 50px 0 200px;
    background: linear-gradient(
        #f7f5f5,
        #f3eeee
    );
}

#history-container {
    padding: 24px 26px 28px;
    border: 1px solid #eee4e6;
    border-radius: 18px;
    background: white;
    box-shadow: 0 10px 30px rgba(58,0,13,0.05);
}

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

.history-small-title {
    color: #b05e6d;
    font-family: Arial;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 1px;
}

.history-title-text {
    margin: 3px 0 0;
    color: #4d0012;
    font-size: 16px;
}

.history-badge {
    padding: 6px 10px;
    border-radius: 50px;
    background: #fff0f3;
    color: #7b001c;
    font-size: 9px;
}

.table-responsive-wrapper {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #eacfd5;
    border-radius: 10px;
}

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

#history-table thead th {
    height: 52px;
    padding: 9px 8px;
    background: #580014;
    color: white;
    font-size: 10px;
}

#history-table tbody td {
    height: 54px;
    padding: 8px;
    border-right: 1px solid #eee4e6;
    border-bottom: 1px solid #f0e9ea;
    color: #374153;
    text-align: center;
    font-family: Arial;
    font-size: 10px;
}

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

#history-table tbody td:first-child {
    color: #5c0015;
    font-weight: 700;
}

#history-table tbody td:nth-child(2) {
    color: #dc3d58;
    font-weight: 800;
}

.history-loading {
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.loader {
    width: 20px;
    height: 20px;
    border: 3px solid #eee;
    border-top-color: #75001b;
    border-radius: 50%;
    animation: loaderSpin .8s linear infinite;
}

@keyframes loaderSpin {
    to {
        transform: rotate(360deg);
    }
}

.site-footer {
    padding: 35px 0;
    background: #30000b;
    color: white;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    align-items: center;
    gap: 30px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-flag {
    width: 42px;
    height: 42px;
}

.footer-flag svg {
    width: 100%;
    height: 100%;
}

.footer-brand strong {
    font-family: Arial;
    font-size: 15px;
}

.footer-brand p {
    margin: 3px 0 0;
    color: #beaab0;
    font-size: 9px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.footer-links a {
    color: #d6c1c6;
    font-size: 9px;
}

.footer-copy {
    color: #a88f95;
    font-family: Arial;
    font-size: 9px;
}

@media (max-width: 1000px) {
    .main-grid {
        grid-template-columns: 200px minmax(0,1fr) 230px;
        gap: 15px;
    }
    .nav-links a {
        padding: 0 18px;
    }
    .custom-numbers > div {
        width: 46px;
    }
}

@media (max-width: 820px) {
    .mobile-menu-button {
        display: block;
    }
    .nav-links {
        display: none;
        flex-direction: column;
    }
    .nav-links.active {
        display: flex;
    }
    .nav-links a {
        min-height: 44px;
        justify-content: flex-start;
        border-top: 1px solid rgba(255,255,255,.1);
    }
    .quick-stats {
        grid-template-columns: repeat(2,1fr);
    }
    .main-grid {
        grid-template-columns: 1fr 1fr;
    }
    .left-sidebar {
        display: none;
    }
}

@media (max-width: 620px) {
    .site-container {
        max-width: calc(100% - 14px);
    }
    .header-status {
        display: none;
    }
    .header-inner {
        min-height: 64px;
    }
    .hero-banner {
        height: 210px;
        border-radius: 10px;
    }
    .hero-overlay {
        width: 78%;
        left: 20px;
    }
    .hero-overlay h1 {
        font-size: 27px;
    }
    .quick-stats {
        margin-top: 15px;
        grid-template-columns: repeat(2,1fr);
        gap: 8px;
    }
    .stat-card {
        min-height: 70px;
        padding: 10px;
    }
    .stat-icon {
        width: 35px;
        height: 35px;
    }
    .main-grid {
        display: block;
        padding-top: 25px;
    }
    .left-sidebar {
        display: none;
    }
    .right-sidebar {
        margin-top: 20px;
    }
    .custom-container {
        border-radius: 12px;
    }
    .custom-header {
        min-height: 78px;
        padding: 12px;
    }
    .custom-flag-wrapper {
        width: 40px;
    }
    .custom-flag {
        width: 38px;
        height: 38px;
    }
    .custom-title-block strong {
        font-size: 12px;
    }
    .live-label {
        display: none;
    }
    .custom-body {
        padding: 18px 10px;
    }
    .custom-numbers {
        gap: 5px;
    }
    .custom-numbers > div {
        width: 45px;
        height: 50px;
        font-size: 20px;
    }
    .news-cards {
        display: block;
    }
    .news-feature {
        margin-bottom: 15px;
    }
    .section-title-row h2 {
        font-size: 18px;
    }
    #history-container {
        padding: 15px 8px;
    }
    .history-section {
        padding-bottom: 100px;
    }
    .footer-grid {
        display: block;
        text-align: center;
    }
    .footer-brand {
        justify-content: center;
        margin-bottom: 20px;
    }
    .footer-links {
        margin-bottom: 20px;
    }
}