* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: "Noto Sans Lao", Arial, sans-serif;
    background: #f4f7fb;
    color: #172033;
}

img {
    max-width: 100%;
}

a {
    color: inherit;
}

.site-header {
    width: 100%;
    background: #ffffff;
    border-top: 4px solid #243bdc;
}

.header-inner {
    width: calc(100% - 40px);
    max-width: 1480px;
    min-height: 105px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.brand-icon {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #e8b637;
    background: #fff;
}

.brand-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.brand-text h1 {
    margin: 0;
    color: #2035d5;
    font-size: 27px;
    font-weight: 800;
    letter-spacing: 1px;
}

.brand-text span {
    display: block;
    margin-top: 3px;
    color: #7d8799;
    font-size: 13px;
}

.header-label {
    padding: 9px 15px;
    border-radius: 30px;
    background: #eef2ff;
    color: #2944d9;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
}

.top-nav {
    width: 100%;
    background: linear-gradient(90deg, #242bd2, #275fe2);
    box-shadow: 0 4px 15px rgba(31, 59, 190, 0.15);
}

.nav-inner {
    width: calc(100% - 40px);
    max-width: 1480px;
    min-height: 55px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.nav-inner a {
    min-height: 55px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-bottom: 3px solid transparent;
    transition: 0.2s;
}

.nav-inner a:hover,
.nav-inner a.active {
    background: rgba(255, 255, 255, 0.1);
    border-bottom-color: #ffffff;
}

.page-container {
    width: calc(100% - 30px);
    max-width: 1480px;
    margin: 0 auto;
    padding: 25px 0 50px;
}

.main-layout {
    display: grid;
    grid-template-columns: 310px minmax(560px, 1fr) 310px;
    gap: 25px;
    align-items: start;
}

.news-column,
.center-column {
    min-width: 0;
}

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

.section-heading span {
    width: 5px;
    height: 24px;
    display: block;
    border-radius: 10px;
    background: #2a47dd;
}

.section-heading h2 {
    margin: 0;
    color: #172033;
    font-size: 18px;
    font-weight: 700;
}

.news-card {
    margin-bottom: 22px;
    overflow: hidden;
    border: 1px solid #e5e9f0;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 5px 18px rgba(29, 44, 78, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.news-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(29, 44, 78, 0.1);
}

.news-card > a {
    display: block;
    overflow: hidden;
}

.news-card img {
    width: 100%;
    height: 180px;
    display: block;
    object-fit: cover;
    transition: transform 0.3s;
}

.news-card:hover img {
    transform: scale(1.03);
}

.news-content {
    padding: 15px 16px 18px;
}

.news-category {
    display: inline-flex;
    margin-bottom: 9px;
    padding: 4px 9px;
    border-radius: 20px;
    background: #edf2ff;
    color: #2b49dc;
    font-size: 10px;
    font-weight: 700;
}

.news-card h3 {
    margin: 0 0 9px;
    color: #222b3c;
    font-size: 15px;
    line-height: 1.65;
    font-weight: 700;
}

.news-card p {
    margin: 0;
    color: #8992a3;
    font-size: 12px;
    line-height: 1.8;
}

.lottery-widget {
    width: 100%;
    overflow: hidden;
    border: 1px solid #dce2ec;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 35px rgba(35, 58, 145, 0.12);
}

.lottery-header {
    position: relative;
    min-height: 100px;
    padding: 18px 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(120deg, #2933d7 0%, #2464df 55%, #198fd7 100%);
    color: #ffffff;
}

.lottery-logo {
    position: absolute;
    left: 25px;
    top: 50%;
    width: 57px;
    height: 57px;
    transform: translateY(-50%);
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.85);
    border-radius: 50%;
    background: #fff;
}

.lottery-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lottery-header-text {
    text-align: center;
}

.lottery-header-text h2 {
    margin: 0;
    color: #fff;
    font-size: 23px;
    font-weight: 800;
}

.lottery-header-text p {
    margin: 5px 0 0;
    color: rgba(255, 255, 255, 0.92);
    font-size: 15px;
}

.live-badge {
    position: absolute;
    top: 15px;
    right: 18px;
    padding: 5px 10px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1px;
}

.lottery-body {
    padding: 25px 35px 35px;
}

.lottery-date {
    margin-bottom: 25px;
    text-align: center;
    color: #8891a2;
    font-size: 13px;
}

.main-result-label {
    margin-bottom: 8px;
    text-align: center;
    color: #697386;
    font-size: 14px;
    font-weight: 600;
}

.main-result {
    width: 320px;
    max-width: 100%;
    min-height: 105px;
    margin: 0 auto 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #3152dd;
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff, #f6f8ff);
    box-shadow: 0 8px 20px rgba(45, 73, 206, 0.12);
    color: #222b3a;
    font-family: Arial, sans-serif;
    font-size: 64px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: 8px;
}

.result-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.result-item {
    overflow: hidden;
    border: 1px solid #d9dfea;
    border-radius: 12px;
    background: #fff;
}

.result-name {
    min-height: 44px;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f4f7ff;
    border-bottom: 1px solid #d9dfea;
    color: #526078;
    font-size: 14px;
    font-weight: 600;
}

.result-number {
    min-height: 72px;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #20283a;
    font-family: Arial, sans-serif;
    font-size: 29px;
    font-weight: 800;
}

.main-story {
    margin-top: 25px;
    overflow: hidden;
    border: 1px solid #e3e8f0;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 5px 20px rgba(29, 44, 78, 0.05);
}

.main-story-image {
    position: relative;
}

.main-story-image img {
    width: 100%;
    height: 340px;
    display: block;
    object-fit: cover;
}

.story-badge {
    position: absolute;
    left: 18px;
    bottom: 18px;
    padding: 7px 12px;
    border-radius: 30px;
    background: #2c48dc;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
}

.main-story-content {
    padding: 20px 24px 23px;
}

.main-story-content h2 {
    margin: 0 0 9px;
    color: #20293b;
    font-size: 20px;
    line-height: 1.6;
}

.main-story-content p {
    margin: 0;
    color: #8992a2;
    font-size: 13px;
    line-height: 1.8;
}

.history-section {
    margin-top: 25px;
    overflow: hidden;
    border: 1px solid #e0e5ee;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 5px 20px rgba(29, 44, 78, 0.05);
}

.history-heading {
    padding: 18px 20px;
    border-bottom: 1px solid #e4e8ef;
}

.small-title {
    display: block;
    margin-bottom: 2px;
    color: #3151db;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.history-heading h2 {
    margin: 0;
    color: #222b3b;
    font-size: 18px;
}

#history-container {
    width: 100%;
    overflow-x: auto;
}

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

#history-table th,
#history-table td {
    padding: 14px 7px;
    border-right: 1px solid #e0e5ed;
    border-bottom: 1px solid #e0e5ed;
    text-align: center;
    vertical-align: middle;
}

#history-table th:last-child,
#history-table td:last-child {
    border-right: 0;
}

