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

html,
body {
    width: 100%;
    min-height: 100%;
}

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

.top-header {
    width: 100%;
    background: #ffffff;
}

.header-inner {
    width: min(1500px, calc(100% - 30px));
    min-height: 70px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    color: #cc4b00;
    font-size: 25px;
    font-weight: 700;
    text-decoration: none;
}

.header-links {
    display: flex;
    align-items: center;
    gap: 30px;
}

.header-links a {
    color: #777777;
    font-size: 13px;
    text-decoration: none;
}

.main-nav {
    width: 100%;
    background: #c94a00;
    border-bottom: 3px solid #ffffff;
}

.nav-inner {
    width: min(1500px, calc(100% - 30px));
    height: 58px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 35px;
}

.nav-inner a {
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.lottery-section {
    width: 100%;
    background: #c94a00;
}

.lao-lottery-widget {
    width: 100%;
    color: #ffffff;
}

.main-content {
    width: min(1500px, calc(100% - 30px));
    min-height: 570px;
    margin: 0 auto;
    padding: 40px 40px 35px;
    text-align: center;
}

.lottery-title {
    margin-bottom: 8px;
    font-size: 24px;
    font-weight: 700;
}

.lottery-date {
    margin-bottom: 8px;
    font-size: 17px;
    font-weight: 500;
}

.live-time {
    font-size: 15px;
}

.main-prize-area {
    margin-top: 45px;
}

.prize-label {
    margin-bottom: 35px;
    font-size: 17px;
}

.prize-main {
    width: fit-content;
    min-width: 300px;
    margin: 0 auto;
    padding: 12px 30px;
    border: 4px solid #ffffff;
    border-radius: 12px;
    color: #ffff00;
    font-size: 68px;
    line-height: 1;
    font-weight: 900;
    letter-spacing: 3px;
}

.prize-secondary-container {
    width: 100%;
    margin-top: 85px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 70px;
}

.prize-secondary-item {
    min-width: 0;
}

.label-text {
    display: block;
    margin-bottom: 20px;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
}

.number-box {
    width: 100%;
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid #ffffff;
    border-radius: 12px;
    color: #ffff00;
    font-size: 32px;
    font-weight: 800;
}

.banner-section {
    padding: 12px;
    background: #eaf1f7;
}

.main-banner {
    display: block;
    width: 100%;
    max-height: 450px;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.content-section {
    width: 100%;
    padding: 10px 12px 25px;
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr) 360px;
    align-items: start;
    gap: 22px;
    background: #ffffff;
}

.ads-column {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.ads-column img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.25);
}

.history-area {
    min-width: 0;
}

.history-title-box {
    min-height: 95px;
    padding: 0 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    background: #c94a00;
    border-radius: 13px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.22);
}

.history-title-box h2 {
    color: #ffffff;
    font-size: 22px;
    font-weight: 500;
    white-space: nowrap;
}

.history-title-box span {
    width: 140px;
    height: 2px;
    background: #ffffff;
}

#history-container {
    width: 100%;
    margin-top: 25px;
    padding: 28px 10px 40px;
    overflow-x: auto;
    background: #c94a00;
    border-radius: 12px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.22);
}

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

#history-table th,
#history-table td {
    padding: 14px 8px;
    border: 1px solid #555555;
    text-align: center;
    vertical-align: middle;
}

#history-table th {
    background: #ffffff;
    color: #222222;
    font-size: 13px;
    font-weight: 700;
}

#history-table td {
    color: #333333;
    font-size: 13px;
}

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

.bottom-banner-section {
    width: 100%;
    padding: 0 12px 50px;
    background: #eaf1f7;
}

.bottom-banner {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

@media (max-width: 1200px) {
    .content-section {
        grid-template-columns: 250px minmax(0, 1fr) 250px;
        gap: 15px;
    }

    .prize-secondary-container {
        gap: 35px;
    }

    .history-title-box h2 {
        font-size: 17px;
    }

    .history-title-box span {
        width: 70px;
    }
}

@media (max-width: 900px) {
    .header-inner {
        min-height: 60px;
    }

    .header-links {
        display: none;
    }

    .nav-inner {
        height: auto;
        min-height: 55px;
        padding: 12px 0;
        flex-wrap: wrap;
        gap: 12px 25px;
    }

    .main-content {
        min-height: auto;
        padding: 35px 20px 40px;
    }

    .prize-secondary-container {
        margin-top: 60px;
        grid-template-columns: repeat(2, 1fr);
        gap: 35px;
    }

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

    .history-area {
        grid-row: 1;
    }

    .left-ads {
        grid-row: 2;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }

    .right-ads {
        grid-row: 3;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }

    .history-title-box h2 {
        white-space: normal;
        text-align: center;
    }
}

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

    .logo {
        font-size: 20px;
    }

    .nav-inner {
        width: calc(100% - 20px);
    }

    .nav-inner a {
        font-size: 12px;
    }

    .main-content {
        width: 100%;
        padding: 30px 12px 35px;
    }

    .lottery-title {
        font-size: 21px;
    }

    .lottery-date {
        font-size: 14px;
    }

    .live-time {
        font-size: 13px;
    }

    .main-prize-area {
        margin-top: 35px;
    }

    .prize-label {
        margin-bottom: 20px;
    }

    .prize-main {
        min-width: 220px;
        padding: 10px 20px;
        font-size: 48px;
        border-width: 3px;
    }

    .prize-secondary-container {
        margin-top: 50px;
        gap: 25px 12px;
    }

    .label-text {
        margin-bottom: 12px;
        font-size: 13px;
    }

    .number-box {
        min-height: 55px;
        border-width: 3px;
        font-size: 24px;
    }

    .banner-section {
        padding: 7px;
    }

    .content-section {
        padding: 7px;
        gap: 15px;
    }

    .history-title-box {
        min-height: 70px;
        padding: 10px 15px;
    }

    .history-title-box h2 {
        font-size: 16px;
    }

    .history-title-box span {
        width: 35px;
    }

    #history-container {
        margin-top: 12px;
        padding: 15px 6px 20px;
    }

    .left-ads,
    .right-ads {
        grid-template-columns: 1fr;
    }

    .bottom-banner-section {
        padding: 0 7px 30px;
    }
}