/* ============================================
   assets/css/mainindex.css
   Main Index Page Styles
   ============================================ */

/* ============================================
   1. LOCAL FONTS
   ============================================ */
@font-face {
    font-family: 'Merriweather';
    src: url('../../font/Merriweather_24pt-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Merriweather';
    src: url('../../font/Merriweather_24pt-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Merriweather';
    src: url('../../font/Merriweather_24pt-Black.ttf') format('truetype');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Merriweather';
    src: url('../../font/Merriweather_24pt-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Merriweather';
    src: url('../../font/Merriweather_24pt-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

/* ============================================
   2. GLOBAL RESET
   ============================================ */
* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-x: hidden;
    font-family: 'Merriweather', serif;
    color: #ffffff;
}

body {
    background: #0a0a0a;
    display: flex;
    flex-direction: column;
}

img {
    max-width: 100%;
    height: auto;
}

/* ============================================
   3. BACKGROUND IMAGE + OVERLAY
   ============================================ */
img.pagebg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    z-index: -1;
    pointer-events: none;
}

.pagebg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    z-index: -1;
    pointer-events: none;
}

/* ============================================
   4. MAIN CONTAINER
   ============================================ */
#maincont {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px;
    flex: 1;
}

/* ============================================
   5. MARQUEE
   ============================================ */
.marquee-section {
    padding: 10px 0;
    overflow: hidden;
    width: 100%;
}

.marquee-section marquee {
    display: block;
    width: 100%;
    font-family: 'Merriweather', serif;
    font-size: 22px;
    color: #f5f4f2;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9);
}

/* ============================================
   6. HEADER ROW
   ============================================ */
#header_row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 10px 0;
    gap: 15px;
}

#logo_div {
    display: flex;
    align-items: center;
    gap: 75px;
    flex-shrink: 0;
}

#logo_div img {
    height: 75px;
    width: auto;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.8));
}

/* ============================================
   7. LIVE BLINKING IMAGE
   ============================================ */
.blink-live {
    width: 90px;
    height: auto;
    margin-top: 20px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    animation: liveBlink 1s infinite ease-in-out;
    filter: drop-shadow(0 0 8px rgba(255, 0, 0, 0.8));
}

@keyframes liveBlink {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
        filter: drop-shadow(0 0 12px rgba(255, 0, 0, 0.9));
    }
    50% {
        opacity: 0.25;
        transform: scale(0.95);
        filter: drop-shadow(0 0 4px rgba(255, 0, 0, 0.5));
    }
}

/* ============================================
   8. LOGIN FORM
   ============================================ */
#login_div {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}

#login_div form {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0;
}

#login_div .input {
    height: 34px;
    border: 1px solid rgba(255, 215, 0, 0.4);
    border-radius: 6px;
    padding: 6px 12px;
    color: #333333;
    font-size: 13px;
    background: #ffffff;
    width: 140px;
    outline: none;
    font-family: 'Merriweather', serif;
    transition: all 0.2s ease;
}

#login_div .input::placeholder {
    color: #888888;
    opacity: 1;
    font-style: italic;
    font-size: 13px;
}

#login_div .input:focus {
    border-color: #ffd700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.7);
    background: #fffbe6;
}

/* ============================================
   9. GOLDEN LOGIN BUTTON
   ============================================ */
#login_div #login_button {
    height: 34px;
    padding: 0 22px;
    font-weight: 900;
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    border: 2px solid #ffd700;
    border-radius: 6px;
    cursor: pointer;
    color: #000000;
    font-size: 13px;
    font-family: 'Merriweather', serif;
    transition: all 0.3s ease;
    min-width: 80px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 10px rgba(255, 215, 0, 0.4);
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
}

#login_div #login_button:hover {
    background: linear-gradient(135deg, #fff8dc, #ffd700);
    border-color: #fff8dc;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 215, 0, 0.7),
                0 0 20px rgba(255, 215, 0, 0.5);
    letter-spacing: 1.5px;
}

#login_div #login_button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
}

/* ============================================
   10. INFO BAR
   ============================================ */
#update_time_div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: 8px 0;
    margin: 30px 0 0 0;
    color: #ffffff;
    font-size: 18px;
    font-weight: bold;
    gap: 10px;
}

