* {
    box-sizing: border-box;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Noto Sans Lao", Arial, sans-serif;
    background: #f5f7f4;
    color: #20302a;
}

img {
    max-width: 100%;
}

.site-header {
    width: 100%;
    background: #ffffff;
    border-top: 5px solid #0a684b;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
}

.logo-symbol {
    width: 68px;
    height: 68px;
    padding: 4px;
    overflow: hidden;
    border: 2px solid #c8a64b;
    border-radius: 50%;
    background: #fff;
}

.logo-symbol img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.logo-text strong {
    display: block;
    color: #075d43;
    font-size: 24px;
    font-weight: 800;
}

.logo-text span {
    display: block;
    margin-top: 2px;
    color: #b38b2e;
    font-family: Arial, sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
}

.header-info {
    padding-left: 25px;
    border-left: 1px solid #e1e6e3;
    text-align: right;
}

.header-info span {
    display: block;
    color: #87918d;
    font-size: 12px;
}

.header-info strong {
    display: block;
    margin-top: 3px;
    color: #096348;
    font-size: 15px;
}

.main-nav {
    position: relative;
    z-index: 10;
    width: 100%;
    background: #075d43;
    box-shadow: 0 4px 15px rgba(0, 65, 45, 0.15);
}

.nav-container {
    width: calc(100% - 40px);
    max-width: 1350px;
    min-height: 55px;
    margin: 0 auto;
    display: flex;
    align-items: center;
}

.nav-container a {
    min-height: 55px;
    padding: 0 25px;
    display: flex;
    align-items: center;
    color: #e8f4ef;
    border-bottom: 3px solid transparent;
    text-decoration: none;
    font-size: 14px;
    transition: 0.2s;
}

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

.hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 80% 20%, rgba(216, 180, 79, 0.25), transparent 30%),
        linear-gradient(125deg, #064d38 0%, #087255 60%, #0d8665 100%);
}

.hero::before {
    content: "";
    position: absolute;
    width: 400px;
    height: 400px;
    top: -250px;
    left: -100px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
}

