@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@500;700&display=swap');
        
:root {
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --secondary: #10b981;
    --dark: #1e293b;
    --light: #f8fafc;
    --card-bg: rgba(255, 255, 255, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    color: var(--light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

.font-mono { font-family: 'JetBrains Mono', monospace; }

.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
}

.result-ball {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #fff, #c7d2fe);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3), inset 0 -2px 3px rgba(0,0,0,0.2);
    border: 2px solid var(--primary);
    color: #1e293b;
    font-weight: 700;
    font-size: 1.5rem;
    margin: 0 5px;
}

.winner-card {
    background: linear-gradient(145deg, var(--primary), var(--primary-dark));
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 10px 25px rgba(79, 70, 229, 0.3);
    transition: transform 0.3s ease;
}

.winner-card:hover {
    transform: translateY(-5px);
}

.winner-2, .winner-3 {
    background: linear-gradient(145deg, #475569, #64748b);
}

.nav-active {
    background: rgba(79, 70, 229, 0.2);
    color: var(--primary);
    border: 1px solid rgba(79, 70, 229, 0.3);
}

.page-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.page-active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.countdown-digit {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--primary);
    min-width: 40px;
    font-size: 1.5rem;
}

.stat-card {
    background: var(--card-bg);
    border-radius: 0.75rem;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.generated-number {
    font-size: 4rem;
    font-weight: bold;
    color: var(--primary);
    font-family: 'JetBrains Mono', monospace;
    text-align: center;
    margin: 1rem 0;
}

.history-item {
    background: var(--card-bg);
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 0.75rem;
    transition: all 0.3s ease;
    border-left: 4px solid var(--primary);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.history-item:hover {
    background: rgba(79, 70, 229, 0.1);
}

.modal-content {
    background: rgba(30, 41, 59, 0.98) !important;
    border: 1px solid rgba(79, 70, 229, 0.4) !important;
    border-radius: 1rem !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    max-height: 90vh;
    overflow-y: auto;
}

.prize-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.prize-item {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 0.5rem;
    padding: 0.5rem;
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
}

/* Compact prize grid for modal */
.prize-grid.compact {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.25rem;
}

.prize-grid.compact .prize-item {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
}

/* Banner Slider Styles */
.banner-slider {
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: 1rem;
    position: relative;
}

.banner-slide {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.banner-slide.active {
    opacity: 1;
}

.banner-controls {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 10;
}

.banner-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.3s ease;
}

.banner-dot.active {
    background: var(--primary);
}

/* Header Styles - DIUBAH UNTUK MOBILE */
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    margin-bottom: 1.5rem;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.date-time-desktop {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.menu-section {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* TradingView Widget Styles */
.tradingview-widget-container {
    margin-top: 1rem;
    border-radius: 0.5rem;
    overflow: hidden;
}

/* Live Draw Styles */
.live-draw-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
}

.draw-animation {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--primary), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2rem 0;
    position: relative;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.7); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 20px rgba(79, 70, 229, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(79, 70, 229, 0); }
}

.draw-number {
    font-size: 3rem;
    font-weight: bold;
    color: white;
    font-family: 'JetBrains Mono', monospace;
}

/* FAQ Styles */
.faq-item {
    background: var(--card-bg);
    border-radius: 0.75rem;
    margin-bottom: 1rem;
    overflow: hidden;
}

.faq-question {
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

.faq-answer {
    padding: 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
    padding: 0 1.5rem 1.5rem;
    max-height: 500px;
}

.faq-toggle {
    margin-left: auto;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-toggle {
    transform: rotate(180deg);
}

/* Footer Styles */
.footer {
    background: rgba(15, 23, 42, 0.9);
    padding: 3rem 0 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 3rem;
    width: 100%;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 2rem;
}

@media (min-width: 768px) {
    .footer-content {
        grid-template-columns: repeat(4, 1fr);
    }
}

.footer-section h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.footer-section p, .footer-section a {
    color: #94a3b8;
    margin-bottom: 0.5rem;
    display: block;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--primary);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 2rem;
    padding-top: 1.5rem;
    text-align: center;
    color: #94a3b8;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

/* Main container styles - KONTEN UTAMA TERPUSAT */
.main-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    flex: 1;
}

/* ===== MOBILE MENU & NAVIGATION ===== */

/* Hamburger Menu Styles */
.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1000;
}

.hamburger-btn span {
    display: block;
    height: 3px;
    width: 100%;
    background: white;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.hamburger-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger-btn.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Navigation Menu */
.nav-menu {
    display: flex;
    gap: 0.5rem;
}

/* Overlay ketika menu terbuka */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    z-index: 998;
    display: none;
}

.nav-overlay.active {
    display: block;
}

/* ===== IMPROVED TABLE STYLES ===== */

/* History Table Styles */
.history-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.history-table th {
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(30, 41, 59, 0.5);
}

.history-table td {
    padding: 1rem 0.75rem;
    vertical-align: middle;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.history-table tr:last-child td {
    border-bottom: none;
}

.history-table tr:hover {
    background: rgba(79, 70, 229, 0.03);
}

/* Results Table Styles */
.results-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.results-table th {
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(30, 41, 59, 0.7);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.results-table td {
    padding: 1.25rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.results-table tr:last-child td {
    border-bottom: none;
}

.results-table tr:hover {
    background: rgba(79, 70, 229, 0.05);
    transition: background-color 0.2s ease;
}

/* Date & Time Display Improvements */
.date-time-cell {
    display: flex;
    flex-direction: column;
}

.date-main {
    font-weight: 600;
    color: white;
    font-size: 0.95rem;
}

.date-secondary {
    font-size: 0.875rem;
    color: #94a3b8;
    margin-top: 0.25rem;
}

.time-display {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
    color: #c7d2fe;
    font-weight: 500;
}

/* Winning Number Display */
.winning-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, var(--primary), var(--primary-dark));
    color: white;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 1.1rem;
    padding: 0.5rem 1rem;
    border-radius: 0.75rem;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
    min-width: 100px;
}

/* Action Buttons */
.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.action-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

.action-btn.outline {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}

.action-btn.outline:hover {
    background: var(--primary);
    color: white;
}

/* ===== IMPROVED PAGINATION STYLES ===== */
.pagination-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    transition: all 0.3s ease;
    font-size: 0.875rem;
    cursor: pointer;
}

.pagination-btn:hover:not(:disabled) {
    background: rgba(79, 70, 229, 0.2);
    border-color: rgba(79, 70, 229, 0.3);
    color: #c7d2fe;
    transform: translateY(-1px);
}

.pagination-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.pagination-btn:disabled:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: #94a3b8;
}

.page-number {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.75rem;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    transition: all 0.3s ease;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
}

.page-number:hover:not(.active):not(.ellipsis) {
    background: rgba(79, 70, 229, 0.1);
    border-color: rgba(79, 70, 229, 0.2);
    color: #c7d2fe;
    transform: translateY(-1px);
}

.page-number.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.page-number.ellipsis {
    background: transparent;
    border: none;
    cursor: default;
    min-width: auto;
}

.page-number.ellipsis:hover {
    background: transparent;
    color: #94a3b8;
    transform: none;
}

/* Sortable Headers */
.sortable {
    transition: all 0.3s ease;
    user-select: none;
}

.sortable:hover {
    color: #c7d2fe;
}

.sortable.active {
    color: var(--primary);
}

.sortable .fa-sort {
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.sortable:hover .fa-sort {
    opacity: 0.8;
}

.sortable.active .fa-sort {
    opacity: 1;
}

.sortable.asc .fa-sort {
    transform: rotate(180deg);
}

/* Stats Panel */
.stats-panel {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1), rgba(79, 70, 229, 0.05));
    border: 1px solid rgba(79, 70, 229, 0.2);
    border-radius: 0.75rem;
    padding: 1rem 1.5rem;
}

.stats-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.stats-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.stats-label {
    font-size: 0.875rem;
    color: #94a3b8;
    margin-top: 0.25rem;
}

/* Improved modal header */
.modal-content .glass-card {
    position: relative;
}

.close-modal {
    position: relative;
    z-index: 10;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.close-modal:hover {
    background: rgba(239, 68, 68, 0.3) !important;
    transform: scale(1.1);
}

/* ===== MOBILE OPTIMIZATIONS ===== */
@media (max-width: 768px) {
    /* Hide date-time in mobile header */
    .date-time-desktop {
        display: none;
    }
    
    /* Header Mobile Optimization */
    .header-container {
        flex-direction: row;
        align-items: center;
        padding: 1rem 0;
        gap: 1rem;
    }
    
    .logo-section {
        flex: 1;
        justify-content: flex-start;
    }
    
    .hamburger-btn {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: rgba(15, 23, 42, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 5rem 1.5rem 2rem;
        transition: right 0.3s ease;
        z-index: 999;
        border-left: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-menu .nav-btn {
        width: 100%;
        text-align: left;
        justify-content: flex-start;
        padding: 1rem 1.5rem;
        margin-bottom: 0.5rem;
        border-radius: 0.75rem;
        font-size: 1rem;
        min-height: 44px;
    }
    
    /* TradingView Widget Mobile */
    .tradingview-widget-container {
        margin-top: 0.5rem;
    }
    
    /* Main Content Layout Mobile */
    .main-container {
        padding: 0 0.75rem;
    }
    
    /* Grid Layout Adjustments */
    .grid {
        gap: 1rem;
    }
    
    /* Countdown Mobile */
    .countdown-digit {
        min-width: 28px;
        font-size: 1.25rem;
        padding: 0.5rem;
    }
    
    /* Banner Slider Mobile */
    .banner-slider {
        height: 150px;
    }
    
    /* Winner Cards Mobile */
    .winner-card {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .winner-card .text-4xl {
        font-size: 1.75rem;
    }
    
    .winner-card .text-3xl {
        font-size: 1.5rem;
    }
    
    /* Prize Grid Mobile */
    .prize-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .prize-item {
        font-size: 0.875rem;
        padding: 0.375rem;
    }
    
    /* Result Balls Mobile */
    .result-ball {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        margin: 0 2px;
    }
    
    /* IMPROVED HISTORY TABLE FOR MOBILE */
    .history-table {
        font-size: 0.75rem;
    }

    .history-table th,
    .history-table td {
        padding: 0.6rem 0.4rem;
    }

    .history-table .date-time-cell {
        min-width: 80px;
    }

    .history-table .date-main {
        font-size: 0.8rem;
        font-weight: 600;
    }

    .history-table .date-secondary.desktop-only {
        display: none;
    }

    .history-table .date-secondary.mobile-only {
        display: block;
        font-size: 0.7rem;
        margin-top: 0.1rem;
    }

    .history-table .winning-number {
        font-size: 0.9rem;
        padding: 0.3rem 0.6rem;
        min-width: 70px;
    }

    .history-table .action-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
        min-height: 32px;
    }

    .history-table .action-btn .desktop-only {
        display: none;
    }

    .history-table .action-btn .mobile-only {
        display: inline;
    }
    
    /* IMPROVED RESULTS TABLE FOR MOBILE */
    .results-table {
        font-size: 0.75rem;
    }

    .results-table th,
    .results-table td {
        padding: 0.8rem 0.5rem;
    }

    .results-table .date-time-cell {
        min-width: 70px;
    }

    .results-table .date-main {
        font-size: 0.8rem;
    }

    .results-table .date-secondary.desktop-only {
        display: none;
    }

    .results-table .time-display {
        font-size: 0.8rem;
    }

    .results-table .winning-number {
        font-size: 0.9rem;
        padding: 0.4rem 0.7rem;
        min-width: 75px;
    }

    .results-table .action-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
        min-height: 32px;
    }

    .results-table .action-btn .desktop-only {
        display: none;
    }

    .results-table .action-btn .mobile-only {
        display: inline;
    }
    
    /* Modal responsive improvements */
    .modal-content {
        margin: 0.5rem;
        width: calc(100% - 1rem);
        max-width: none;
    }
    
    .modal-content .glass-card {
        padding: 1rem !important;
    }
    
    /* Stack winner cards vertically on mobile */
    #result-modal .winner-card {
        margin-bottom: 0.5rem;
    }
    
    #result-modal .winner-card:last-child {
        margin-bottom: 0;
    }
    
    /* Make prize items more compact on mobile */
    .prize-grid.compact {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.2rem;
    }
    
    .prize-grid.compact .prize-item {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
    }
    
    /* Adjust modal header for mobile */
    #result-modal .flex.justify-between {
        align-items: flex-start;
    }
    
    #result-modal .flex.justify-between > div:first-child {
        margin-right: 0.5rem;
    }
    
    #result-modal h2 {
        font-size: 1rem !important;
    }
    
    #result-modal #modal-date {
        font-size: 0.75rem;
    }
    
    #result-modal .winner-card {
        padding: 0.75rem !important;
    }
    
    #result-modal .winner-card .text-xl {
        font-size: 1.25rem;
    }
    
    #result-modal .winner-card .text-lg {
        font-size: 1.125rem;
    }
    
    /* Live Draw Mobile */
    .live-draw-container {
        padding: 1rem;
    }
    
    .draw-animation {
        width: 150px;
        height: 150px;
    }
    
    .draw-number {
        font-size: 2rem;
    }
    
    /* FAQ Mobile */
    .faq-question {
        padding: 1rem;
        font-size: 0.9rem;
        min-height: 44px;
    }
    
    .faq-answer {
        padding: 0 1rem;
        font-size: 0.875rem;
    }
    
    .faq-item.active .faq-answer {
        padding: 0 1rem 1rem;
    }
    
    /* Footer Mobile */
    .footer {
        padding: 2rem 0 1rem;
    }
    
    .footer-section {
        margin-bottom: 1.5rem;
    }
    
    .footer-bottom {
        margin-top: 1.5rem;
        padding-top: 1rem;
    }
    
    /* Loading Overlay Mobile */
    #loading-overlay .text-lg {
        font-size: 1rem;
    }
    
    #loading-overlay .h-16 {
        height: 3rem;
        width: 3rem;
    }
    
    /* Pagination Mobile */
    .pagination-btn, .page-number {
        width: 2.25rem;
        height: 2.25rem;
        font-size: 0.8rem;
    }
    
    .page-number {
        min-width: 2.25rem;
        padding: 0 0.5rem;
    }
    
    #pagination-container {
        gap: 1rem;
    }
    
    /* Header Mobile */
    .results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .search-filter-container {
        width: 100%;
    }
    
    #results-search {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .main-container {
        padding: 0 0.5rem;
    }
    
    .nav-menu {
        width: 100%;
        right: -100%;
    }
    
    .countdown-digit {
        min-width: 24px;
        font-size: 1rem;
        padding: 0.375rem;
    }
    
    .banner-slider {
        height: 120px;
    }
    
    .winner-card {
        padding: 0.75rem;
    }
    
    .prize-grid {
        grid-template-columns: 1fr;
    }
    
    .result-ball {
        width: 35px;
        height: 35px;
        font-size: 0.875rem;
    }
    
    .draw-animation {
        width: 120px;
        height: 120px;
    }
    
    .draw-number {
        font-size: 1.75rem;
    }
    
    .modal-content {
        margin: 0.25rem;
        width: calc(100% - 0.5rem);
    }
    
    .modal-content .glass-card {
        padding: 0.75rem !important;
    }
    
    /* Single column for prizes on very small screens */
    .prize-grid.compact {
        grid-template-columns: 1fr;
    }
    
    /* Further reduce winner card padding */
    #result-modal .winner-card {
        padding: 0.5rem !important;
    }
    
    #result-modal .winner-card .text-xl {
        font-size: 1.125rem;
    }
    
    #result-modal .winner-card .text-lg {
        font-size: 1rem;
    }
    
    /* Adjust modal header spacing */
    #result-modal .flex.justify-between {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    #result-modal .flex.justify-between > div:last-child {
        align-self: flex-end;
        position: absolute;
        top: 0.75rem;
        right: 0.75rem;
    }
    
    /* History Table Extra Small */
    .history-table {
        font-size: 0.7rem;
    }
    
    .history-table th,
    .history-table td {
        padding: 0.5rem 0.3rem;
    }
    
    .history-table .date-main {
        font-size: 0.75rem;
    }
    
    .history-table .date-secondary.mobile-only {
        font-size: 0.65rem;
    }
    
    .history-table .winning-number {
        font-size: 0.8rem;
        padding: 0.3rem 0.5rem;
        min-width: 65px;
    }
    
    .history-table .action-btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.7rem;
    }
    
    /* Results Table Extra Small */
    .results-table {
        font-size: 0.7rem;
    }
    
    .results-table th,
    .results-table td {
        padding: 0.6rem 0.3rem;
    }
    
    .pagination-btn, .page-number {
        width: 2rem;
        height: 2rem;
        font-size: 0.75rem;
    }
    
    .page-number {
        min-width: 2rem;
        padding: 0 0.4rem;
    }
    
    #pagination-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    #pagination-numbers {
        order: 0;
    }
    
    .stats-panel {
        padding: 0.75rem 1rem;
    }
    
    .stats-value {
        font-size: 1.25rem;
    }
    
    .stats-label {
        font-size: 0.8rem;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Increase touch target sizes */
    .nav-btn, 
    .banner-dot, 
    .view-detail,
    .faq-question,
    .close-modal {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Remove hover effects for touch devices */
    .winner-card:hover {
        transform: none;
    }
    
    .nav-btn:hover {
        background-color: inherit;
    }
    
    /* Touch feedback for history rows */
    .history-row:active {
        background: rgba(79, 70, 229, 0.1);
    }
}

/* Empty States */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
}

.empty-state-icon {
    font-size: 3rem;
    color: #475569;
    margin-bottom: 1rem;
}

.empty-state-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 0.5rem;
}

.empty-state-description {
    color: #94a3b8;
    font-size: 0.95rem;
}

/* Loading States */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.loading-spinner {
    border: 2px solid rgba(79, 70, 229, 0.3);
    border-top: 2px solid var(--primary);
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

/* Refresh Button */
#refresh-history {
    transition: all 0.3s ease;
}

#refresh-history:hover {
    transform: rotate(180deg);
}

#refresh-history.loading {
    animation: spin 1s linear infinite;
}

/* Export Button */
#export-results {
    transition: all 0.3s ease;
}

#export-results:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

/* View All Button */
.view-all-results {
    transition: all 0.3s ease;
}

.view-all-results:hover {
    transform: translateX(4px);
}

/* Desktop/Mobile specific elements */
.desktop-only {
    display: block;
}

.mobile-only {
    display: none;
}

@media (max-width: 768px) {
    .desktop-only {
        display: none;
    }
    
    .mobile-only {
        display: block;
    }
}

/* Modal animation improvements */
#result-modal {
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes modalFadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.9);
    }
}

/* Modal scrollbar styling */
.modal-content::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}