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

.top-title-bar {
    background-color: #fff;
    text-align: center;
    padding: 12px 0;
}
.top-title-bar h1 {
    color: #8b0000;
    font-size: 26px;
    font-weight: bold;
}

.main-nav-red {
    background-color: #8b0000;
    color: #fff;
    font-size: 13px;
    text-align: center;
    padding: 8px 0;
}
.main-nav-red a {
    color: #fff;
    text-decoration: none;
    margin: 0 5px;
    font-weight: bold;
}
.main-nav-red a:hover {
    text-decoration: underline;
}

.sub-days-bar {
    background-color: #fff;
    border-bottom: 1px solid #ddd;
    padding: 6px 0;
}
.container-days {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: flex-start;
    gap: 4px;
    padding: 0 10px;
}
.btn-day {
    background-color: #f2f2f2;
    color: #333;
    text-decoration: none;
    font-size: 12px;
    padding: 5px 12px;
    border: 1px solid #ccc;
    border-radius: 3px;
}
.btn-day.active-red {
    background-color: #8b0000;
    color: #fff;
    border-color: #8b0000;
    font-weight: bold;
}

/* --- Layout --- */
.wrapper {
    max-width: 1150px;
    margin: 15px auto;
    display: flex;
    gap: 15px;
    padding: 0 10px;
}

.main-content {
    flex-grow: 1;
    background: #fff;
    padding: 12px;
    border: 1px solid #ddd;
    min-width: 0;
}

.sidebar-right {
    width: 320px;
    flex-shrink: 0;
}


.yellow-header {
    background-color: #fef08a;
    border: 1px solid #fde047;
    color: #000;
    text-align: center;
    font-size: 22px;
    font-weight: bold;
    padding: 10px;
    margin-bottom: 10px;
}

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

#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: 32px;
}
#resultG1, #resultG1New {
    color: #000;
    font-weight: 800;
    font-size: 28px;
}


.ad-banner-box {
    margin: 12px 0;
}
.banner-img {
    width: 100%;
    height: auto;
    display: block;
}

.filter-bar {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.btn-filter {
    background-color: #f2f2f2;
    border: 1px solid #ccc;
    padding: 4px 10px;
    font-size: 13px;
    cursor: pointer;
    border-radius: 2px;
}
.btn-filter.active {
    background-color: #8b0000;
    color: #fff;
    border-color: #8b0000;
    font-weight: bold;
}

.info-links-list {
    list-style: none;
    margin-bottom: 15px;
    font-size: 13px;
}
.info-links-list li {
    margin-bottom: 5px;
}
.info-links-list a {
    color: #8b0000;
    text-decoration: none;
    font-weight: bold;
}

#datePickerNew {
    padding: 8px;
    font-size: 16px;
    border-radius: 4px;
    border: 1px solid rgba(168, 168, 168, 0.4);
    background-color: #f9f9f9;
    color: #333;
    width: 100%;
    margin-bottom: 10px;
}


.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); }
}


.widget-card {
    background: #fff;
    border: 1px solid #ddd;
    margin-bottom: 12px;
    border-radius: 3px;
    overflow: hidden;
}
.widget-card.no-border {
    border: none;
    background: transparent;
}
.widget-header-light {
    background-color: #f0f4f8;
    color: #000;
    font-weight: bold;
    font-size: 13px;
    padding: 6px 10px;
    border-bottom: 1px solid #ddd;
}
.widget-header-red {
    background-color: #8b0000;
    color: #fff;
    font-weight: bold;
    font-size: 13px;
    padding: 6px 10px;
}
.widget-list {
    list-style: none;
    padding: 5px 0;
}
.widget-list li {
    padding: 4px 10px;
    font-size: 12px;
}
.widget-list li a {
    color: #0066cc;
    text-decoration: none;
}
.widget-list li a:hover {
    text-decoration: underline;
}

.custom-container {
    display: flex;
    justify-content: space-between;
    padding: 5px;
    gap: 5px;
}
.custom-table {
    width: 49%;
    border-collapse: collapse;
}
.custom-table th, .custom-table td {
    border: 1px solid #ddd;
    padding: 6px;
    text-align: center;
    background-color: #fff;
    font-size: 12px;
}
.custom-table th {
    background-color: #CB0506;
    color: #fff;
    font-weight: bold;
}
.custom-table td span {
    color: red;
    font-weight: bold;
}


footer {
    background-color: #fff;
    border-top: 1px solid #ddd;
    padding: 15px 0;
    margin-top: 20px;
    text-align: center;
    font-size: 12px;
    color: #666;
}
.footer-apps {
    margin-top: 8px;
}
.app-badge {
    background-color: #333;
    color: #fff;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 11px;
    margin: 0 3px;
}


@media (max-width: 900px) {
    .wrapper { flex-direction: column; }
    .sidebar-right { width: 100%; }
}
@media (max-width: 600px) {
    .lottery-table td { padding: 4px; }
    #resultDB, #resultDNew { font-size: 24px; }
    #resultG1, #resultG1New { font-size: 22px; }
}