
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
body {
    font-family: Arial, sans-serif;
    background-color: #f2f2f2;
    color: #333;
    line-height: 1.4;
}

.site-header {
    background-color: #fff;
    padding: 15px 0;
}
.container-header {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px;
}
.logo-box {
    width: 25%;
}
.site-logo {
    height: 55px; 
    width: auto;
    display: block;
}
.center-title {
    width: 50%;
    text-align: center;
}
.title-small {
    font-size: 14px;
    color: #555;
    font-weight: bold;
}
.title-domain {
    font-size: 20px;
    color: #cc0000;
    font-weight: bold;
    margin-top: 4px;
}
.social-icons {
    width: 25%;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}
.icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 3px;
    color: #fff;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
}
.icon.fb { background-color: #3b5998; }
.icon.tw { background-color: #1da1f2; }
.icon.yt { background-color: #ff0000; }

/* --- Green Navigation Bar --- */
.main-nav-green {
    background-color: #0b9e2c; /* สีเขียว */
    padding: 0;
}
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
}
.main-nav-green a {
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: bold;
    padding: 10px 15px;
}
.main-nav-green a:hover, .main-nav-green a.active {
    background-color: #087520;
}

.wrapper {
    max-width: 1200px;
    margin: 15px auto;
    display: flex;
    gap: 15px;
    padding: 0 10px;
}
.sidebar-left {
    width: 220px;
    flex-shrink: 0;
}
.sidebar-right {
    width: 250px;
    flex-shrink: 0;
}
.main-content {
    flex-grow: 1;
    background: #fff;
    padding: 10px;
    border: 1px solid #ccc;
    min-width: 0;
}

.widget-box {
    background: #fff;
    border: 1px solid #ccc;
    margin-bottom: 15px;
}
.widget-header-green {
    background-color: #0b9e2c;
    color: #fff;
    font-size: 13px;
    font-weight: bold;
    text-align: center;
    padding: 8px;
}
.search-box {
    padding: 15px 10px;
    text-align: center;
}
.search-box h3 {
    font-size: 14px;
    margin-bottom: 10px;
    color: #333;
}
.input-search {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 2px;
    margin-bottom: 10px;
}
.btn-check {
    background-color: #0b9e2c;
    color: #fff;
    border: none;
    padding: 6px 20px;
    font-weight: bold;
    border-radius: 2px;
    cursor: pointer;
}


.text-list {
    list-style: none;
    padding: 10px;
}
.text-list li {
    font-size: 12px;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px dashed #eee;
}
.text-list a {
    color: #555;
    text-decoration: none;
}
.text-list a:hover {
    color: #0b9e2c;
}

.side-menu {
    list-style: none;
    padding: 8px;
}
.side-menu li {
    font-size: 12px;
    padding: 6px 0;
    border-bottom: 1px dashed #eee;
    display: flex;
    justify-content: space-between;
}
.side-menu a {
    color: #333;
    text-decoration: none;
}
.side-menu a:hover {
    color: #0b9e2c;
}
.dots {
    color: #aaa;
    font-size: 10px;
}

.banner-box {
    margin-bottom: 15px;
}
.banner-img {
    width: 100%;
    height: auto;
    display: block;
}

.custom-container {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 15px;
}
.custom-table {
    width: 49%;
    border-collapse: collapse;
}
.custom-table th, .custom-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: center;
    background-color: #fff;
    font-size: 13px;
}
.custom-table th {
    background-color: #f2f2f2;
    color: #333;
    font-weight: bold;
}
.custom-table td span {
    color: red;
    font-weight: bold;
}


.lottery-statistics {
    width: 100%;
    border-collapse: collapse;
    font-family: Arial, sans-serif;
}
.green-title-header {
    background-color: #0b9e2c; 
    color: #fff;
    text-align: center;
    font-size: 16px;
    font-weight: bold;
    padding: 8px;
}

.lottery-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 20px;
}
.lottery-table th, .lottery-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: center;
    background-color: #fff;
    font-weight: bold;
}
.lottery-table td {
    width: 100px;
}
.hide-header thead {
    display: none;
}
.margin-top {
    margin-top: 20px;
}


#resultDB, #resultG7_1, #resultG7_2, #resultG7_3, #resultG7_4,
#resultDNew, #resultG7_1New, #resultG7_2New, #resultG7_3New, #resultG7_4New {
    color: red;
    font-weight: 900;
    font-size: 28px;
}
#resultG1, #resultG1New {
    color: #000000;
    font-weight: 800;
    font-size: 24px;
}


.date-picker-input {
    width: 100%;
    padding: 8px;
    font-size: 15px;
    border: 1px solid #ccc;
    background-color: #fafafa;
    color: #333;
    outline: none;
}


.loading, .loading-new {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #fff;
    border-radius: 50%;
    border-top: 3px solid red;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


.site-footer {
    background-color: #fff;
    border-top: 1px solid #ccc;
    padding: 20px 10px;
    font-size: 11px;
    color: #666;
    margin-top: 20px;
}
.site-footer .footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
}
.site-footer p {
    width: 48%;
}

@media (max-width: 900px) {
    .wrapper { flex-direction: column; }
    .sidebar-left, .sidebar-right { width: 100%; }
    .site-footer .footer-container { flex-direction: column; text-align: center; gap: 10px; }
    .site-footer p { width: 100%; }
}