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

/* --- Header & Logo --- */
.site-header {
    background-color: #fff;
    text-align: center;
    padding: 20px 0;
}
.logo-container {
    max-width: 1000px;
    margin: 0 auto;
}
.main-logo {
    max-width: 100%;
    height: 80px; /* ปรับขนาดความสูงโลโก้ตามต้องการ */
    display: inline-block;
}

/* --- Announcement Bar --- */
.announcement-bar {
    max-width: 1000px;
    margin: 10px auto;
    display: flex;
    border: 1px solid #ccc;
    background-color: #fff;
}
.announce-label {
    background-color: #f2be62;
    color: #000;
    font-weight: bold;
    padding: 8px 15px;
    font-size: 14px;
    white-space: nowrap;
}
.announce-content {
    padding: 8px 15px;
    font-size: 14px;
    color: #555;
    flex-grow: 1;
}

/* --- Layout --- */
.wrapper {
    max-width: 1000px;
    margin: 15px auto;
    display: flex;
    gap: 15px;
}
.sidebar-left {
    width: 220px;
    flex-shrink: 0;
}
.sidebar-right {
    width: 220px;
    flex-shrink: 0;
}
.main-content {
    flex-grow: 1;
    min-width: 0;
}

/* --- Left Sidebar Widgets --- */
.widget-box {
    background: #fff;
    border: 1px solid #ccc;
    margin-bottom: 15px;
}
.widget-title {
    background-color: #f2be62;
    color: #000;
    font-size: 12px;
    font-weight: bold;
    text-align: center;
    padding: 8px;
    border-bottom: 1px solid #ccc;
}
.side-menu {
    list-style: none;
    padding: 10px;
}
.side-menu li {
    font-size: 12px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
}
.side-menu a {
    color: #333;
    text-decoration: none;
}
.side-menu a:hover {
    color: #ff0000;
}
.dots {
    color: #aaa;
    font-size: 10px;
}

/* Search Box */
.text-center {
    text-align: center;
}
.search-title {
    font-weight: bold;
    font-size: 16px;
    padding: 10px;
}
.search-form {
    padding: 0 10px 15px;
}
.search-input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
    margin-bottom: 10px;
    font-size: 13px;
}
.btn-search {
    background-color: #ff0000;
    color: #fff;
    border: none;
    padding: 8px 20px;
    font-weight: bold;
    border-radius: 3px;
    cursor: pointer;
}

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

/* --- Center Content --- */

/* Top Info Grid */
.top-grid-container {
    margin-bottom: 15px;
}
.info-grid-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    font-size: 11px;
}
.info-grid-table td {
    border: 1px solid #ccc;
    padding: 8px 5px;
    color: #555;
}

/* Lottery Statistics Section */
.lottery-statistics {
    background-color: #fff;
    border: 1px solid #ccc;
    margin-bottom: 15px;
}
.lottery-header {
    background-color: #f2be62;
    color: #000;
    text-align: center;
    font-size: 16px;
    font-weight: bold;
    padding: 10px;
    border-bottom: 1px solid #ccc;
}

/* Lottery Tables Styling */
.lottery-table {
    width: 100%;
    border-collapse: collapse;
    font-family: Arial, sans-serif;
    font-size: 20px;
    color: #000;
}
.lottery-table th, .lottery-table td {
    border: 1px solid #eee;
    padding: 10px 8px;
    text-align: center;
    background-color: #fff;
    font-weight: bold;
}
.lottery-table td {
    width: 100px;
}
.hide-header thead {
    display: none;
}

/* Highlight Results */
#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 */
.date-picker-input {
    width: 100%;
    padding: 10px;
    font-size: 15px;
    border: none;
    border-bottom: 1px solid #ccc;
    background-color: #fafafa;
    color: #333;
    outline: none;
}

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

/* --- Right Sidebar --- */
.right-header-title {
    background-color: #0a1f54; /* สีน้ำเงินเข้มตามรูป */
    color: #fff;
    text-align: center;
    font-size: 13px;
    font-weight: bold;
    padding: 8px;
    border-radius: 4px 4px 0 0;
}

/* --- Footer --- */
.site-footer {
    background-color: #f2be62;
    color: #000;
    text-align: center;
    padding: 15px;
    font-size: 12px;
    margin-top: 20px;
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .wrapper { flex-direction: column; }
    .sidebar-left, .sidebar-right { width: 100%; }
    .lottery-table { font-size: 16px; }
    #resultDB, #resultDNew { font-size: 22px; }
    #resultG1, #resultG1New { font-size: 18px; }
}