/* ============================================
   Xổ Số 360 - Custom Styles
   Pure CSS (No Tailwind)
   ============================================ */

/* ============================================
   VARIABLES
   ============================================ */
:root {
    --color-primary: #dc2626;
    --color-primary-dark: #b91c1c;
    --color-blue: #2563eb;
    --color-purple: #9333ea;
    --color-gray-50: #f9fafb;
    --color-gray-100: #f3f4f6;
    --color-gray-200: #e5e7eb;
    --color-gray-500: #6b7280;
    --color-gray-600: #4b5563;
    --color-gray-700: #13151a;
    --color-gray-900: #111827;
    --border-radius: 8px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* ============================================
   LAYOUT
   ============================================ */
.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 20px;
}

/* Two Column Layout */
.layout-two-cols {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    align-items: start;
}

.main-content {
    min-width: 0;
    /* Prevent overflow */
}

.sidebar {
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

/* ============================================
   PAGE HEADER
   ============================================ */
.page-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: white;
    border-radius: var(--border-radius);
}

.page-header h1 {
    margin: 0 0 10px 0;
    font-size: 28px;
    font-weight: bold;
}

.date-display {
    font-size: 16px;
    margin: 5px 0;
    opacity: 0.9;
}

.live-indicator {
    display: inline-block;
    margin-top: 10px;
    padding: 5px 15px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 14px;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

/* ============================================
   SECTIONS
   ============================================ */
.section-mb,
.section-mn,
.section-mt {
    margin-bottom: 40px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.title-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title {
    font-size: 24px;
    font-weight: bold;
    color: var(--color-gray-900);
    text-transform: uppercase;
    margin: 0;
}

.icon {
    font-size: 24px;
}

.link-stats {
    color: var(--color-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: opacity 0.2s;
}

.link-stats:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* ============================================
   CARDS
   ============================================ */
.card-xoso {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-gray-200);
    overflow: hidden;
}

.card-header-info {
    background: #fef2f2;
    padding: 15px 20px;
    border-bottom: 1px solid #fee2e2;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.draw-code {
    font-weight: bold;
    color: var(--color-primary);
}

.draw-time {
    font-size: 14px;
    color: var(--color-gray-500);
    font-weight: 500;
}

/* ============================================
   TABLES - MIỀN BẮC
   ============================================ */
.table-responsive {
    overflow-x: auto;
}

.table-xoso-mb,
.table-xoso-province {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.table-xoso-mb tbody tr,
.table-xoso-province tbody tr {
    transition: background-color 0.2s;
}

.table-xoso-mb tbody tr:hover,
.table-xoso-province tbody tr:hover {
    background-color: var(--color-gray-50);
}

.prize-row td {
    /* padding: 15px 20px; */
    border-bottom: 1px solid var(--color-gray-200);
}

.prize-label {
    width: 120px;
    font-weight: 600;
    color: var(--color-gray-700);
    background-color: #f9fafb;
    border-right: 1px solid var(--color-gray-200);
    text-align: center;
    vertical-align: middle;
}

.prize-values {
    text-align: center;
    /* padding: 10px; */
}

/* Prize Number Styles */
.special-prize {
    display: inline-block;
    width: 100%;
    height: 40px;
    line-height: 40px;
    font-size: 34px;
    font-weight: bold;
    color: #ed1c25;
    text-align: center;
    transition: background-color 0.2s;
}

.special-prize:hover {
    background-color: #fff4c3;
}

.prize1 {
    display: inline-block;
    width: 100%;
    height: 40px;
    line-height: 40px;
    font-size: 28px;
    font-weight: bold;
    text-align: center;
    transition: background-color 0.2s;
}

.prize1:hover {
    background-color: #fff4c3;
}

.prize2 {
    display: inline-block;
    width: 48%;
    height: 40px;
    line-height: 40px;
    font-size: 28px;
    font-weight: bold;
    text-align: center;
    transition: background-color 0.2s;
}

.prize2:hover {
    background-color: #fff4c3;
}

.prize3 {
    display: inline-block;
    width: 32%;
    height: 40px;
    line-height: 40px;
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    transition: background-color 0.2s;
}

.prize3:hover {
    background-color: #fff4c3;
}

.prize4 {
    display: inline-block;
    width: 24%;
    height: 40px;
    line-height: 40px;
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    transition: background-color 0.2s;
}

.prize4:hover {
    background-color: #fff4c3;
}

.prize5 {
    display: inline-block;
    width: 32%;
    height: 40px;
    line-height: 40px;
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    transition: background-color 0.2s;
}

.prize5:hover {
    background-color: #fff4c3;
}

.prize6 {
    display: inline-block;
    width: 32%;
    height: 40px;
    line-height: 40px;
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    transition: background-color 0.2s;
}

.prize6:hover {
    background-color: #fff4c3;
}

.prize7,
.prize8 {
    display: inline-block;
    width: 24%;
    height: 40px;
    line-height: 40px;
    font-weight: bold;


    text-align: center;
    transition: background-color 0.2s;
}

.table-xoso-mb .prize7,
.table-xoso-mn .prize8 {
    color: #ed1c25;
    font-size: 28px;
}

.table-xoso-mn .prize7 {
    font-size: 24px;
}


.prize7:hover {
    background-color: #fff4c3;
}

/* Legacy styles for compatibility */
.number {
    display: inline-block;
    margin: 0 6px;
    font-size: 20px;
    font-weight: bold;
    color: var(--color-gray-900);
}

.number-db {
    font-size: 36px;
    font-weight: 900;
    color: var(--color-primary);
    letter-spacing: 3px;
}

.prize-row.db .prize-label {
    font-weight: bold;
    color: var(--color-primary);
}

.waiting {
    color: var(--color-gray-500);
    font-style: normal;
}

/* ============================================
   PROVINCE CARDS (MN/MT)
   ============================================ */
.grid-provinces {
    display: grid;
    gap: 20px;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.province-card {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-gray-200);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
}

.province-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.province-header {
    padding: 15px;
    text-align: center;
    border-bottom: 1px solid var(--color-gray-200);
    border-radius: 12px 12px 0 0;
}

.province-header.bg-blue {
    background: #dbeafe;
    border-bottom-color: #bfdbfe;
}

.province-header.bg-purple {
    background: #f3e8ff;
    border-bottom-color: #e9d5ff;
}

.province-name {
    font-size: 18px;
    font-weight: bold;
    margin: 0 0 5px 0;
    color: var(--color-gray-900);
}

.province-code {
    font-size: 12px;
    color: var(--color-gray-600);
    margin: 0;
}

.province-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.prize-special {
    text-align: center;
}

.prize-label-mini {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--color-gray-500);
    font-weight: 600;
    margin-bottom: 5px;
}

.prize-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    padding: 8px 0;
}

.prize-line .label {
    color: var(--color-gray-500);
}

.prize-line .value {
    font-weight: bold;
    color: var(--color-gray-900);
}

.divider {
    border-top: 1px dashed var(--color-gray-200);
    margin: 10px 0;
}

.btn-view-full {
    display: block;
    width: 100%;
    padding: 10px;
    margin-top: auto;
    text-align: center;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    color: var(--color-gray-600);
    background: var(--color-gray-100);
    border: none;
    border-radius: 6px;
    text-decoration: none;
    transition: background-color 0.2s;
}

.btn-view-full:hover {
    background: var(--color-gray-200);
}

/* ============================================
   TABLE FOR MN/MT REGIONS (Multi-column)
   ============================================ */
.table-xoso-region {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.table-xoso-region thead {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
}

.table-xoso-region th {
    padding: 12px 10px;
    text-align: center;
    font-weight: 600;
    color: var(--color-gray-700);
    border: 1px solid var(--color-gray-200);
    font-size: 14px;
}

.table-xoso-region th.prize-col {
    width: 50px;
    background: var(--color-gray-100);
}

.table-xoso-region th.province-col {
    min-width: 120px;
}

.table-xoso-region tbody tr {
    transition: background 0.2s;
}

.table-xoso-region tbody tr:hover {
    background: #fef2f2;
}

.table-xoso-region tbody tr.db {
    background: #fef2f2;
    font-weight: bold;
}

.table-xoso-region td {
    padding: 10px;
    text-align: center;
    border: 1px solid var(--color-gray-200);
    vertical-align: top;
}

.table-xoso-region .prize-label-col {
    font-weight: bold;
    color: var(--color-primary);
    font-size: 16px;
    background: var(--color-gray-50);
}

.table-xoso-region .prize-values-col {
    font-size: 18px;
    color: var(--color-gray-900);
    line-height: 1.6;
}

.table-xoso-region .prize-values-col.special {
    font-size: 18px;
    font-weight: bold;
    color: var(--color-primary);
}

.table-xoso-region .number-line {
    margin: 2px 0;
}

/* ============================================
   LOTO TABLE FOR MULTI-PROVINCE
   ============================================ */
.aside-loto-multi {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-gray-200);
    overflow: hidden;
}

.loto-table-multi {
    width: 100%;
    border-collapse: collapse;
}

.loto-table-multi thead {
    background: var(--color-gray-50);
}

.loto-table-multi th {
    padding: 12px 10px;
    text-align: center;
    font-weight: 600;
    color: var(--color-gray-600);
    font-size: 13px;
    border: 1px solid var(--color-gray-200);
}

.loto-table-multi tbody tr:nth-child(even) {
    background: #fafbfc;
}

.loto-table-multi tbody tr:hover {
    background: var(--color-gray-50);
}

.loto-table-multi td {
    padding: 10px;
    border: 1px solid var(--color-gray-100);
    text-align: center;
}

.loto-table-multi .loto-label {
    font-weight: bold;
    color: var(--color-primary);
    font-size: 16px;
    background: var(--color-gray-50);
}

.loto-table-multi .loto-numbers {
    font-size: 18px;
    color: var(--color-gray-900);
}

.loto-table-multi .loto-num {
    display: inline-block;
    padding: 2px 4px;
    margin: 1px;
    font-weight: 500;
}

/* ============================================
   LOTO STATISTICS WIDGET
   ============================================ */
.loto-stats-widget {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-gray-200);
    padding: 20px;
    margin-bottom: 20px;
}