#update_time_div .info-col {
    flex: 1 1 22%;
    min-width: 160px;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.95);
    font-family: 'Merriweather', serif;
}

#update_time_div .info-col span {
    color: #f1f1ef;
    margin-left: 5px;
    font-weight: 700;
}

/* ============================================
   11. TABS
   ============================================ */
.tab_header {
    font-family: 'Merriweather', serif;
    font-size: 13px;
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: #000000;
    display: inline-block;
    padding: 10px 22px;
    margin-top: 5px;
    margin-right: 4px;
    cursor: pointer;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    font-weight: 900;
    transition: all 0.3s ease;
    user-select: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 2px solid #ffd700;
    border-bottom: none;
    box-shadow: 0 4px 10px rgba(255, 215, 0, 0.4);
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
}

.tab_header:hover {
    background: linear-gradient(135deg, #fff8dc, #ffd700);
    color: #000;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 215, 0, 0.7),
                0 0 20px rgba(255, 215, 0, 0.5);
    letter-spacing: 1.5px;
}

.tab_header.active {
    background: linear-gradient(135deg, #ffd700, #ffaa00);
    color: #000000;
    box-shadow: 0 8px 20px rgba(255, 215, 0, 0.6),
                0 0 25px rgba(255, 215, 0, 0.5);
    border-bottom: 2px solid transparent;
    font-weight: 900;
}

.tab_header i {
    margin-right: 5px;
    color: #000000;
}

/* ============================================
   12. TAB CONTENT
   ============================================ */
.tab-content {
    display: none;
    background: rgba(45, 53, 63, 0.85);
    border-radius: 10px;
    padding: 12px;
    border: 1px solid rgba(255, 215, 0, 0.1);
    margin-top: 30px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

.tab-content.active {
    display: block;
}

#drawTimeSelect {
    display: none !important;
}

/* ============================================
   13. LOTTERY TABLE
   ============================================ */
.lottery-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    color: #ffffff;
    text-shadow: 0 1px 1px #444;
    font-size: 12px;
    text-align: center;
    background: transparent;
    border: 2px solid #ffd900aa;
}

.lottery-table thead th {
    font-family: 'Merriweather', serif;
    color: #ffffff;
    font-size: 16px;
    padding: 10px 4px;
    border-bottom: 2px solid #ffd700;
    border-right: 1px solid #ffd700;
    font-weight: 700;
    text-transform: uppercase;
    background: rgba(234, 9, 9, 0.943);
    white-space: nowrap;
}

.lottery-table thead th:last-child {
    border-right: none;
}

/* Column widths */
.lottery-table th:nth-child(1) {
    width: 155px;
    text-align: left;
    padding-left: 8px;
}
.lottery-table th:nth-child(2) { width: 90px; }
.lottery-table th:nth-child(3) { width: 65px; }
.lottery-table th:nth-child(n+4):nth-child(-n+13) { width: 46px; }
.lottery-table th:nth-last-child(2),
.lottery-table th:nth-last-child(1) { width: 60px; }

/* Row colors */
.lottery-table tbody tr.row-1 { background: rgba(51, 235, 248, 0.973); }
.lottery-table tbody tr.row-2 { background: rgba(243, 208, 8, 0.795); }
.lottery-table tbody tr.row-3 { background: rgb(250, 63, 207); }
.lottery-table tbody tr.row-4 { background: rgba(128, 0, 128, 0.5); }
.lottery-table tbody tr.row-5 { background: rgba(255, 0, 0, 0.4); }
.lottery-table tbody tr.row-6 { background: rgba(0, 128, 128, 0.5); }

.lottery-table td {
    padding: 15px 2px;
    vertical-align: middle;
    font-family: 'Merriweather', serif;
    border-right: 1px solid #ffd700;
    border-bottom: 1px solid rgba(255, 215, 0, 0.3);
}

.lottery-table td:last-child {
    border-right: none;
}

.lottery-table tbody tr:last-child td {
    border-bottom: 2px solid #ffd700;
}

.lottery-table .game-name {
    text-align: left;
    font-weight: 900;
    font-size: 23px;
    padding-left: 8px;
    text-shadow: 2px 2px 4px #000;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #ffffff;
}

/* ============================================
   14. INPUT FIELDS
   ============================================ */
.number-input,
.tot-qty-input,
.tot-price-input,
.grand-total-input {
    font-family: 'Merriweather', serif;
    text-align: center;
    padding: 0;
    outline: none;
    font-weight: 600;
    transition: all 0.2s ease;
    border-radius: 4px;
}

.number-input {
    width: 40px;
    height: 34px;
    font-size: 15px;
    margin: 0 auto;
    display: block;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #E8B451;
    color: #333333;
    cursor: pointer;
    -moz-appearance: textfield;
}

.number-input::-webkit-outer-spin-button,
.number-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.number-input:focus {
    border-color: #ffd700;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.8);
    background: #fffbe6;
    transform: scale(1.1);
    z-index: 10;
    position: relative;
}

.number-input.has-value {
    background: #ffd700;
    border-color: #ffd700;
    color: #000;
    font-weight: 900;
}

.tot-qty-input,
.tot-price-input {
    width: 55px;
    height: 34px;
    font-size: 13px;
    font-weight: 700;
    margin: 0 auto;
    display: block;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid #ffd700;
    color: #ffd700;
    border-radius: 4px;
}

.grand-total-input {
    width: 45px;
    height: 30px;
    font-size: 13px;
    font-weight: 700;
    margin: 0 auto;
    display: block;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid #ffd700;
    color: #ffd700;
    border-radius: 4px;
}

/* ============================================
   15. RESULT FLIP BOARD
   ============================================ */
.win-cell {
    font-family: 'Merriweather', serif;
    font-weight: 700;
    font-size: 12px;
    position: relative;
    color: #ffffff;
    padding: 3px 4px;
    text-align: center;
    vertical-align: middle;
}

.flip-board {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 70px;
    height: 42px;
    background: #000000;
    border: 3px solid #ffbb00d0;
    border-radius: 6px;
    box-shadow: 0 0 10px rgba(35, 35, 35, 0.5),
                0 0 15px rgba(255, 140, 0, 0.2);
    gap: 2px;
    padding: 0 4px;
    position: relative;
    overflow: visible;
    vertical-align: middle;
}

.flip-board .flip-number {
    font-family: 'Courier New', monospace;
    font-size: 26px;
    font-weight: 900;
    color: #fafbfa;
    text-shadow: 0 0 8px #b8bbbb, 0 0 3px #ffffff;
    display: inline-block;
    line-height: 1;
    letter-spacing: 1px;
}

/* Result Spin Animation */
.flip-number.spinning {
    color: #fafbfa;
    text-shadow: 0 0 10px rgb(208, 210, 209);
    animation: spinMiddle 0.15s linear infinite;
}

.flip-number.stopping {
    color: #fafbfa;
    text-shadow: 0 0 12px rgb(208, 210, 209);
    animation: stopMiddle 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

/* Shared Keyframes */
@keyframes spinMiddle {
    0%   { transform: translateY(-15%) rotateX(45deg);  opacity: 0.8; }
    50%  { transform: translateY(0)    rotateX(0deg);   opacity: 1; }
    100% { transform: translateY(15%)  rotateX(-45deg); opacity: 0.8; }
}

@keyframes stopMiddle {
    0%   { transform: translateY(10%) rotateX(10deg); opacity: 0.9; }
    100% { transform: translateY(0)   rotateX(0deg);  opacity: 1; }
}

.result-time-display {
    display: block;
    font-size: 9px;
    color: rgba(27, 27, 27, 0.768);
    margin-top: 2px;
    min-height: 12px;
    font-family: 'Merriweather', serif;
}

/* ============================================
   16. COUPON COLUMN
   ============================================ */
.coupon-cell {
    padding: 8px 4px !important;
    text-align: center;
    vertical-align: middle;
}

.coupon-wrapper {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.coupon-flip-board {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 70px;
    height: 42px;
    background: linear-gradient(135deg, #ffffff, #f5f5f5) !important;
    border: 3px solid #f5c003 !important;
    border-radius: 6px;
    box-shadow: 0 0 10px rgba(30, 30, 30, 0.6),
                0 0 20px rgba(255, 140, 0, 0.3),
                inset 0 0 8px rgba(0, 0, 0, 0.05) !important;
    padding: 0 4px;
    position: relative;
    overflow: visible;
    vertical-align: middle;
}

.coupon-flip-board .coupon-text {
    font-family: 'Courier New', monospace !important;
    font-size: 26px !important;
    font-weight: 900 !important;
    color: #000000 !important;
    display: inline-block;
    line-height: 1;
    letter-spacing: 0.5px;
    text-shadow: none !important;
    transition: color 0.1s ease;
}

/* Suit Colors */
.coupon-flip-board .coupon-text.suit-S { color: #000000 !important; }
.coupon-flip-board .coupon-text.suit-H { color: #dc143c !important; }
.coupon-flip-board .coupon-text.suit-D { color: #dc143c !important; }
.coupon-flip-board .coupon-text.suit-C { color: #000000 !important; }

/* Coupon Spin */
.coupon-flip-board .coupon-text.spinning {
    animation: spinMiddle 0.15s linear infinite;
}

.coupon-flip-board .coupon-text.stopping {
    animation: stopMiddle 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.coupon-time-display {
    display: block;
    font-size: 9px;
    color: rgba(27, 27, 27, 0.768);
    margin-top: 2px;
    min-height: 12px;
    font-family: 'Merriweather', serif;
    text-align: center;
    width: 100%;
    white-space: nowrap;
}

/* ============================================
   17. VIEWERS ONLINE
   ============================================ */
.viewers-online {
    font-family: 'Merriweather', serif;
    color: #ffffff;
    font-weight: 600;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9);
}

.viewers-online i.fa-users {
    color: #00ff88;
    font-size: 14px;
    animation: glowPulse 2s ease-in-out infinite;
    filter: drop-shadow(0 0 5px rgba(0, 255, 136, 0.724));
}

/* ============================================
   18. GOLDEN BUTTONS
   ============================================ */
.btn-reset,
.btn-buy {
    font-family: 'Merriweather', serif;
    padding: 8px 20px;
    border: 2px solid #ffd700;
    border-radius: 6px;
    font-weight: 900;
    color: #000000;
    cursor: pointer;
    font-size: 13px;
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 10px rgba(255, 215, 0, 0.4);
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
    margin: 0 4px;
}

.btn-reset:hover,
.btn-buy:hover {
    background: linear-gradient(135deg, #efce49, #ffd700);
    border-color: #fff8dc;
    color: #000;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 215, 0, 0.7),
                0 0 20px rgba(255, 215, 0, 0.5);
    letter-spacing: 1.5px;
}

.btn-reset:active,
.btn-buy:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
}

.btn-view-results {
    font-family: 'Merriweather', serif;
    display: inline-block;
    padding: 10px 28px;
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: #000000;
    border: 2px solid #ffd700;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 900;
    font-size: 14px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
}

.btn-view-results:hover {
    background: linear-gradient(135deg, #f7cc1fe0, #ffd700);
    border-color: #fff8dc;
    color: #000000;
    text-decoration: none;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 215, 0, 0.7),
                0 0 25px rgba(255, 215, 0, 0.5);
    letter-spacing: 2px;
}

.btn-view-results:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
}

.btn-sms,
.btn-howto {
    font-family: 'Merriweather', serif;
    padding: 8px 20px;
    border: 2px solid #ffd700;
    border-radius: 6px;
    font-weight: 900;
    color: #000000;
    cursor: pointer;
    font-size: 13px;
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 10px rgba(255, 215, 0, 0.4);
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    vertical-align: middle;
}

.btn-sms:hover,
.btn-howto:hover {
    background: linear-gradient(135deg, #efce49, #ffd700);
    border-color: #fff8dc;
    color: #000;
    text-decoration: none;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 215, 0, 0.7),
                0 0 20px rgba(255, 215, 0, 0.5);
    letter-spacing: 1.5px;
}

.btn-sms:active,
.btn-howto:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
}

/* ============================================
   19. POPUP
   ============================================ */
.login-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 15px;
}

.login-popup.show {
    display: flex;
}

.login-popup-content {
    background: rgba(20, 20, 30, 0.98);
    padding: 30px 35px;
    border-radius: 15px;
    border: 2px solid rgba(255, 215, 0, 0.4);
    text-align: center;
    max-width: 380px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9), 0 0 40px rgba(255, 215, 0, 0.2);
}

.login-popup-content .icon {
    font-size: 42px;
    margin-bottom: 12px;
}

.login-popup-content h3 {
    color: #ffd700;
    font-size: 20px;
    margin: 8px 0;
    font-family: 'Merriweather', serif;
}

.login-popup-content p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.6;
    font-family: 'Merriweather', serif;
}

.popup-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

/* ============================================
   20. FOOTER TEXT
   ============================================ */
.footer-text {
    color: #dddddd;
    font-size: 11px;
    font-family: Arial, sans-serif;
    margin: 15px;
    display: inline-block;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.9);
}

/* ============================================
   21. SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 215, 0, 0.4);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 215, 0, 0.7);
}

/* ============================================
   22. RESPONSIVE — TABLET (1024px)
   ============================================ */
@media (max-width: 1024px) {
    .tab-content {
        max-width: 100%;
        padding: 8px;
    }
    #header_row {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    #logo_div {
        justify-content: center;
        flex-wrap: wrap;
    }
    #login_div {
        justify-content: center;
        width: 100%;
    }
    #update_time_div {
        flex-direction: column;
        gap: 6px;
    }
    #update_time_div .info-col {
        flex: 1 1 100%;
        min-width: 0;
    }
}