#history-table tbody tr:last-child td {
    border-bottom: 0;
}

#history-table th {
    background: #f6f8fc;
    color: #46536b;
    font-size: 12px;
    line-height: 1.55;
    font-weight: 700;
}

#history-table td {
    color: #59657a;
    font-family: Arial, "Noto Sans Lao", sans-serif;
    font-size: 13px;
}

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

.site-footer {
    width: 100%;
    margin-top: 20px;
    background: #182448;
}

.footer-inner {
    width: calc(100% - 40px);
    max-width: 1480px;
    min-height: 120px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #fff;
}

.footer-inner strong {
    display: block;
    margin-bottom: 3px;
    font-size: 18px;
}

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

.footer-inner p {
    margin: 0;
    color: #909dbd;
    font-size: 11px;
}

@media (max-width: 1200px) {
    .main-layout {
        grid-template-columns: 260px minmax(500px, 1fr) 260px;
        gap: 18px;
    }

    .news-card img {
        height: 155px;
    }

    .lottery-body {
        padding-left: 25px;
        padding-right: 25px;
    }
}

@media (max-width: 1000px) {
    .main-layout {
        grid-template-columns: minmax(0, 1fr) 290px;
    }

    .center-column {
        grid-column: 1;
        grid-row: 1;
    }

    .news-column:last-child {
        grid-column: 2;
        grid-row: 1;
    }

    .news-column:first-child {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 18px;
    }

    .news-column:first-child .section-heading {
        grid-column: 1 / -1;
        margin-bottom: 0;
    }
}

@media (max-width: 760px) {
    .header-inner {
        width: calc(100% - 24px);
        min-height: 85px;
    }

    .brand-icon {
        width: 50px;
        height: 50px;
    }

    .brand-text h1 {
        font-size: 20px;
    }

    .brand-text span,
    .header-label {
        display: none;
    }

    .top-nav {
        overflow-x: auto;
    }

    .nav-inner {
        width: max-content;
        min-width: 100%;
        justify-content: flex-start;
        padding: 0 10px;
    }

    .nav-inner a {
        flex-shrink: 0;
        padding: 0 17px;
    }

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

    .main-layout {
        display: flex;
        flex-direction: column;
    }

    .center-column {
        order: 1;
        width: 100%;
    }

    .news-column:first-child {
        order: 2;
        width: 100%;
        display: block;
    }

    .news-column:last-child {
        order: 3;
        width: 100%;
    }

    .lottery-header {
        padding: 15px 55px;
    }

    .lottery-logo {
        left: 13px;
        width: 43px;
        height: 43px;
    }

    .live-badge {
        display: none;
    }

    .lottery-header-text h2 {
        font-size: 19px;
    }

    .lottery-header-text p {
        font-size: 12px;
    }

    .lottery-body {
        padding: 20px 15px 25px;
    }

    .main-result {
        width: 280px;
        min-height: 90px;
        margin-bottom: 25px;
        font-size: 51px;
        letter-spacing: 5px;
    }

    .result-grid {
        gap: 10px;
    }

    .result-name {
        font-size: 12px;
    }

    .result-number {
        min-height: 62px;
        font-size: 24px;
    }

    .main-story-image img {
        height: 250px;
    }

    #history-table {
        min-width: 650px;
    }

    .news-card img {
        height: auto;
        max-height: 300px;
    }

    .footer-inner {
        min-height: 100px;
        display: block;
        padding: 25px 0;
        text-align: center;
    }

    .footer-inner p {
        margin-top: 15px;
    }
}

@media (max-width: 430px) {
    .lottery-header {
        min-height: 85px;
        padding-left: 50px;
        padding-right: 10px;
    }

    .lottery-logo {
        width: 36px;
        height: 36px;
    }

    .lottery-header-text h2 {
        font-size: 17px;
    }

    .main-result {
        width: 240px;
        min-height: 80px;
        font-size: 43px;
    }

    .result-name {
        min-height: 40px;
        font-size: 11px;
    }

    .result-number {
        min-height: 58px;
        font-size: 22px;
    }

    .main-story-content {
        padding: 16px;
    }

    .main-story-content h2 {
        font-size: 17px;
    }
}