.widget-title {
    font-size: 18px;
    font-weight: bold;
    color: var(--color-gray-900);
    margin: 0 0 15px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.table-wrapper {
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid var(--color-gray-100);
    margin-bottom: 15px;
}

.table-loto {
    width: 100%;
    font-size: 14px;
    border-collapse: collapse;
}

.table-loto thead {
    background: var(--color-gray-50);
}

.table-loto th {
    padding: 10px 15px;
    text-align: left;
    font-weight: 600;
    color: var(--color-gray-600);
}

.table-loto th.text-right {
    text-align: right;
}

.table-loto tbody tr {
    transition: background-color 0.2s;
}

.table-loto tbody tr:hover {
    background: var(--color-gray-50);
}

.table-loto td {
    padding: 10px 15px;
    border-bottom: 1px solid var(--color-gray-100);
}

.head-number {
    font-weight: bold;
    color: var(--color-primary);
    text-align: center;
    width: 60px;
}

.loto-numbers {
    text-align: right;
    font-size: 13px;
}

.no-data {
    color: var(--color-gray-500);
    font-style: italic;
}

.btn-view-stats {
    display: block;
    width: 100%;
    padding: 12px;
    margin-top: 15px;
    text-align: center;
    font-weight: bold;
    color: var(--color-primary);
    background: #fef2f2;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    transition: background-color 0.2s;
}

.btn-view-stats:hover {
    background: #fee2e2;
}

.divider-section {
    height: 1px;
    background: var(--color-gray-200);
    margin: 20px 0;
}

/* ============================================
   LOTO SECTION FOR REGIONS (MN/MT)
   ============================================ */
.loto-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid var(--color-gray-200);
}

.aside-loto {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-gray-200);
    overflow: hidden;
}

.loto-header {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    padding: 15px 20px;
    border-bottom: 2px solid var(--color-gray-200);
}