/* ============================================
   23. RESPONSIVE — MOBILE (768px)
   ============================================ */
@media (max-width: 768px) {
    /* Header */
    #logo_div img { height: 45px; }
    #login_div .input { width: 110px; }

    /* Marquee */
    .marquee-section marquee { font-size: 15px; }

    /* Table container */
    .tab-content {
        overflow-x: auto !important;
        padding: 8px 5px !important;
    }

    /* Table */
    .lottery-table {
        min-width: 780px !important;
        font-size: 10px !important;
    }

    /* Table header */
    .lottery-table thead th {
        font-size: 11px !important;
        padding: 6px 2px !important;
        letter-spacing: 0.3px !important;
    }

    /* Lottery name */
    .lottery-table th:nth-child(1) {
        width: 185px !important;
        min-width: 185px !important;
    }
    .lottery-table .game-name {
        font-size: 17px !important;
        font-weight: 900 !important;
        padding-left: 8px !important;
        white-space: nowrap !important;
        letter-spacing: 0.4px !important;
        text-shadow: 2px 2px 3px #000 !important;
    }

    /* Coupon + Result columns */
    .lottery-table th:nth-child(2) { width: 70px !important; }
    .lottery-table th:nth-child(3) { width: 55px !important; }

    /* Coupon board */
    .coupon-flip-board {
        width: 52px !important;
        height: 34px !important;
    }
    .coupon-flip-board .coupon-text {
        font-size: 14px !important;
        letter-spacing: 0 !important;
    }

    /* Result board */
    .flip-board {
        width: 52px !important;
        height: 34px !important;
    }
    .flip-board .flip-number {
        font-size: 18px !important;
    }

    /* Time display */
    .coupon-time-display,
    .result-time-display {
        font-size: 8px !important;
    }

    /* Number inputs */
    .number-input {
        width: 28px !important;
        height: 26px !important;
        font-size: 11px !important;
    }

    /* QTY / RS */
    .tot-qty-input,
    .tot-price-input {
        width: 40px !important;
        height: 26px !important;
        font-size: 11px !important;
    }

    /* Tabs & Buttons */
    .tab_header { padding: 8px 16px; font-size: 11px; }
    .btn-reset, .btn-buy { padding: 6px 14px; font-size: 11px; }
    .btn-view-results { padding: 8px 22px; font-size: 12px; }

    .btn-sms,
    .btn-howto {
        padding: 6px 12px;
        font-size: 10px;
        margin: 4px 2px !important;
    }
    
    /* Header spacing adjustments for mobile */
    #header_row {
        gap: 5px !important;
        padding: 5px 0 !important;
    }
    
    #logo_div {
        gap: 10px !important;
    }
    
    #logo_div img {
        height: 40px !important;
    }
    
    .blink-live {
        width: 60px !important;
        margin-top: 0 !important;
    }

    #login_div {
        margin-top: 0 !important;
    }

    /* Info bar margin */
    #update_time_div {
        margin: 10px 0 0 0 !important;
        padding: 5px 0 !important;
    }
}