.hero-container {
    position: relative;
    width: calc(100% - 40px);
    max-width: 1350px;
    min-height: 275px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hero-small {
    display: inline-block;
    margin-bottom: 10px;
    color: #e6c46b;
    font-family: Arial, sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 3px;
}

.hero-content h1 {
    margin: 0;
    color: #ffffff;
    font-size: 42px;
    line-height: 1.3;
    font-weight: 800;
}

.hero-content p {
    margin: 8px 0 20px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 15px;
}

.hero-time {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 15px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    font-size: 13px;
}

.live-dot {
    width: 8px;
    height: 8px;
    display: block;
    border-radius: 50%;
    background: #f5c852;
    box-shadow: 0 0 0 4px rgba(245, 200, 82, 0.15);
}

.hero-logo {
    width: 190px;
    height: 190px;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}

.hero-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.page-container {
    width: calc(100% - 30px);
    max-width: 1350px;
    margin: 0 auto;
    padding: 35px 0 60px;
}

.result-section {
    overflow: hidden;
    border: 1px solid #dde5e1;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 12px 35px rgba(17, 62, 47, 0.08);
}

.result-header {
    min-height: 85px;
    padding: 18px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e3e8e5;
}

.section-small {
    display: block;
    margin-bottom: 2px;
    color: #b58e34;
    font-family: Arial, sans-serif;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 2px;
}

.result-header h2 {
    margin: 0;
    color: #173c31;
    font-size: 21px;
}

.result-date {
    padding: 8px 14px;
    border-radius: 30px;
    background: #f1f7f4;
    color: #65746e;
    font-size: 12px;
}

.result-content {
    display: grid;
    grid-template-columns: 1fr 1.45fr;
}

.main-prize-area {
    padding: 45px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-right: 1px solid #e1e7e4;
    background: linear-gradient(145deg, #fbfdfc, #f1f7f4);
}

.prize-label {
    margin-bottom: 12px;
    color: #65736d;
    font-size: 14px;
    font-weight: 600;
}

.main-prize {
    width: 330px;
    max-width: 100%;
    min-height: 115px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #0a704f;
    border-radius: 15px;
    background: #ffffff;
    box-shadow:
        0 8px 22px rgba(8, 104, 74, 0.1),
        inset 0 -5px 0 #f2f6f4;
    color: #153d31;
    font-family: Arial, sans-serif;
    font-size: 67px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: 8px;
}

.draw-time {
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 7px;
    color: #89938f;
    font-size: 11px;
}

.draw-time span {
    width: 7px;
    height: 7px;
    display: block;
    border-radius: 50%;
    background: #c5a14b;
}

.secondary-results {
    padding: 35px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.result-card {
    min-height: 115px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 16px;
    border: 1px solid #e0e7e3;
    border-radius: 13px;
    background: #ffffff;
    transition: 0.2s;
}

.result-card:hover {
    border-color: #b8d3c9;
    box-shadow: 0 8px 20px rgba(17, 72, 54, 0.07);
}

.result-card-icon {
    width: 47px;
    height: 47px;
    flex: 0 0 47px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #edf6f2;
    color: #087052;
    font-family: Arial, sans-serif;
    font-size: 18px;
    font-weight: 800;
}

.result-card-info {
    min-width: 0;
}

.result-card-info span {
    display: block;
    margin-bottom: 4px;
    color: #8b9691;
    font-size: 11px;
}

.result-card-info strong {
    display: block;
    color: #173e32;
    font-family: Arial, sans-serif;
    font-size: 27px;
    font-weight: 800;
}

.content-layout {
    margin-top: 30px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 315px;
    gap: 25px;
    align-items: start;
}

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

.history-section,
.news-section,
.sidebar-card {
    overflow: hidden;
    border: 1px solid #e0e6e3;
    border-radius: 15px;
    background: #ffffff;
    box-shadow: 0 5px 20px rgba(30, 65, 54, 0.04);
}

.section-title {
    min-height: 80px;
    padding: 17px 22px;
    display: flex;
    align-items: center;
    gap: 20px;
    border-bottom: 1px solid #e5eae7;
}

.section-title > div:first-child {
    flex-shrink: 0;
}

.section-title span {
    display: block;
    margin-bottom: 2px;
    color: #b38d38;
    font-family: Arial, sans-serif;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 2px;
}

.section-title h2 {
    margin: 0;
    color: #183d32;
    font-size: 18px;
}

.title-line {
    width: 100%;
    height: 1px;
    background: #e3e8e5;
}

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

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

#history-table th,
#history-table td {
    padding: 15px 7px;
    border-right: 1px solid #e1e6e3;
    border-bottom: 1px solid #e1e6e3;
    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: #f5f8f6;
    color: #53655e;
    font-size: 12px;
    line-height: 1.55;
    font-weight: 700;
}

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

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

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

.news-section {
    margin-top: 25px;
}

.news-grid {
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.news-card {
    overflow: hidden;
    border: 1px solid #e3e8e5;
    border-radius: 12px;
    background: #fff;
}

.news-card img {
    width: 100%;
    height: 210px;
    display: block;
    object-fit: cover;
}

.news-body {
    padding: 15px;
}

.news-category {
    display: inline-block;
    margin-bottom: 8px;
    padding: 4px 9px;
    border-radius: 20px;
    background: #edf6f2;
    color: #087052;
    font-size: 9px;
    font-weight: 700;
}

.news-body h3 {
    margin: 0 0 8px;
    color: #243a33;
    font-size: 15px;
    line-height: 1.6;
}

.news-body p {
    margin: 0;
    color: #8c9792;
    font-size: 11px;
    line-height: 1.8;
}

.sidebar-card {
    padding: 18px;
}

.sidebar-title {
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #1e3c33;
    font-size: 16px;
    font-weight: 700;
}

.sidebar-title span {
    width: 4px;
    height: 20px;
    display: block;
    border-radius: 10px;
    background: #b99743;
}

.side-news {
    padding-bottom: 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid #e4e9e6;
}

.side-news:last-child {
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom: 0;
}

.side-news img {
    width: 100%;
    height: 150px;
    display: block;
    object-fit: cover;
    border-radius: 9px;
}

.side-news h3 {
    margin: 10px 2px 0;
    color: #34483f;
    font-size: 13px;
    line-height: 1.7;
}

.site-footer {
    width: 100%;
    background: #063d2d;
}

.footer-container {
    width: calc(100% - 40px);
    max-width: 1350px;
    min-height: 125px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.footer-brand img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.footer-brand strong {
    display: block;
    color: #ffffff;
    font-size: 16px;
}

.footer-brand span {
    color: #9db9af;
    font-family: Arial, sans-serif;
    font-size: 9px;
    letter-spacing: 1px;
}

.footer-container p {
    color: #829f95;
    font-family: Arial, sans-serif;
    font-size: 10px;
}

@media (max-width: 950px) {
    .content-layout {
        grid-template-columns: 1fr;
    }

    .sidebar-card {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }

    .sidebar-title {
        grid-column: 1 / -1;
    }

    .side-news {
        padding: 0;
        margin: 0;
        border: 0;
    }

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

    .main-prize-area {
        border-right: 0;
        border-bottom: 1px solid #e1e7e4;
    }
}

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

    .logo-symbol {
        width: 52px;
        height: 52px;
    }

    .logo-text strong {
        font-size: 18px;
    }

    .logo-text span,
    .header-info {
        display: none;
    }

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

    .nav-container {
        width: max-content;
        min-width: 100%;
    }

    .nav-container a {
        flex-shrink: 0;
        padding: 0 18px;
    }

    .hero-container {
        width: calc(100% - 30px);
        min-height: 220px;
    }

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

    .hero-logo {
        width: 120px;
        height: 120px;
    }

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

    .result-header {
        display: block;
        text-align: center;
    }

    .result-date {
        display: inline-block;
        margin-top: 10px;
    }

    .main-prize-area {
        padding: 30px 15px;
    }

    .main-prize {
        width: 280px;
        min-height: 95px;
        font-size: 52px;
        letter-spacing: 5px;
    }

    .secondary-results {
        padding: 15px;
        gap: 10px;
    }

    .result-card {
        min-height: 100px;
        padding: 10px;
        gap: 10px;
    }

    .result-card-icon {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
    }

    .result-card-info strong {
        font-size: 22px;
    }

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

    .news-grid {
        grid-template-columns: 1fr;
        padding: 15px;
    }

    .sidebar-card {
        display: block;
    }

    .side-news {
        padding-bottom: 18px;
        margin-bottom: 18px;
        border-bottom: 1px solid #e4e9e6;
    }

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

    .footer-brand {
        justify-content: center;
    }

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

@media (max-width: 450px) {
    .hero-logo {
        display: none;
    }

    .hero-container {
        justify-content: center;
        text-align: center;
    }

    .secondary-results {
        grid-template-columns: 1fr 1fr;
    }

    .result-card {
        display: block;
        text-align: center;
    }

    .result-card-icon {
        margin: 0 auto 8px;
    }
}