.loto-title {
    margin: 0 0 5px 0;
    font-size: 18px;
    font-weight: bold;
    color: var(--color-gray-900);
}

.loto-subtitle {
    margin: 0;
    font-size: 13px;
    color: var(--color-gray-600);
}

.loto-table-wrapper {
    overflow-x: auto;
}

.loto-table {
    width: 100%;
    border-collapse: collapse;
}

.loto-table thead {
    background: var(--color-gray-50);
}

.loto-table th {
    padding: 12px 15px;
    text-align: center;
    font-weight: 600;
    color: var(--color-gray-600);
    font-size: 14px;
    border-bottom: 2px solid var(--color-gray-200);
}

.loto-table tbody tr:nth-child(even) {
    background: #fafbfc;
}

.loto-table tbody tr:hover {
    background: var(--color-gray-50);
}

.loto-table td {
    padding: 10px 15px;
    border-bottom: 1px solid var(--color-gray-100);
}

.loto-label {
    text-align: center;
    font-weight: bold;
    color: var(--color-primary);
    font-size: 16px;
    width: 50px;
}

.loto-numbers {
    text-align: left;
    font-size: 18px;
    color: var(--color-gray-900);
}

.loto-num {
    display: inline-block;
    padding: 2px 6px;
    background: #fef2f2;
    border-radius: 4px;
    margin: 2px;
    font-weight: 500;
}

.loto-empty {
    color: var(--color-gray-500);
    font-style: italic;
}

/* ============================================
   LOTO GRID (All Numbers Display)
   ============================================ */
.loto-grid-wrapper {
    background: white;
    margin-bottom: 20px;
}

.table-loto-grid {
    border-collapse: collapse;
    color: #000000;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    background: #FFFFFF;
    border-right: 1px solid #cccccc;
    border-top: 1px solid #dedede;
    width: 100%;
    margin: 0;
}

.table-loto-grid caption {
    border-left: 1px solid #cccccc;
    color: #FFFFFF;
    vertical-align: middle;
    background-color: #6F7677;
    font-weight: bold;
    font-size: 15px;
    padding: 10px 6px;
    white-space: nowrap;
    text-align: center;
    position: relative;
    z-index: 9;
}

.table-loto-grid tbody tr:hover {
    background: #ffffcf;
}

.table-loto-grid tr td {
    border-left: 1px solid #cccccc;
    border-bottom: 1px solid #cccccc;
    color: #000000;
    padding: 12px 15px;
    text-align: center;
    vertical-align: middle;
    background: white;
}

.table-loto-grid tr td.results {
    padding: 15px;
}

.quantity-of-number {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-around;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.quantity-of-number .number {
    display: inline-block;
    padding: 0;
    font-size: 18px;
    font-weight: 600;
    background: transparent;
    border: none;
    color: #000;
    text-align: center;
    min-width: 30px;
    line-height: 1.4;
}

.quantity-of-number .number:hover {
    color: var(--color-primary);
}

.quantity-of-number .number.special-prize {
    color: #ed1c25;
    font-weight: 700;
}

/* Legacy grid styles for compatibility */
.loto-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 8px;
}

.loto-grid-item {
    padding: 12px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    background: white;
    border: 2px solid var(--color-gray-200);
    border-radius: 6px;
    color: var(--color-gray-900);
    transition: all 0.2s;
}

.loto-grid-item:hover {
    background: #fef2f2;
    border-color: var(--color-primary);
    transform: translateY(-2px);
}

/* ============================================
   FREQUENCY & LÔ GAN
   ============================================ */
.frequency-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.frequency-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    background: var(--color-gray-50);
    border-radius: 6px;
    border: 1px solid var(--color-gray-200);
}

.frequency-item .number {
    font-size: 20px;
    font-weight: bold;
    color: var(--color-primary);
}

.frequency-item .count {
    font-size: 12px;
    color: var(--color-gray-600);
    margin-top: 5px;
}

.logan-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 15px;
}

.logan-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: var(--color-gray-50);
    border-radius: 6px;
    border: 1px solid var(--color-gray-200);
}

.logan-item .number {
    font-size: 18px;
    font-weight: bold;
    color: var(--color-primary);
}

.logan-item .days {
    font-size: 13px;
    color: var(--color-gray-600);
}

/* ============================================
   EMPTY STATES
   ============================================ */
.no-results {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-gray-200);
}

.no-results p {
    font-size: 18px;
    color: var(--color-gray-600);
    margin: 10px 0;
}

.no-results .sub-text {
    font-size: 14px;
    color: var(--color-gray-500);
}

.no-data-message {
    text-align: center;
    padding: 20px;
    color: var(--color-gray-500);
}

/* ============================================
   NAVIGATION
   ============================================ */
.navigation-links {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.btn-nav {
    padding: 10px 20px;
    background: white;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-nav:hover {
    background: var(--color-primary);
    color: white;
}

/* ============================================
   SIDEBAR WIDGETS
   ============================================ */
.sidebar-widget {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-gray-200);
    padding: 20px;
    margin-bottom: 20px;
}

.sidebar-widget .widget-title {
    font-size: 16px;
    font-weight: bold;
    color: var(--color-gray-900);
    margin: 0 0 15px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--color-gray-200);
}

/* ============================================
   CALENDAR WIDGET
   ============================================ */
.calendar-container {
    margin-top: 15px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px;
    background: var(--color-gray-50);
    border-radius: 6px;
}

.calendar-selectors {
    display: flex;
    gap: 8px;
    align-items: center;
    width: 100%;
}

.calendar-select {
    padding: 6px 10px;
    border: 1px solid var(--color-gray-300);
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s;
}

.calendar-select:hover {
    border-color: var(--color-primary);
}

.calendar-select:focus {
    outline: none;
    border-color: var(--color-primary);
}

.month-select {
    flex: 0 0 60px;
}

.year-select {
    flex: 0 0 80px;
}