/* ============================================
   24. RESPONSIVE — SMALL MOBILE (576px)
   ============================================ */
@media (max-width: 576px) {
    /* Marquee */
    .marquee-section marquee { font-size: 12px; }

    /* Table */
    .lottery-table {
        min-width: 700px !important;
        font-size: 9px !important;
    }

    .lottery-table thead th {
        font-size: 10px !important;
        padding: 5px 1px !important;
    }

    /* Lottery name */
    .lottery-table th:nth-child(1) {
        width: 170px !important;
        min-width: 170px !important;
    }
    .lottery-table .game-name {
        font-size: 16px !important;
        padding-left: 6px !important;
        white-space: nowrap !important;
    }

    /* Coupon + Result */
    .lottery-table th:nth-child(2) { width: 60px !important; }
    .lottery-table th:nth-child(3) { width: 50px !important; }

    .coupon-flip-board {
        width: 48px !important;
        height: 32px !important;
    }
    .coupon-flip-board .coupon-text {
        font-size: 13px !important;
    }

    .flip-board {
        width: 48px !important;
        height: 32px !important;
    }
    .flip-board .flip-number {
        font-size: 16px !important;
    }

    .coupon-time-display,
    .result-time-display {
        font-size: 7px !important;
    }

    .number-input {
        width: 26px !important;
        height: 24px !important;
        font-size: 10px !important;
    }

    /* Tabs & Buttons */
    .tab_header { padding: 6px 12px; font-size: 10px; }
    .btn-reset, .btn-buy { padding: 5px 12px; font-size: 10px; }
    .btn-view-results { padding: 8px 18px; font-size: 11px; }

    .btn-sms,
    .btn-howto {
        padding: 5px 10px;
        font-size: 9px;
    }

    /* Spacing adjustments for smaller mobile */
    #update_time_div {
        margin: 5px 0 0 0 !important;
    }
    
    .tab-content {
        margin-top: 10px !important;
    }
}
/* ============================================
   FINAL FIX: LOGIN TOGGLE (Desktop + Mobile)
   ============================================ */