.btn-today {
    flex: 1;
    padding: 6px 12px;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-today:hover {
    background: var(--color-primary-dark);
}

.calendar-current {
    font-weight: bold;
    color: var(--color-primary);
    font-size: 15px;
}

.calendar-nav {
    font-size: 13px;
    color: var(--color-primary);
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background 0.2s;
}

.calendar-nav:hover {
    background: var(--color-gray-200);
}

.calendar-nav.disabled {
    color: var(--color-gray-500);
    cursor: not-allowed;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.calendar-day-name {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-gray-600);
    padding: 8px 0;
    background: #f9fafb;
    border-right: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}

.calendar-day-name:nth-child(7) {
    border-right: none;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--color-gray-900);
    text-decoration: none;
    border-right: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    background: white;
}

.calendar-day:nth-child(7n) {
    border-right: none;
}

.calendar-day:hover {
    background: #f3f4f6;
}

.calendar-day.empty {
    cursor: default;
    background: #fafafa;
}

.calendar-day.today {
    background: #fef3c7;
    color: #92400e;
    font-weight: bold;
    position: relative;
}

.calendar-day.selected {
    background: var(--color-primary);
    color: white;
    font-weight: bold;
}

.calendar-day.future {
    color: #d1d5db;
    cursor: not-allowed;
    background: #fafafa;
}

.calendar-day.future:hover {
    background: #fafafa;
}

/* Quick Links */
.quick-links {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--color-gray-200);
}

.quick-links h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-gray-600);
    margin: 0 0 10px 0;
    text-transform: uppercase;
}

.quick-link {
    display: block;
    padding: 8px 12px;
    margin-bottom: 5px;
    background: var(--color-gray-50);
    border-radius: 6px;
    color: var(--color-gray-900);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}

.quick-link:hover {
    background: var(--color-primary);
    color: white;
}

/* ============================================
   REGIONS WIDGET
   ============================================ */
.region-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.region-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: var(--color-gray-50);
    border-radius: 8px;
    text-decoration: none;
    color: var(--color-gray-900);
    transition: all 0.2s;
    border: 2px solid transparent;
}

.region-link:hover {
    border-color: var(--color-primary);
    background: #fef2f2;
}

.region-link.mb:hover {
    border-color: var(--color-primary);
}

.region-link.mn:hover {
    border-color: var(--color-blue);
}

.region-link.mt:hover {
    border-color: var(--color-purple);
}

.region-icon {
    font-size: 20px;
}

.region-name {
    font-weight: 600;
}

/* ============================================
   LIVE RESULTS WIDGET
   ============================================ */
.live-results-widget {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-gray-200);
    overflow: hidden;
    margin-bottom: 20px;
}

.live-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
}

.live-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.live-dot {
    width: 10px;
    height: 10px;
    background: #fff;
    border-radius: 50%;
    opacity: 0.6;
}

.live-dot.active {
    animation: pulse-dot 1.5s ease-in-out infinite;
}

@keyframes pulse-dot {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.4;
        transform: scale(1.2);
    }
}

.live-text {
    font-size: 14px;
    font-weight: 600;
}

.live-time {
    font-size: 18px;
    font-weight: 700;
    /* font-family: 'Courier New', monospace; */
}

.live-tabs {
    display: none;
    /* Hide tabs, auto-select by time */
    background: var(--color-gray-100);
    border-bottom: 2px solid var(--color-gray-200);
}

.live-tabs.show-tabs {
    display: flex;
    /* Show tabs if needed */
}

.live-results-widget.hide {
    display: none;
}

.live-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 10px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-gray-600);
}

.live-tab:hover {
    background: var(--color-gray-50);
    color: var(--color-gray-900);
}

.live-tab.active {
    background: white;
    border-bottom-color: var(--color-primary);
    color: var(--color-primary);
    font-weight: 600;
}

.tab-icon {
    font-size: 16px;
}

.tab-name {
    font-size: 13px;
}

.live-content {
    min-height: 400px;
    position: relative;
}

.live-region {
    display: none;
    padding: 20px;
    animation: fadeIn 0.3s ease-in-out;
}

.live-region.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.live-province {
    margin-bottom: 20px;
    text-align: center;
}

.province-title {
    font-size: 18px;
    font-weight: bold;
    color: var(--color-gray-900);
    margin: 0 0 10px 0;
}

.live-schedule {
    font-size: 14px;
    color: var(--color-gray-600);
    margin: 0;
    font-weight: 500;
}

.draw-date {
    font-size: 14px;
    color: var(--color-gray-600);
    margin: 0;
}

/* Multi-Province Table for MN/MT */
.live-table-wrapper {
    overflow-x: auto;
    margin-top: 20px;
}

.live-multi-province-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-size: 18px;
}

.live-multi-province-table thead {
    background: #6F7677;
    color: white;
}

.live-multi-province-table th {
    padding: 10px 8px;
    text-align: center;
    font-weight: 600;
    border: 1px solid #cccccc;
    white-space: nowrap;
}

.live-multi-province-table th.prize-col {
    width: 40px;
    background: #6F7677;
}

.live-multi-province-table tbody tr {
    transition: background 0.2s;
}

.live-multi-province-table tbody tr:hover {
    background: #ffffcf;
}

.live-multi-province-table tbody tr.prize-special {
    background: #fef9c3;
}

.live-multi-province-table tbody tr.prize-special:hover {
    background: #fef08a;
}

.live-multi-province-table tbody tr.prize-special td.prize-label {
    background: #fef9c3;
    color: #dc2626;
    font-weight: 700;
}

.live-multi-province-table tbody tr.prize-special td.province-col {
    color: #dc2626;
    font-weight: 700;
    font-size: 24px;
}

.live-multi-province-table td {
    padding: 8px;
    text-align: center;
    border: 1px solid #cccccc;
    vertical-align: middle;
}

.live-multi-province-table td.prize-label {
    font-weight: 600;
    background: #f5f5f5;
    color: #000000;
    font-size: 22px;
}

.live-multi-province-table td.province-col {
    font-weight: 500;
    min-width: 80px;
    height: 40px;
    border: 1px solid #cccccc;
    padding: 8px;
    text-align: center;
    vertical-align: middle;
    transition: background-color 0.3s ease;
    font-size: 22px;
    color: #000;
}

.live-multi-province-table td.province-col:hover {
    background-color: #ffffcf;
}

.live-multi-province-table td.waiting {
    color: transparent;
    background: url('/images/dice-rolling.gif') center/20px no-repeat;
    height: 40px;
}

/* Remove GIF when rolling or has value */
.live-multi-province-table td.rolling,
.live-multi-province-table td.has-value {
    background: none;
    color: #000000;
}

.live-multi-province-table .loading-icon {
    display: inline-block;
    font-size: 18px;
    color: #999999;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.live-multi-province-table .digit {
    font-size: 18px;
    font-weight: 700;
    display: inline-block;
}

.live-multi-province-table .digit-red {
    color: #dc2626;
}

.live-multi-province-table .digit-black {
    color: #000000;
}

.live-multi-province-table tr.prize-header-row {
    background-color: #fef9c3;
    font-weight: 700;
    font-size: 16px;
}

.live-multi-province-table tr.prize-header-row td {
    padding: 10px 8px;
    border-top: 2px solid #eab308;
    border-bottom: 2px solid #eab308;
}

.live-multi-province-table td.new-value {
    animation: highlightCell 1s ease-out;
}

@keyframes highlightCell {
    0% {
        background: #fef08a;
    }

    100% {
        background: transparent;
    }
}

.live-multi-province-table .prize-special td {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-primary);
}