/* Hide form by default on ALL devices */
#mainLoginForm {
    display: none !important;
}

/* The side button styling (Works on both Desktop & Mobile) */
.show-login-btn {
    position: fixed !important;
    top: 15% !important;
    right: 0 !important;
    transform: translateY(-50%) !important;
    z-index: 99999 !important;

    display: flex !important;
    align-items: center;
    gap: 4px;

    background: linear-gradient(135deg, #ffd700, #ff8c00) !important;
    color: #000 !important;
    border: none !important;
    border-radius: 8px 0 0 8px !important;
    
    padding: 8px 3px !important;
    font-weight: 700 !important;
    font-size: 10px !important;
    cursor: pointer !important;
    box-shadow: -2px 2px 8px rgba(0,0,0,0.4) !important;
}

.show-login-btn span {
    writing-mode: vertical-rl;
    letter-spacing: 1px;
}

/* Form popup style when opened (Works on both Desktop & Mobile) */
#mainLoginForm {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 100000 !important;
    
    flex-direction: column !important;
    width: 85% !important;
    max-width: 300px !important;
    padding: 20px !important;
    gap: 10px !important;
    border-radius: 12px !important;
    background: rgba(0,0,0,0.95) !important;
    box-shadow: 0 0 20px rgba(255,215,0,0.5) !important;
}

#login_div .input {
    width: 100% !important;
    height: 42px !important;
}

#login_div #login_button {
    width: 100% !important;
    height: 42px !important;
}

/* ============================================
   LOGO SHINE ANIMATION
   ============================================ */

/* Enable animation on the logo */
#logo_div > img:first-child {
    position: relative;
    overflow: hidden;
    animation: logoShine 4s infinite linear;
}

/* Shine animation keyframes */
@keyframes logoShine {
    0% {
        filter: drop-shadow(0 0 0px rgba(255, 215, 0, 0));
    }
    50% {
        filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.9)) brightness(1.3);
    }
    100% {
        filter: drop-shadow(0 0 0px rgba(255, 215, 0, 0));
    }
}