/* Live Loto Section */
.live-loto-section {
    margin-top: 30px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.live-loto-section .loto-title {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 15px 0;
    text-align: center;
}

/* Default grid layout (for MB - combined) */
.live-loto-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

/* Province-based layout (for MN/MT) */
.live-loto-grid.loto-by-province {
    display: flex;
    gap: 20px;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.loto-province-column {
    flex: 1;
    min-width: 200px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 10px;
}

.loto-province-header {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    text-align: center;
    padding: 8px;
    background: #3b82f6;
    color: white;
    border-radius: 4px;
    margin-bottom: 10px;
}

.loto-province-grid {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.loto-row {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 4px 0;
    border-bottom: 1px solid #e5e7eb;
}

.loto-row:last-child {
    border-bottom: none;
}

.loto-head {
    font-size: 16px;
    font-weight: 700;
    color: #dc2626;
    min-width: 30px;
    text-align: center;
    background: #fee2e2;
    padding: 4px 8px;
    border-radius: 4px;
}

/* .loto-numbers {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1;
} */

.loto-numbers .loto-num {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    padding: 2px 8px;
    min-width: 24px;
    text-align: center;
}

.loto-numbers .loto-num.multiple {
    background: #fef3c7;
    border-color: #f59e0b;
    color: #92400e;
    font-weight: 700;
}

.live-loto-number {
    background: #dbeafe;
    border: 2px solid #3b82f6;
    border-radius: 8px;
    padding: 10px 14px;
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    color: #1e40af;
    transition: all 0.3s ease;
    min-width: 50px;
}

.live-loto-number.multiple {
    background: #fef3c7;
    border-color: #f59e0b;
    color: #92400e;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.live-loto-number .loto-num {
    font-size: 18px;
    font-weight: 700;
}

.live-loto-number .loto-count {
    font-size: 11px;
    font-weight: 600;
    color: #b45309;
}

@keyframes lotoAppear {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.loto-loading {
    text-align: center;
    padding: 40px 20px;
    color: #9ca3af;
    font-style: italic;
}

/* Table-based Loto Layout (for MN/MT) */
.loto-table-container {
    overflow-x: auto;
    margin-top: 10px;
}

.loto-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-size: 16px;
}

.loto-table thead {
    background: #3b82f6;
    color: white;
}

.loto-table th {
    padding: 10px 12px;
    text-align: center;
    font-weight: 600;
    border: 1px solid #d1d5db;
    white-space: nowrap;
}

.loto-table th.loto-head-col {
    width: 50px;
    background: #dc2626;
    color: white;
    font-weight: 700;
}

.loto-table th.loto-province-col {
    min-width: 120px;
    background: #3b82f6;
}

.loto-table tbody tr {
    transition: background 0.2s;
}

.loto-table tbody tr:hover {
    background: #f3f4f6;
}

.loto-table td {
    padding: 8px 12px;
    text-align: center;
    border: 1px solid #d1d5db;
    vertical-align: middle;
}

.loto-table td.loto-head-cell {
    font-weight: 700;
    background: #fee2e2;
    color: #dc2626;
    font-size: 18px;
    /* width: 50px; */
}

.loto-table td.loto-province-cell {
    font-weight: 500;
    min-width: 120px;
    color: #1f2937;
    font-size: 16px;
}

.loto-table td.loto-province-cell .loto-num {
    display: inline-block;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    background: #dbeafe;
    border: 1px solid #93c5fd;
    border-radius: 4px;
    padding: 2px 8px;
    margin: 2px;
    min-width: 24px;
    text-align: center;
}

.loto-table td.loto-province-cell .loto-num.multiple {
    background: #fef3c7;
    border-color: #f59e0b;
    color: #92400e;
    font-weight: 700;
}

@media (max-width: 768px) {
    .loto-table {
        font-size: 14px;
    }

    .loto-table th,
    .loto-table td {
        padding: 6px 8px;
    }

    .loto-table th.loto-province-col,
    .loto-table td.loto-province-cell {
        min-width: 100px;
    }

    .loto-table td.loto-province-cell .loto-num {
        font-size: 14px;
        padding: 2px 6px;
    }
}

@media (max-width: 768px) {
    .live-loto-number {
        font-size: 16px;
        padding: 8px 12px;
        min-width: 45px;
    }

    .live-loto-number .loto-num {
        font-size: 16px;
    }
}

/* Live Prize Animations */
.prize-value.waiting,
.prize-value-multi span.waiting {
    position: relative;
    overflow: hidden;
    min-height: 24px;
}

.prize-rolling {
    /* animation: numberRoll 0.1s infinite; */
    color: #059669 !important;
    font-weight: 600;
    background: transparent !important;
}

/* Rolling number digits with alternating colors */
.rolling .digit,
.prize-value.rolling .digit,
.prize-value-multi span.rolling .digit {
    display: inline-block;
    font-weight: 700;
    /* font-family: 'Courier New', monospace; */
    font-size: 1em;
}

.rolling .digit-red {
    color: #dc2626;
}

.rolling .digit-black {
    color: #000000;
}

@keyframes numberRoll {

    0%,
    100% {
        transform: translateY(0);
        opacity: 0.6;
    }

    50% {
        transform: translateY(-2px);
        opacity: 1;
    }
}

.loading-dots {
    display: inline-block;
    font-size: 20px;
    color: #9ca3af;
}

.loading-dots::after {
    content: '...';
    animation: dots 1.5s infinite;
}

@keyframes dots {

    0%,
    20% {
        content: '.';
    }

    40% {
        content: '..';
    }

    60%,
    100% {
        content: '...';
    }
}

.mn-provinces,
.mt-provinces {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 10px;
}

.province-tag {
    display: inline-block;
    padding: 5px 12px;
    background: #dbeafe;
    color: #1e40af;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.live-prizes {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.live-prize-row {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    background: var(--color-gray-50);
    border-radius: 8px;
    border: 1px solid var(--color-gray-200);
    transition: all 0.2s;
}

.live-prize-row:hover {
    background: #fef2f2;
    border-color: var(--color-primary);
}

.live-prize-row[data-prize="db"] {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
}

.prize-name {
    font-weight: bold;
    color: var(--color-gray-700);
    font-size: 14px;
    min-width: 30px;
    text-align: center;
}

.live-prize-row[data-prize="db"] .prize-name {
    color: var(--color-primary);
}

.prize-value {
    flex: 1;
    font-size: 24px;
    font-weight: 700;

    color: var(--color-gray-900);
    text-align: center;
}

.live-prize-row[data-prize="db"] .prize-value {
    font-size: 32px;
    color: var(--color-primary);
}

.prize-value.waiting {
    color: transparent;
    font-weight: 500;
    background: url('/images/dice-rolling.gif') center/30px no-repeat;
    /* min-width: 90px;
    min-height: 40px; */
    display: inline-block;
}

/* Remove GIF when rolling or has value */
.prize-value.rolling,
.prize-value.has-value {
    background: none;
    color: #000;
}

.prize-value-multi {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.prize-value-multi span {
    font-size: 22px;
    font-weight: 600;
    /* font-family: 'Courier New', monospace; */
    color: var(--color-gray-900);
    /* padding: 4px 8px; */
    background: white;
    border-radius: 4px;
}

.prize-value-multi span.waiting,
.prize-value-multi.waiting span {
    color: transparent;
    font-weight: 500;
    background: url('/images/dice-rolling.gif') center/24px no-repeat;
    min-width: 60px;
    min-height: 30px;
    display: inline-block;
}

/* Remove GIF when rolling or has value */
.prize-value-multi span.rolling,
.prize-value-multi span.has-value {
    background: none;
    color: #000000;
}

.new-value {
    animation: popIn 0.5s ease-out;
}

@keyframes popIn {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.live-footer {
    padding: 12px 20px;
    background: var(--color-gray-50);
    border-top: 1px solid var(--color-gray-200);
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--color-gray-600);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-gray-400);
}

.status-dot.connecting {
    background: #fbbf24;
    animation: pulse 2s ease-in-out infinite;
}

.status-dot.connected {
    background: #10b981;
}

.status-dot.disconnected {
    background: #6b7280;
}

.status-dot.error {
    background: #ef4444;
}

.status-text {
    font-weight: 500;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {

    /* Base Layout */
    * {
        box-sizing: border-box;
    }

    body {
        overflow-x: hidden;
    }

    .container {
        padding: 0 10px;
        max-width: 100%;
        overflow-x: hidden;
    }

    /* Layout */
    .layout-two-cols {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .sidebar {
        position: static;
        max-height: none;
        order: 2;
    }

    .main-content {
        order: 1;
        max-width: 100%;
        overflow-x: hidden;
    }

    /* Header & Sections */
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .page-header h1 {
        font-size: 18px;
        line-height: 1.3;
    }

    .section-title {
        font-size: 16px;
    }

    /* Grid Layouts */
    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    /* Calendar */
    .calendar-selectors {
        display: grid;
        grid-template-columns: 1fr 1fr 100px;
        gap: 8px;
        width: 100%;
    }

    .calendar-selectors select {
        font-size: 14px;
        padding: 8px;
    }

    .btn-today {
        font-size: 13px;
        padding: 8px 10px;
        white-space: nowrap;
    }

    .calendar-grid {
        gap: 4px;
    }

    .calendar-day,
    .calendar-day-name {
        font-size: 12px;
        min-height: 32px;
    }

    /* Tables - Make compact without horizontal scroll */
    .table-xoso-region {
        width: 100%;
        overflow: visible;
    }

    .table-xoso-region table {
        width: 100%;
        font-size: 11px;
        table-layout: fixed;
    }

    .table-xoso-region th,
    .table-xoso-region td {
        padding: 6px 2px;
        font-size: 11px;
    }

    .table-xoso-region .prize-label {
        width: 50px;
        font-size: 10px;
    }

    .table-xoso-region .province-name {
        font-size: 10px;
    }

    /* Prize Numbers - More compact */
    .special-prize {
        font-size: 22px;
        height: 35px;
        line-height: 35px;
        width: 100%;
    }

    .prize1 {
        font-size: 20px;
        height: 35px;
        line-height: 35px;
        width: 100%;
    }

    .prize2 {
        font-size: 18px;
        height: 35px;
        line-height: 35px;
        width: 48%;
    }

    .prize3 {
        font-size: 16px;
        height: 32px;
        line-height: 32px;
        width: 32%;
    }

    .prize4 {
        font-size: 16px;
        height: 32px;
        line-height: 32px;
        width: 24%;
    }

    .prize5 {
        font-size: 16px;
        height: 32px;
        line-height: 32px;
        width: 32%;
    }

    .prize6 {
        font-size: 16px;
        height: 32px;
        line-height: 32px;
        width: 32%;
    }

    .prize7 {
        font-size: 18px;
        height: 35px;
        line-height: 35px;
        width: 24%;
    }

    .prize-label {
        width: 50px;
        font-size: 13px;
        padding: 8px 4px;
    }

    .prize-values {
        /* padding: 8px 4px; */
    }

    /* Legacy styles */
    .number-db {
        font-size: 20px;
        padding: 6px 10px;
        letter-spacing: 1px;
    }

    .number-item {
        font-size: 13px;
        padding: 5px 8px;
    }

    .numbers-grid {
        gap: 6px;
    }

    /* Loto Grid Table - Responsive */
    .table-loto-grid {
        font-size: 11px;
    }

    .table-loto-grid caption {
        font-size: 13px;
        padding: 8px 4px;
    }

    .table-loto-grid tr td.results {
        padding: 10px 8px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .quantity-of-number {
        gap: 8px;
        flex-wrap: nowrap;
        justify-content: flex-start;
        min-width: min-content;
    }

    .quantity-of-number .number {
        font-size: 15px;
        min-width: 30px;
        flex-shrink: 0;
    }

    /* Loto Grid - Fit perfectly on screen */
    .loto-grid {
        grid-template-columns: repeat(10, 1fr);
        gap: 3px;
        padding: 8px;
    }

    .loto-number {
        font-size: 11px;
        padding: 6px 2px;
        min-width: 0;
    }

    /* Loto Table - Compact */
    .loto-table {
        font-size: 12px;
        width: 100%;
        table-layout: fixed;
    }

    .loto-table th,
    .loto-table td {
        padding: 6px 4px;
        font-size: 11px;
    }

    .loto-number-list {
        gap: 4px;
        flex-wrap: wrap;
    }

    .loto-number-item {
        font-size: 11px;
        min-width: 28px;
        padding: 4px 2px;
    }

    /* Widgets */
    .widget {
        padding: 12px;
    }

    .widget-title {
        font-size: 15px;
        margin-bottom: 10px;
    }

    /* Region Links */
    .region-link {
        padding: 10px;
        gap: 8px;
    }

    .region-icon {
        font-size: 16px;
    }

    .region-name {
        font-size: 14px;
    }

    /* Quick Links */
    .quick-links {
        padding: 10px;
    }

    .quick-link {
        padding: 8px 10px;
        font-size: 13px;
    }

    /* Frequency Grid */
    .frequency-grid {
        grid-template-columns: repeat(auto-fill, minmax(45px, 1fr));
        gap: 4px;
    }

    /* Province Grid */
    .province-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
}

@media (max-width: 480px) {

    /* Extra small screens - super compact */
    .container {
        padding: 0 8px;
    }

    .page-header h1 {
        font-size: 16px;
    }

    .section-title {
        font-size: 14px;
    }

    .table-xoso-mb,
    .table-xoso-province {
        min-width: 400px;
    }

    /* Tables - Ultra compact */
    .table-xoso-region table {
        font-size: 10px;
    }

    .table-xoso-region th,
    .table-xoso-region td {
        padding: 4px 1px;
    }

    .table-xoso-region .prize-label {
        width: 40px;
        font-size: 9px;
    }

    /* Prize Numbers */
    .special-prize {
        font-size: 18px;
        height: 30px;
        line-height: 30px;
    }

    .prize1 {
        font-size: 16px;
        height: 30px;
        line-height: 30px;
    }

    .prize2 {
        font-size: 15px;
        height: 30px;
        line-height: 30px;
        width: 48%;
    }

    .prize3 {
        font-size: 14px;
        height: 28px;
        line-height: 28px;
        width: 32%;
    }

    .prize4 {
        font-size: 14px;
        height: 28px;
        line-height: 28px;
        width: 24%;
    }

    .prize5 {
        font-size: 14px;
        height: 28px;
        line-height: 28px;
        width: 32%;
    }

    .prize6 {
        font-size: 14px;
        height: 28px;
        line-height: 28px;
        width: 32%;
    }

    .prize7 {
        font-size: 15px;
        height: 30px;
        line-height: 30px;
        width: 24%;
    }

    .prize-label {
        width: 40px;
        font-size: 12px;
        padding: 6px 2px;
    }

    .prize-values {
        /* padding: 6px 2px; */
    }

    /* Legacy */
    .number-db {
        font-size: 18px;
        padding: 5px 8px;
    }

    .number-item {
        font-size: 12px;
        padding: 4px 6px;
    }

    /* Loto Grid Table - Extra Small */
    .table-loto-grid {
        font-size: 10px;
    }

    .table-loto-grid caption {
        font-size: 11px;
        padding: 6px 4px;
    }

    .table-loto-grid tr td.results {
        padding: 8px 4px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .quantity-of-number {
        gap: 6px;
        flex-wrap: nowrap;
        justify-content: flex-start;
        min-width: min-content;
    }

    .quantity-of-number .number {
        font-size: 18px;
        min-width: 28px;
        flex-shrink: 0;
    }

    /* Loto Grid - 10 columns still fit */
    .loto-grid {
        grid-template-columns: repeat(10, 1fr);
        gap: 2px;
        padding: 6px;
    }

    .loto-number {
        font-size: 10px;
        padding: 5px 1px;
    }

    /* Loto Table */
    .loto-table {
        font-size: 10px;
    }

    .loto-table th,
    .loto-table td {
        padding: 5px 2px;
    }

    .loto-number-item {
        font-size: 10px;
        min-width: 24px;
        padding: 3px 1px;
    }

    /* Widgets */
    .widget {
        padding: 10px;
    }

    .widget-title {
        font-size: 14px;
    }

    /* Calendar */
    .calendar-selectors {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }

    .btn-today {
        grid-column: 1 / -1;
        width: 100%;
    }

    .calendar-day,
    .calendar-day-name {
        font-size: 11px;
        min-height: 28px;
    }

    /* Province Grid */
    .province-grid {
        grid-template-columns: 1fr;
    }

    /* Region Links */
    .region-link {
        padding: 8px;
    }

    .quick-link {
        padding: 6px 8px;
        font-size: 12px;
    }
}

/* Calendar Sunday styling */
.calendar-day-name.sunday {
    color: #dc2626;
    font-weight: 700;
}

.calendar-day.sunday,
.calendar-day.sunday a {
    color: #dc2626;
}

.calendar-day.sunday.today {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-color: #dc2626;
}

.calendar-day.selected.sunday {
    color: #fff;
}

/* Calendar Navigation Buttons */
.btn-nav-month {
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    color: #6b7280;
    transition: all 0.2s;
}

.btn-nav-month:hover:not(:disabled) {
    background: #f3f4f6;
    border-color: #9ca3af;
    color: #374151;
}

.btn-nav-month:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.calendar-selectors {
    display: flex;
    align-items: center;
    gap: 8px;
}

.previous-days-section {
    margin-top: 40px;
}

.previous-days-section .section-title {
    font-size: 1.3em;
    font-weight: 700;
    margin-bottom: 20px;
    color: #000;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 3px solid #dc3545;
    padding-bottom: 12px;
}

.previous-day-table-wrapper {
    margin-bottom: 30px;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.previous-day-header-yellow {
    background: linear-gradient(135deg, #f9e79f 0%, #f7dc6f 100%);
    padding: 15px 20px;
    text-align: center;
}

.previous-day-header-yellow h3 {
    margin: 0 0 8px 0;
    font-size: 1.1em;
    font-weight: 700;
    color: #000;
}

.header-links {
    font-size: 0.9em;
}

.header-links a {
    color: #0066cc;
    text-decoration: none;
    margin: 0 5px;
}

.header-links a:hover {
    text-decoration: underline;
}

.prize-name {
    font-weight: 700;
    background: #f8f9fa !important;
    color: #333;
}

.prize-db {
    font-size: 1.8em;
    font-weight: 700;
    color: #dc3545;
    letter-spacing: 2px;
}

.prize-g1 {
    font-size: 1.3em;
    font-weight: 600;
    color: #333;
}

.prize-g7 {
    color: #dc3545;
    font-weight: 600;
}

@media (max-width: 768px) {

    .prize-db {
        font-size: 1.4em;
    }

    .prize-g1 {
        font-size: 1.1em;
    }
}

/* Loto Table */
.loto-table-wrapper {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
}

.loto-title {
    font-size: 1.1em;
    font-weight: 700;
    margin-bottom: 15px;
    color: #333;
    text-align: center;
}

.loto-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.loto-table td {
    width: 9%;
    padding: 8px 4px;
    text-align: center;
    border: 1px solid #e0e0e0;
    font-size: 0.9em;
}

.loto-head {
    background: #dc3545;
    color: white;
    font-weight: 700;
    font-size: 1em;
}

.loto-cell {
    height: 40px;
    vertical-align: middle;
    position: relative;
}

.loto-cell.has-number {
    background: #fff3cd;
    font-weight: 600;
}

.loto-number {
    display: block;
    color: #000;
    font-size: 1.1em;
}

.loto-count {
    display: block;
    font-size: 0.75em;
    color: #dc3545;
    margin-top: 2px;
}

@media (max-width: 768px) {
    .loto-table td {
        padding: 6px 2px;
        font-size: 0.8em;
    }

    .loto-cell {
        height: 35px;
    }

    .loto-number {
        font-size: 0.95em;
    }
}


/* Loto Head-Tail Table */
.loto-head-tail-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.loto-head-tail-table thead th {
    background: #f8f9fa;
    color: #333;
    font-weight: 700;
    padding: 10px;
    text-align: center;
    border: 1px solid #dee2e6;
}

.loto-head-tail-table tbody tr {
    border-bottom: 1px solid #dee2e6;
}

.loto-head-tail-table tbody tr:nth-child(even) {
    background: #f8f9fa;
}

.loto-head-tail-table .head-number {
    width: 60px;
    text-align: center;
    font-weight: 700;
    color: #dc3545;
    border: 1px solid #dee2e6;
    padding: 10px;
}

.loto-head-tail-table .tail-numbers {
    padding: 10px 15px;
    border: 1px solid #dee2e6;
    text-align: left;
}

.loto-head-tail-table .loto-num {
    display: inline-block;
    margin-right: 8px;
    font-weight: 600;
    color: #000;
}

.loto-head-tail-table .empty {
    color: #999;
}

@media (max-width: 768px) {
    .loto-head-tail-table {
        font-size: 0.9em;
    }

    .loto-head-tail-table thead th,
    .loto-head-tail-table .head-number,
    .loto-head-tail-table .tail-numbers {
        padding: 8px;
    }

    .loto-head-tail-table .loto-num {
        margin-right: 6px;
    }
}

.load-more-section {
    text-align: center;
    margin: 30px 0;
}

.btn-load-more {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 1em;
    font-weight: 600;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-load-more:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.btn-load-more:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Navigation Dropdown */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

.nav-dropdown .nav-link {
    cursor: pointer;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: white;
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    border-radius: 4px;
    top: 100%;
    left: 0;
    margin-top: 0;
    padding-top: 5px;
}

.dropdown-content a {
    color: #333;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    transition: background-color 0.2s;
}

.dropdown-content a:hover {
    background-color: #f1f1f1;
}

.nav-dropdown:hover .dropdown-content {
    display: block;
}

.nav-dropdown:hover .nav-link {
    background-color: rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
    .nav-dropdown {
        display: block;
        width: 100%;
    }

    .dropdown-content {
        position: static;
        box-shadow: none;
        background-color: rgba(0, 0, 0, 0.1);
        margin-top: 0;
    }

    .nav-dropdown:hover .dropdown-content {
        display: none;
    }

    .nav-dropdown.active .dropdown-content {
        display: block;
    }
}

/* Province Link Styling */
.province-col .province-link {
    color: #f44336;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.province-col .province-link:hover {
    color: #d32f2f;
    text-decoration: underline;
}