@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ==========================================================================
   VESO365 RED & WHITE LIGHT THEME STYLE
   ========================================================================== */

:root {
    --primary: #dc2626; /* Crimson Red */
    --primary-dark: #b91c1c;
    --primary-glow: rgba(220, 38, 38, 0.15);
    
    --bg-main: #f8fafc; /* Very light slate gray */
    --bg-card: #ffffff; /* Pure white */
    
    --text-primary: #0f172a; /* Slate 900 */
    --text-secondary: #475569; /* Slate 600 */
    --text-muted: #94a3b8; /* Slate 400 */
    
    --border-light: #e2e8f0; /* Soft gray border */
    --border-active: #fca5a5; /* Reddish soft border */
    
    --gold: #d97706; /* Gold/Orange */
    
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.04);
    --shadow-up: 0 -4px 12px rgba(0,0,0,0.05);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-circle: 50%;
}

/* Base resets & Font Lock */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html, body, button, input, select, textarea, h1, h2, h3, h4, h5, h6, p, span, a, div, li, label {
    font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}

html, body {
    width: 100%;
    overflow-x: hidden;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.5;
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Typography elements */
h1, h2, h3, h4, h5 {
    font-weight: 800;
}

.text-red { color: var(--primary); }
.text-blue { color: #0284c7; }
.text-gold { color: var(--gold); }
.text-center { text-align: center; }
.hidden { display: none !important; }

/* Interactive buttons */
.btn {
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    outline: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition-fast);
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px var(--primary-glow);
}

.btn-outline {
    background: white;
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
}

.btn-outline.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.btn-outline:hover {
    background: #f1f5f9;
    color: var(--text-primary);
    border-color: #cbd5e1;
}

.btn-block { width: 100%; }
.btn-lg { padding: 14px 20px; font-size: 1rem; }
.btn-sm { padding: 6px 12px; font-size: 0.8rem; }

.btn-gradient {
    background: linear-gradient(135deg, var(--primary), #b91c1c);
    color: white;
    border: none;
}
.btn-gradient:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--primary-dark), #991b1b);
    box-shadow: 0 4px 12px var(--primary-glow);
}
.btn-gradient:disabled {
    background: #cbd5e1;
    color: #94a3b8;
    cursor: not-allowed;
}

/* ==========================================================================
   APP HEADER
   ========================================================================== */
.app-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    z-index: 101;
    display: flex;
    align-items: center;
}

.header-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.brand-icon {
    font-size: 1.8rem;
    color: var(--primary);
}

.brand-name {
    font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: 0.5px;
}

.brand-slogan {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.desktop-nav {
    display: flex;
    gap: 4px;
}

.nav-link {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: var(--transition-fast);
}

.nav-link:hover {
    color: var(--primary);
    background: rgba(220, 38, 38, 0.05);
}

.nav-link.active {
    color: var(--primary);
    background: rgba(220, 38, 38, 0.08);
}

/* Mobile top bar */
.mobile-top-bar {
    display: none;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-light);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    padding: 0 16px;
    z-index: 90;
    justify-content: space-between;
    align-items: center;
}

.brand-icon-mobile {
    font-size: 1.4rem;
    color: var(--primary);
}

.brand-name-mobile {
    font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--primary);
}

.mobile-actions .action-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-circle);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    background: #f1f5f9;
    border: 1px solid var(--border-light);
    font-size: 1rem;
    cursor: pointer;
}

.mobile-actions .action-btn:hover {
    color: var(--primary);
    background: rgba(220, 38, 38, 0.05);
}

/* ==========================================================================
   SPA VIEWS & CONTENT LAYOUT
   ========================================================================== */
.app-main {
    max-width: 1200px;
    margin: 94px auto 40px auto;
    padding: 0 20px;
    min-height: calc(100vh - 150px);
}

.view-panel {
    display: none;
}

.view-panel.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================
   SPA VIEW 1: HOME PAGE LAYOUT
   ========================================== */

/* Hero Banner Carousel is styled at the end of this file */

/* Grid of categories */
.quick-grid-section {
    margin-bottom: 32px;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 16px;
    position: relative;
    padding-left: 14px;
    color: var(--text-primary);
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 16px;
    background: var(--primary);
    border-radius: 2px;
}

.quick-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.grid-item {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    padding: 16px;
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-normal);
}

.grid-item:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.grid-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-circle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    margin-bottom: 10px;
    color: white;
}

.keno-icon { background: linear-gradient(135deg, #f59e0b, #d97706); }
.mega-icon { background: linear-gradient(135deg, #0284c7, #0369a1); }
.power-icon { background: linear-gradient(135deg, var(--primary), #991b1b); }
.max3d-icon { background: linear-gradient(135deg, #a855f7, #7e22ce); }
.max3dpro-icon { background: linear-gradient(135deg, #ec4899, #be185d); }
.lotto-icon { background: linear-gradient(135deg, #10b981, #047857); }
.loto-tc-icon { background: linear-gradient(135deg, #64748b, #475569); }
.xskt-icon { background: linear-gradient(135deg, #14b8a6, #0f766e); }

.grid-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 3px;
}

.grid-desc {
    font-size: 0.72rem;
    color: var(--text-secondary);
}

/* Jackpot Board */
.jackpot-section {
    margin-bottom: 32px;
}

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

.live-indicator {
    background: rgba(220, 38, 38, 0.08);
    color: var(--primary);
    border: 1px solid rgba(220, 38, 38, 0.15);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

.live-indicator .dot {
    width: 6px;
    height: 6px;
    border-radius: var(--radius-circle);
    background: var(--primary);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.9); opacity: 0.6; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.6; }
}

.jackpot-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.jackpot-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
}

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

.jackpot-game-name {
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.jackpot-value {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

.jackpot-sub-value {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 14px;
}

.jackpot-timer {
    font-size: 0.8rem;
    color: var(--text-secondary);
    background: #f1f5f9;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    margin-top: auto;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.countdown {
    font-weight: 700;
    color: var(--text-primary);
    font-family: monospace;
    font-size: 0.9rem;
}

.btn-buy {
    width: 100%;
    justify-content: center;
    padding: 10px;
}

.card-power { border-top: 4px solid var(--primary); }
.card-power .jackpot-value { color: var(--primary); }
.btn-power { background: var(--primary); color: white; }

.card-mega { border-top: 4px solid #0284c7; }
.card-mega .jackpot-value { color: #0284c7; }
.btn-mega { background: #0284c7; color: white; }

.card-lotto { border-top: 4px solid #10b981; }
.card-lotto .jackpot-value { color: #10b981; }
.btn-lotto { background: #10b981; color: white; }

/* Winners Showcase Widget */
.winners-section {
    margin-bottom: 32px;
}

.winners-widget-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 10px 16px;
    overflow: hidden;
    position: relative;
    height: 140px; /* Displays 2 rows of winners */
}

.winners-list-container {
    display: flex;
    flex-direction: column;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    position: absolute;
    left: 16px;
    right: 16px;
    top: 10px;
}

.winner-row-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    padding: 0 8px;
    animation: fadeInRow 0.5s ease-out;
}

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

@keyframes fadeInRow {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.winner-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.winner-cup-icon {
    font-size: 1.25rem;
    color: var(--gold);
    filter: drop-shadow(0 0 4px rgba(212, 175, 55, 0.3));
    animation: floatIcon 3s ease-in-out infinite alternate;
}

@keyframes floatIcon {
    0% { transform: translateY(0); }
    100% { transform: translateY(-3px); }
}

.winner-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.winner-phone-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
}

.winner-game-badge {
    font-size: 0.7rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    color: white;
    width: fit-content;
}
.winner-game-badge.keno { background: var(--gold); }
.winner-game-badge.mega { background: #0284c7; }
.winner-game-badge.power { background: var(--primary); }
.winner-game-badge.lotto { background: #10b981; }
.winner-game-badge.loto-tuchon { background: #8b5cf6; }
.winner-game-badge.xskt { background: #14b8a6; }

.winner-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.winner-amount-label {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.2px;
}

.btn-view-ticket {
    font-size: 0.75rem;
    font-weight: 700;
    color: #0284c7;
    background: #e0f2fe;
    border: 1px solid #bae6fd;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition-fast);
}

.btn-view-ticket:hover {
    background: #0284c7;
    color: white;
    border-color: #0284c7;
    box-shadow: 0 4px 6px -1px rgba(2, 132, 199, 0.2);
}

/* Steps guide */
.steps-section {
    margin-top: 40px;
    border-top: 1px solid var(--border-light);
    padding-top: 32px;
    margin-bottom: 40px;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 24px;
}

.step-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    padding: 24px 16px;
    border-radius: var(--radius-md);
    text-align: center;
    position: relative;
}

.step-num {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 28px;
    background: var(--primary);
    color: white;
    border-radius: var(--radius-circle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    border: 2px solid white;
}

.step-icon {
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 12px;
}

.step-card h4 {
    font-size: 0.95rem;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.step-card p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Footer layout */
.app-footer {
    background: linear-gradient(135deg, #0b0f19 0%, #1e293b 100%);
    color: #cbd5e1;
    border-radius: var(--radius-lg);
    padding: 48px 32px 24px 32px;
    margin-top: 40px;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-container {
    display: grid;
    grid-template-columns: 2.2fr 1.2fr 1.2fr 1.5fr;
    gap: 32px;
    margin-bottom: 36px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.footer-links-list a {
    text-decoration: none;
    display: inline-block;
    transition: all 0.25s ease;
}

.footer-links-list a:hover {
    color: white !important;
    transform: translateX(4px);
}

.contact-links-footer a:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(0,0,0,0.25);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 20px;
    text-align: center;
    font-size: 0.75rem;
    color: #64748b;
}

/* ==========================================
   SPA VIEW 2: PURCHASE PANEL LAYOUT
   ========================================== */
.purchase-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: start;
    max-width: 900px;
    margin: 0 auto;
}

.purchase-main-col {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

/* Horizontal Swiper tabs styling */
.game-tabs-container {
    overflow-x: auto;
    margin-bottom: 20px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--border-light);
}

.game-tabs {
    display: flex;
    gap: 6px;
    width: max-content;
}

.tab-item {
    background: #f1f5f9;
    border: 1px solid var(--border-light);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition-fast);
}

.tab-item:hover {
    background: #e2e8f0;
    color: var(--text-primary);
}

.tab-item.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

/* Selector game panels styling */
.game-panel {
    display: none;
}

.game-panel.active {
    display: block;
}

.panel-header {
    margin-bottom: 20px;
}

.panel-header h2 {
    font-size: 1.15rem;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.panel-header p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Controls inside panels */
.keno-controls, .lotto-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    background: #f8fafc;
    padding: 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    flex-wrap: wrap;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.control-group label {
    font-weight: 600;
    font-size: 0.85rem;
}

.form-select {
    padding: 8px 30px 8px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    outline: none;
    font-size: 0.85rem;
    background-color: white;
}

.control-group-buttons {
    display: flex;
    gap: 6px;
}

.control-group-buttons .btn {
    padding: 8px 12px;
    font-size: 0.8rem;
}

/* Balls selections */
.balls-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 8px;
    margin-bottom: 20px;
}

.ball-item {
    aspect-ratio: 1;
    border-radius: var(--radius-circle);
    border: 1px solid #cbd5e1;
    background: white;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    transition: var(--transition-fast);
}

.ball-item:hover {
    border-color: var(--primary);
    background: rgba(220, 38, 38, 0.05);
}

.ball-item.selected {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: white !important;
    box-shadow: 0 2px 6px var(--primary-glow);
}

/* Keno Special styling */
.special-plays-divider {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    margin: 16px 0;
    position: relative;
}

.special-plays-divider::before, .special-plays-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 30%;
    height: 1px;
    background: var(--border-light);
}
.special-plays-divider::before { left: 0; }
.special-plays-divider::after { right: 0; }

.special-plays-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.btn-special-play {
    background: white;
    border: 1px solid var(--border-light);
    padding: 10px;
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.btn-special-play:hover {
    background: #f8fafc;
}

.btn-special-play.selected {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Max 3D picker style */
.max-mode-selector {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.max-mode-selector .btn {
    flex: 1;
    font-size: 0.8rem;
}

.max-mode-selector .btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.max3d-number-pickers {
    display: flex;
    gap: 16px;
}

.digit-picker-card {
    flex: 1;
    background: #f8fafc;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 16px;
    text-align: center;
}

.digit-picker-card h3 {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.pickers-row {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.pickers-row select {
    font-size: 1.35rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    outline: none;
    background: white;
}

/* Loto & XSKT Form */
.loto-tuchon-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #f8fafc;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-group label {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.form-control {
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    outline: none;
    font-size: 0.9rem;
    background: white;
    color: var(--text-primary);
}

.form-control:focus {
    border-color: var(--primary);
}

.add-to-cart-container {
    margin-top: 20px;
    border-top: 1px dashed var(--border-light);
    padding-top: 16px;
}

/* Right Column: Checkout Sidebar */
.purchase-sidebar-col {
    position: sticky;
    top: 90px;
}

.checkout-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.card-header {
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff5f5; /* Soft light red background */
    border-bottom: 2px solid #fee2e2;
}

.card-header.border-bottom {
    border-bottom: 2px solid #fee2e2;
}

.cart-icon {
    font-size: 1.4rem;
    color: var(--primary);
}

.card-header h3 {
    font-size: 0.95rem;
    color: var(--text-primary);
}

.card-header p {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.cart-items-list {
    min-height: 120px;
    max-height: 220px;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #fafafa;
}

.empty-state {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    padding: 30px 10px;
}

.cart-item-row {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.item-info {
    display: flex;
    flex-direction: column;
}

.item-game-title {
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--primary);
}

.item-numbers-display {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    margin: 4px 0;
}

.cart-ball-span {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-primary);
}

.item-sub-desc {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.item-price-delete {
    display: flex;
    align-items: center;
    gap: 12px;
}

.item-price-delete strong {
    font-size: 0.82rem;
    color: var(--text-primary);
}

.btn-delete-item {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

.btn-delete-item:hover {
    color: var(--primary);
}

.cart-total-section {
    padding: 12px 16px;
    background: #fafafa;
    border-top: 1px solid var(--border-light);
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.total-row span {
    font-size: 0.85rem;
    font-weight: 600;
}

.total-row strong {
    font-size: 1.1rem;
    color: var(--primary);
    font-weight: 800;
}

/* Customer Checkout form section */
.customer-info-section {
    padding: 16px;
    border-top: 1px solid var(--border-light);
}

.customer-info-section h3 {
    font-size: 0.85rem;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.form-group-sm {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-bottom: 10px;
}

.form-group-sm label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-group-sm .form-control {
    padding: 8px 10px;
    font-size: 0.82rem;
}

.reward-account-toggle {
    margin: 10px 0;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

.reward-account-fields {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.reward-account-fields.open {
    max-height: 250px;
}

/* ==========================================
   SPA VIEW 3: ACCOUNT & ORDERS HISTORY LAYOUT
   ========================================== */
.account-container {
    max-width: 960px;
    margin: 0 auto;
}

.account-card-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 32px 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}

.account-placeholder-icon {
    font-size: 3rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.account-card-panel h2 {
    font-size: 1.3rem;
    margin-bottom: 8px;
}

.account-grid-layout {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
    align-items: start;
}

.profile-card {
    padding: 24px;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.profile-header .avatar {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-circle);
    background: #ffe4e6;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.profile-header h3 {
    font-size: 1.05rem;
    color: var(--text-primary);
}

.profile-header p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.profile-actions {
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
}

.history-card {
    padding: 24px;
}

.history-card h3 {
    font-size: 1.05rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Tables styling */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
    border: 1px solid #f1f5f9;
}

.table-custom {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    text-align: left;
}

.table-custom th {
    background: #f8fafc;
    padding: 14px 16px;
    font-weight: 600;
    color: #475569;
    border-bottom: 2px solid #e2e8f0;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.table-custom td {
    padding: 14px 16px;
    border-bottom: 1px solid #f1f5f9;
    color: var(--text-primary);
    vertical-align: middle;
}

.table-custom tr {
    transition: background-color 0.2s ease;
}

.table-custom tr:hover {
    background: #f8fafc;
}

/* Style order codes & transaction IDs to look monospace & premium */
.table-custom td[data-label="Mã đơn"] strong,
.table-custom td[data-label="Mã GD"] strong {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.85rem;
    color: #1e293b;
    background: #f1f5f9;
    padding: 4px 8px;
    border-radius: 6px;
    letter-spacing: 0.5px;
    font-weight: 600;
    display: inline-block;
}

/* Badges for status - upgraded to elegant pills */
.badge-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.status-pending { 
    background: #fffbeb; 
    color: #d97706; 
    border: 1px solid #fde68a;
}
.status-paid { 
    background: #f0f9ff; 
    color: #0284c7; 
    border: 1px solid #bae6fd;
}
.status-completed { 
    background: #f0fdf4; 
    color: #16a34a; 
    border: 1px solid #bbf7d0;
}
.status-cancelled { 
    background: #f8fafc; 
    color: #64748b; 
    border: 1px solid #e2e8f0;
}

.status-won { 
    background: #fef2f2; 
    color: #dc2626; 
    border: 1px solid #fecaca;
    font-weight: 700;
    animation: pulse-glow 2s infinite alternate;
}
.status-lost { 
    background: #f8fafc; 
    color: #94a3b8; 
    border: 1px solid #e2e8f0;
}
.status-unchecked { 
    background: #f1f5f9; 
    color: #475569; 
    border: 1px solid #cbd5e1;
}

@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 5px rgba(220, 38, 38, 0.1);
    }
    100% {
        box-shadow: 0 0 12px rgba(220, 38, 38, 0.3);
    }
}

/* Premium outline button for View Ticket */
.table-custom .btn-outline {
    border: 1px solid #cbd5e1;
    color: #475569;
    background: #ffffff;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}
.table-custom .btn-outline:hover {
    border-color: #ef4444;
    color: #ef4444;
    background: #fef2f2;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.08);
}
.table-custom .btn-outline i {
    font-size: 0.8rem;
}

/* Responsive Table Card Layout for Mobile */
@media (max-width: 768px) {
    .table-responsive {
        border: none;
        box-shadow: none;
        overflow-x: visible;
    }
    
    .table-custom, 
    .table-custom thead, 
    .table-custom tbody, 
    .table-custom th, 
    .table-custom td, 
    .table-custom tr {
        display: block;
    }
    
    .table-custom thead {
        display: none;
    }
    
    .table-custom tbody {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }
    
    .table-custom tr {
        background: #ffffff;
        border: 1px solid #e2e8f0;
        border-left: 5px solid var(--game-color, #cbd5e1);
        border-radius: 12px;
        padding: 14px 16px 14px 12px;
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.05);
        position: relative;
        transition: all 0.2s ease-in-out;
        margin-bottom: 4px;
    }
    
    .table-custom tr:hover {
        background: #ffffff;
        border-color: #cbd5e1;
        transform: translateY(-2px);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    }
    
    .table-custom td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 0;
        border-bottom: 1px dashed #f1f5f9;
        font-size: 0.85rem;
        text-align: right;
    }
    
    .table-custom td:last-child {
        border-bottom: none;
        padding-bottom: 0;
        padding-top: 12px;
        justify-content: flex-end;
    }
    
    .table-custom td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #64748b;
        font-size: 0.8rem;
        text-align: left;
        margin-right: 15px;
    }
}

/* ==========================================
   MOBILE BOTTOM NAVIGATION BAR
   ========================================== */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 58px;
    background: var(--bg-card);
    border-top: 1px solid var(--border-light);
    box-shadow: var(--shadow-up);
    z-index: 100;
    justify-content: space-around;
    align-items: center;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    background: none;
    border: none;
    font-size: 0.65rem;
    gap: 4px;
    flex: 1;
    height: 100%;
    cursor: pointer;
}

.nav-item i {
    font-size: 1.1rem;
    transition: var(--transition-fast);
}

.nav-item:hover, .nav-item.active {
    color: var(--primary);
}

/* Mobile cart trigger floating bar */
.mobile-cart-bar {
    display: none;
    position: fixed;
    bottom: 66px; /* Positioned above mobile bottom nav */
    left: 12px;
    right: 12px;
    background: rgba(220, 38, 38, 0.95);
    backdrop-filter: blur(8px);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    color: white;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-md);
    z-index: 99;
}

.mobile-cart-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
}

.mobile-cart-info i {
    font-size: 1rem;
}

.mobile-cart-bar .btn {
    background: white;
    color: var(--primary);
    font-weight: 700;
}

/* ==========================================
   AUTHENTICATION POPUP MODAL (LOGIN/REGISTER)
   ========================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-normal);
}

.modal-overlay.open, .modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

#winner-ticket-modal {
    z-index: 1100;
}

.modal-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    width: 90%;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: scaleUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scaleUp {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-light);
    padding: 12px 16px;
    background: #f8fafc;
}

.modal-tabs {
    display: flex;
    gap: 12px;
}

.modal-tab-btn {
    background: none;
    border: none;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-secondary);
    padding: 4px 8px;
    cursor: pointer;
    position: relative;
}

.modal-tab-btn.active {
    color: var(--primary);
}

.modal-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -13px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

.btn-close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--text-secondary);
    cursor: pointer;
}

.modal-body {
    padding: 20px;
}

/* ==========================================
   PAYMENT OVERLAY MODAL
   ========================================== */
.payment-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-normal);
}

.payment-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.payment-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    width: 92%;
    max-width: 440px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
}

.payment-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff5f5;
}

.payment-icon-title {
    font-size: 1.3rem;
    color: var(--primary);
}

.payment-header h2 {
    font-size: 1rem;
    color: var(--text-primary);
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
}

.payment-body {
    padding: 16px;
}

.order-code-banner {
    background: #fef2f2;
    border: 1px dashed var(--primary);
    color: var(--primary);
    padding: 10px;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    text-align: center;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: 0.5px;
}

.qr-container {
    text-align: center;
    margin: 16px 0;
    position: relative;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 12px;
}

.qr-container img {
    max-width: 210px;
    height: auto;
    display: block;
    z-index: 2;
}

.qr-loading {
    position: absolute;
    color: var(--text-secondary);
    font-size: 0.8rem;
    z-index: 1;
}

.bank-details-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    padding: 6px 0;
    border-bottom: 1px solid #f1f5f9;
}

.detail-item span {
    color: var(--text-secondary);
}

.detail-item strong {
    color: var(--text-primary);
}

.btn-copy {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 2px 4px;
    margin-left: 4px;
}

.btn-copy:hover {
    color: var(--primary);
}

.payment-status-tracker {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #f8fafc;
    padding: 10px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 0.8rem;
    border: 1px solid var(--border-light);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: var(--radius-circle);
    background: #cbd5e1;
}

.status-dot.pulsing {
    background: var(--primary);
    animation: dotPulse 1.2s infinite;
}

@keyframes dotPulse {
    0% { transform: scale(0.9); opacity: 0.6; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.6; }
}

.payment-instructions h4 {
    font-size: 0.8rem;
    margin-bottom: 6px;
}

.payment-instructions li {
    font-size: 0.72rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
    margin-left: 14px;
}

.payment-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--border-light);
    display: flex;
    gap: 8px;
    background: #f8fafc;
}

.payment-footer .btn {
    flex: 1;
}

/* ==========================================
   TOAST NOTIFICATION SYSTEM
   ========================================== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: white;
    border-left: 4px solid var(--primary);
    box-shadow: var(--shadow-lg);
    padding: 12px 20px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 250px;
    max-width: 320px;
    animation: slideInRight 0.25s ease-out;
}

.toast.toast-error {
    border-left-color: #ef4444;
}

@keyframes slideInRight {
    from { transform: translateX(120%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ==========================================
   RESPONSIVE DESIGN MEDIA QUERIES
   ========================================== */
@media (max-width: 992px) {
    .quick-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .jackpot-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .purchase-layout {
        grid-template-columns: 1fr;
    }
    .purchase-sidebar-col {
        position: static;
        margin-top: 16px;
    }
    .account-grid-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .app-header {
        display: none;
    }
    
    .mobile-top-bar {
        display: flex;
    }
    
    .mobile-bottom-nav {
        display: flex;
    }
    
    .app-main {
        margin-top: 72px; /* Top spacing for mobile bar */
        margin-bottom: 80px; /* Bottom spacing for mobile navigation */
        padding: 0 12px;
    }
    
    .banner-carousel {
        height: 150px;
        margin-bottom: 16px;
    }
    
    .slide {
        padding: 16px;
    }
    
    .slide-content h2 {
        font-size: 1.25rem;
        margin-bottom: 4px;
    }
    
    .slide-content p {
        font-size: 0.75rem;
        margin-bottom: 12px;
    }
    
    .slide-content .btn {
        padding: 6px 12px;
        font-size: 0.72rem;
    }
    
    .quick-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }
    
    .grid-item {
        padding: 10px 4px;
        border-radius: var(--radius-sm);
    }
    
    .grid-icon {
        width: 38px;
        height: 38px;
        font-size: 1rem;
        margin-bottom: 4px;
    }
    
    .grid-label {
        font-size: 0.65rem;
    }
    
    .grid-desc {
        display: none; /* Hide descriptions on mobile grid */
    }
    
    .jackpot-grid {
        grid-template-columns: 1fr;
    }
    
    .steps-grid {
        grid-template-columns: 1fr;
    }
    
    .step-card {
        padding: 20px 12px;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    /* Purchase views */
    .purchase-main-col {
        padding: 12px;
        border-radius: var(--radius-sm);
    }
    
    .balls-grid {
        grid-template-columns: repeat(7, 1fr); /* 7 columns on mobile */
        gap: 6px;
    }
    
    .ball-item {
        font-size: 0.8rem;
    }
    
    .purchase-sidebar-col {
        display: none; /* Hide desktop sidebar on mobile, toggleable instead */
    }
    
    .purchase-sidebar-col.open-mobile {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        z-index: 101;
        background: rgba(15, 23, 42, 0.45);
        backdrop-filter: blur(4px);
        margin-top: 0;
    }
    
    .purchase-sidebar-col.open-mobile .checkout-card {
        width: 90%;
        max-width: 360px;
        height: 90vh;
        margin: 5vh auto;
        overflow-y: auto;
        animation: scaleUp 0.25s ease;
    }
    
    .mobile-cart-bar {
        display: flex;
    }
    
    .toast-container {
        top: auto;
        bottom: 74px;
        right: 12px;
        left: 12px;
        align-items: center;
    }
    
    .toast {
        min-width: 90%;
    }
}

/* ==========================================
   TICKET BOARDS SELECTOR (A-F)
   ========================================== */
.boards-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1.5px solid var(--border-light);
}

.draws-select-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.draws-select-group.hidden {
    display: none !important;
}

.draws-select-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.draws-select {
    width: auto;
    min-width: 100px;
    font-weight: 700;
    color: var(--primary);
    border: 1px solid var(--primary);
    background-color: #fef2f2;
}

.boards-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.board-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    cursor: pointer;
    transition: var(--transition-fast);
    user-select: none;
}

.board-row:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.board-row.active {
    border-color: var(--primary);
    background: #fff5f5;
    box-shadow: 0 0 0 1px var(--primary-glow);
}

.board-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-weight: 800;
    font-size: 0.85rem;
    background: #f1f5f9;
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
    transition: var(--transition-fast);
}

.board-row.active .board-letter {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.board-numbers {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
}

.board-numbers.has-numbers {
    color: var(--text-primary);
    font-style: normal;
    font-weight: 600;
}

.board-num-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: white;
    border: 1.5px solid var(--primary);
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: var(--shadow-sm);
}

.board-num-badge.lotto-special {
    background: #fffbeb !important;
    border: 1.5px solid #d97706 !important;
    color: #b45309 !important;
}


.board-special-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 20px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #b45309;
    font-size: 0.8rem;
    font-weight: 700;
}

.board-play-type-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    background: #f1f5f9;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
}

.board-price {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-secondary);
    min-width: 45px;
    text-align: right;
}

.board-row.active .board-price {
    color: var(--primary);
}

.btn-board-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--border-light);
    background: white;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-board-action:hover {
    background: #ffe4e6;
    border-color: #fecdd3;
    color: var(--primary);
}

.btn-board-action i {
    font-size: 0.8rem;
}

.board-active-title {
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    border-left: 3px solid var(--primary);
    padding-left: 8px;
}

/* For brand logo placement */
.brand-logo-img {
    height: 38px;
    width: auto;
    object-fit: contain;
    border-radius: 4px;
}

.brand-logo-img-mobile {
    height: 32px;
    width: auto;
    object-fit: contain;
    border-radius: 4px;
}

@media (max-width: 768px) {
    .board-row {
        gap: 6px;
        padding: 8px 10px;
    }
    .board-numbers {
        gap: 4px;
        font-size: 0.8rem;
    }
    .board-num-badge {
        width: 20px;
        height: 20px;
        font-size: 0.7rem;
    }
    .board-play-type-label {
        font-size: 0.65rem;
        padding: 2px 5px;
    }
    .board-price {
        font-size: 0.8rem;
        min-width: 35px;
    }
    .btn-board-action {
        width: 24px;
        height: 24px;
    }
}

/* ==========================================
   CAROUSEL BANNER UPGRADE (THẦN TÀI LỄ HỘI)
   ========================================== */
.banner-carousel {
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    height: 240px;
    border: 1px solid var(--border-light);
    margin-bottom: 28px;
    box-shadow: var(--shadow-sm);
}
.carousel-container {
    width: 100%;
    height: 100%;
    position: relative;
}
.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    z-index: 1;
    transition: opacity 0.8s ease-in-out;
    display: flex;
    align-items: center;
    padding: 32px;
    box-sizing: border-box;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.carousel-slide.active {
    opacity: 1;
    z-index: 2;
}

/* Thần Tài Slide specific style */
.carousel-slide.slide-than-tai {
    background: linear-gradient(135deg, #7f1d1d 0%, #dc2626 50%, #991b1b 100%) !important;
}

.slide-content-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 100%;
    gap: 20px;
    position: relative;
}

/* Floating Gold Coins style */
.gold-coin {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, #fef08a 0%, #eab308 50%, #ca8a04 100%);
    border: 1px solid #fef08a;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35), 
                inset 0 2px 2px rgba(255, 255, 255, 0.6), 
                inset 0 -2px 2px rgba(0, 0, 0, 0.2);
    z-index: 5;
    pointer-events: none;
}
.gold-coin::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    width: 25%;
    height: 25%;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.coin-1 { width: 32px; height: 32px; top: 10%; left: 6%; animation: float-coin-1 6s ease-in-out infinite; }
.coin-2 { width: 20px; height: 20px; top: 75%; left: 12%; animation: float-coin-2 5s ease-in-out infinite; }
.coin-3 { width: 28px; height: 28px; top: 15%; left: 52%; animation: float-coin-3 7s ease-in-out infinite; }
.coin-4 { width: 34px; height: 34px; top: 68%; left: 45%; animation: float-coin-4 8s ease-in-out infinite; }
.coin-5 { width: 22px; height: 22px; top: 40%; left: 88%; animation: float-coin-5 4.5s ease-in-out infinite; }

@keyframes float-coin-1 {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(180deg); }
    100% { transform: translateY(0px) rotate(360deg); }
}
@keyframes float-coin-2 {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(-120deg); }
    100% { transform: translateY(0px) rotate(-240deg); }
}
@keyframes float-coin-3 {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(150deg); }
    100% { transform: translateY(0px) rotate(300deg); }
}
@keyframes float-coin-4 {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-12px) rotate(-90deg); }
    100% { transform: translateY(0px) rotate(-180deg); }
}
@keyframes float-coin-5 {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(200deg); }
    100% { transform: translateY(0px) rotate(400deg); }
}

.slide-glass-card {
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    padding: 22px 26px;
    max-width: 460px;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.3);
    z-index: 10;
    margin-left: 20px;
    text-align: left;
}

/* Glass card Thần Tài specific design */
.slide-glass-card-luck {
    background: rgba(15, 23, 42, 0.65) !important;
    border: 1px solid rgba(250, 204, 21, 0.4) !important; /* Gold border */
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5), 0 0 20px rgba(250, 204, 21, 0.15) !important;
}

.slide-badge-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.slide-badge-gold {
    background: linear-gradient(90deg, #eab308, #ca8a04) !important;
    color: #0f172a !important;
    border: 1px solid rgba(250, 204, 21, 0.6) !important;
    font-weight: 800 !important;
}

.slide-glass-card h2 {
    font-size: 1.65rem;
    font-weight: 800;
    color: #ffffff !important;
    margin-bottom: 8px;
    line-height: 1.35;
    text-shadow: none !important;
}

/* Gold Gradient Title style */
.slide-gold-title {
    background: linear-gradient(to right, #ffe066 0%, #f59e0b 50%, #ffe066 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 900 !important;
    text-shadow: none !important;
}

.slide-glass-card p {
    color: #cbd5e1 !important;
    font-size: 0.9rem;
    margin-bottom: 18px;
    line-height: 1.5;
    text-shadow: none !important;
}

/* Glow CTA Button style */
.btn-gold-action {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    color: #0f172a !important;
    font-weight: 800 !important;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4) !important;
    border: none !important;
    transition: all 0.2s ease !important;
}
.btn-gold-action:hover {
    background: linear-gradient(135deg, #d97706, #b45309) !important;
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.6) !important;
    transform: translateY(-2px) !important;
}

.slide-graphic {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    height: 100%;
}
.slide-graphic img {
    max-height: 220px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.4));
    animation: float 3s ease-in-out infinite;
}

/* Halo lighting effect on Thần Tài */
.slide-than-tai .slide-graphic img {
    max-height: 235px !important;
    filter: drop-shadow(0 0 25px rgba(250, 204, 21, 0.75)) drop-shadow(0 10px 15px rgba(0, 0, 0, 0.4)) !important;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

/* Keno Slide specific style */
.carousel-slide.slide-keno {
    background: linear-gradient(135deg, #ea580c 0%, #f97316 50%, #c2410c 100%) !important;
}
.slide-glass-card-keno {
    background: rgba(15, 23, 42, 0.65) !important;
    border: 1px solid rgba(249, 115, 22, 0.45) !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5), 0 0 20px rgba(249, 115, 22, 0.15) !important;
}
.slide-badge-orange {
    background: linear-gradient(90deg, #f97316, #ea580c) !important;
    color: #ffffff !important;
    border: 1px solid rgba(249, 115, 22, 0.6) !important;
    font-weight: 800 !important;
}
.slide-orange-title {
    background: linear-gradient(to right, #fed7aa 0%, #f97316 50%, #fed7aa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 900 !important;
    text-shadow: none !important;
}
.btn-orange-action {
    background: linear-gradient(135deg, #f97316, #ea580c) !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    box-shadow: 0 4px 14px rgba(249, 115, 22, 0.4) !important;
    border: none !important;
    transition: all 0.2s ease !important;
}
.btn-orange-action:hover {
    background: linear-gradient(135deg, #ea580c, #c2410c) !important;
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.6) !important;
    transform: translateY(-2px) !important;
}

/* Keno Balls Graphic */
.keno-balls-graphic {
    display: flex;
    gap: 15px;
    position: relative;
    justify-content: center;
    align-items: center;
    height: 100%;
    padding-right: 20px;
}
.keno-ball {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #ffffff 0%, #ffe7db 40%, #f97316 80%, #ea580c 100%);
    color: #ffffff;
    font-weight: 900;
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 16px rgba(0,0,0,0.4), inset 0 2px 2px rgba(255,255,255,0.7);
    border: 1.5px solid #ffedd5;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}
.keno-ball.b-1 { animation: float-ball-1 4s ease-in-out infinite; }
.keno-ball.b-2 { animation: float-ball-2 3.5s ease-in-out infinite; }
.keno-ball.b-3 { animation: float-ball-3 4.5s ease-in-out infinite; }
.keno-ball.b-4 { animation: float-ball-4 3.8s ease-in-out infinite; }

@keyframes float-ball-1 {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-12px) rotate(15deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}
@keyframes float-ball-2 {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(-15deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}
@keyframes float-ball-3 {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(20deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}
@keyframes float-ball-4 {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(-20deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

/* Jackpot Slide specific style */
.carousel-slide.slide-jackpot {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 50%, #4f46e5 100%) !important;
}
.slide-glass-card-jackpot {
    background: rgba(15, 23, 42, 0.65) !important;
    border: 1px solid rgba(59, 130, 246, 0.4) !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5), 0 0 20px rgba(59, 130, 246, 0.15) !important;
}
.slide-badge-blue {
    background: linear-gradient(90deg, #3b82f6, #1d4ed8) !important;
    color: #ffffff !important;
    border: 1px solid rgba(59, 130, 246, 0.6) !important;
    font-weight: 800 !important;
}
.slide-blue-title {
    background: linear-gradient(to right, #dbeafe 0%, #60a5fa 50%, #dbeafe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 900 !important;
    text-shadow: none !important;
}
.btn-blue-action {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8) !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4) !important;
    border: none !important;
    transition: all 0.2s ease !important;
}
.btn-blue-action:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af) !important;
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6) !important;
    transform: translateY(-2px) !important;
}

/* Jackpot Trophy Graphic */
.jackpot-trophy-graphic {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    padding-right: 30px;
}
.jackpot-trophy-graphic i {
    font-size: 7.5rem !important;
    color: #f59e0b !important;
    filter: drop-shadow(0 0 25px rgba(245, 158, 11, 0.7)) drop-shadow(0 8px 16px rgba(0,0,0,0.4)) !important;
    animation: float-trophy 3s ease-in-out infinite;
}
@keyframes float-trophy {
    0% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-10px) scale(1.03); }
    100% { transform: translateY(0px) scale(1); }
}

/* Sparkles */
.sparkle {
    position: absolute;
    color: #ffe066;
    font-size: 1.5rem;
    font-weight: bold;
    animation: flash-sparkle 2s infinite;
    text-shadow: 0 0 10px rgba(254, 240, 138, 0.8);
    pointer-events: none;
}
.sparkle.sp-1 { top: 15%; right: 20%; animation-delay: 0s; }
.sparkle.sp-2 { bottom: 20%; right: 80%; animation-delay: 0.5s; }
.sparkle.sp-3 { top: 50%; right: 10%; animation-delay: 1s; }

@keyframes flash-sparkle {
    0%, 100% { opacity: 0.2; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
}
.carousel-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 8px;
}
.carousel-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
}
.carousel-dots .dot.active {
    background: #ffffff;
    width: 18px;
    border-radius: 4px;
}

/* ==========================================
   PRODUCT LOBBY (GAME LOBBY)
   ========================================== */
.purchase-lobby {
    padding: 10px 0 30px;
}
.lobby-header {
    margin-bottom: 25px;
    text-align: left;
}
.lobby-header h2 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 6px;
}
.lobby-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 15px;
}
.category-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 30px 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.04), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
}
.category-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-active);
    box-shadow: 0 10px 15px -3px rgba(220, 38, 38, 0.05), 0 4px 6px -2px rgba(220, 38, 38, 0.03);
}
.category-card .cat-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    transition: all 0.3s ease;
}
.card-cat-vietlott .cat-icon {
    background: #fef2f2;
    color: #dc2626;
}
.card-cat-loto .cat-icon {
    background: #eff6ff;
    color: #2563eb;
}
.card-cat-xskt .cat-icon {
    background: #f0fdf4;
    color: #16a34a;
}
.category-card:hover .cat-icon {
    transform: scale(1.08);
}
.category-card .cat-info {
    flex: 1;
    text-align: left;
}
.category-card h3 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 6px;
    letter-spacing: -0.2px;
}
.category-card p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.4;
}
.category-card .cat-arrow {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s ease;
}
.category-card:hover .cat-arrow {
    color: var(--primary);
}

.lobby-sub-view {
    animation: fadeIn 0.4s ease-out;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.lobby-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
.lobby-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 24px 20px 20px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    cursor: pointer;
}
.lobby-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(220, 38, 38, 0.05), 0 4px 6px -2px rgba(220, 38, 38, 0.03);
    border-color: var(--border-active);
}
.lobby-card .card-badge {
    position: absolute;
    top: 10px;
    right: 12px;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 20px;
    letter-spacing: 0.5px;
}
.badge-keno { background: #ffedd5; color: #ea580c; }
.badge-mega { background: #dbeafe; color: #1d4ed8; }
.badge-power { background: #ffe4e6; color: #e11d48; }
.badge-max3d { background: #f3e8ff; color: #7e22ce; }
.badge-max3dpro { background: #faf5ff; color: #6b21a8; border: 1px solid #d8b4fe; }
.badge-lotto { background: #d1fae5; color: #047857; }
.badge-loto-tc { background: #f0fdf4; color: #15803d; }
.badge-xskt { background: #f1f5f9; color: #475569; }

.lobby-card .card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 16px;
    background: #f8fafc;
}
.card-keno .card-icon { color: #ea580c; background: #fff7ed; }
.card-mega .card-icon { color: #1d4ed8; background: #eff6ff; }
.card-power .card-icon { color: #dc2626; background: #fef2f2; }
.card-max3d .card-icon { color: #7e22ce; background: #faf5ff; }
.card-max3dpro .card-icon { color: #6b21a8; background: #faf5ff; }
.card-lotto .card-icon { color: #059669; background: #ecfdf5; }
.card-loto-tc .card-icon { color: #16a34a; background: #f0fdf4; }
.card-xskt .card-icon { color: #4b5563; background: #f3f4f6; }

.lobby-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 6px;
}
.lobby-card .card-desc {
    color: var(--text-secondary);
    font-size: 0.82rem;
    line-height: 1.4;
    margin-bottom: 12px;
    min-height: 38px;
}
.lobby-card .card-jackpot {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 10px;
    letter-spacing: -0.2px;
}
.text-keno { color: #ea580c; }
.text-mega { color: #1d4ed8; }
.text-power { color: #dc2626; }
.text-max3d { color: #7e22ce; font-size: 0.95rem; font-weight: 600; }
.text-max3dpro { color: #6b21a8; font-size: 0.95rem; font-weight: 600; }
.text-lotto { color: #059669; }
.text-loto-tc { color: #16a34a; font-size: 0.95rem; font-weight: 600; }
.text-xskt { color: #4b5563; font-size: 0.95rem; font-weight: 600; }

.lobby-card .card-timer {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.lobby-card .card-timer .countdown {
    font-weight: 700;
}
.lobby-card .btn-buy {
    margin-top: auto;
    font-weight: 700;
    border-radius: var(--radius-sm);
    padding: 10px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #f8fafc;
    border: 1px solid var(--border-light);
    color: var(--text-dark);
    transition: all 0.2s ease;
}
.lobby-card:hover .btn-buy {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

.tab-item-back {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #475569;
    font-weight: 700;
    font-size: 0.82rem;
    padding: 8px 14px;
    border-radius: 20px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-right: 8px;
    transition: all 0.2s ease;
}
.tab-item-back:hover {
    background: #e2e8f0;
    color: #0f172a;
}

/* ==========================================
   REDESIGNED AUTH MODAL FORMS
   ========================================== */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.auth-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.auth-form .form-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #475569;
}
.input-icon-wrapper {
    position: relative;
    width: 100%;
}
.input-icon-wrapper .input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.95rem;
    pointer-events: none;
    transition: color 0.2s ease;
}
.auth-form .form-control {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #cbd5e1;
    font-size: 0.9rem;
    font-family: inherit;
    transition: all 0.2s ease;
    box-sizing: border-box;
}
.auth-form .form-control.pl-10 {
    padding-left: 40px !important;
}
.auth-form .form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.08);
}
.auth-form .form-control:focus + .input-icon {
    color: var(--primary);
}
.form-options-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 4px 0;
}
.checkbox-container {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 24px;
    cursor: pointer;
    font-size: 0.82rem;
    color: #334155;
    user-select: none;
}
.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}
.checkmark {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 16px;
    width: 16px;
    background-color: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    transition: all 0.2s ease;
}
.checkbox-container:hover input ~ .checkmark {
    background-color: #e2e8f0;
}
.checkbox-container input:checked ~ .checkmark {
    background-color: var(--primary);
    border-color: var(--primary);
}
.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}
.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}
.checkbox-container .checkmark:after {
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.forgot-password-link {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}
.forgot-password-link:hover {
    color: #b91c1c;
    text-decoration: underline;
}
.btn-auth-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: 0 4px 6px -1px rgba(220, 38, 38, 0.15);
    transition: all 0.2s ease;
}
.btn-auth-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 10px -1px rgba(220, 38, 38, 0.25);
}
.auth-terms-text {
    color: #64748b;
    line-height: 1.5;
}
.text-red {
    color: var(--primary);
}
.hover-underline:hover {
    text-decoration: underline;
}

/* Modal UI tweaks */
.modal-card {
    border-radius: 16px !important;
    border: none !important;
    box-shadow: 0 20px 25px -5px rgba(220, 38, 38, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
}
#auth-modal .modal-card {
    max-height: 90vh;
    overflow-y: auto;
}
.modal-header {
    border-bottom: 1px solid #f1f5f9 !important;
    background: #ffffff !important;
    padding: 18px 20px 14px !important;
}
.modal-tabs {
    gap: 16px !important;
}
.modal-tab-btn {
    font-size: 1.05rem !important;
    padding: 4px 0 !important;
}
.modal-tab-btn.active::after {
    bottom: -15px !important;
    height: 3px !important;
    border-radius: 2px !important;
}

/* Mobile responsive fixes for Lobby & Slides */
@media (max-width: 768px) {
    .banner-carousel {
        height: 200px;
        margin-bottom: 20px;
    }
    .carousel-slide {
        padding: 12px;
    }
    .slide-glass-card {
        padding: 12px 16px;
        margin-left: 0;
        width: 100% !important;
        max-width: 100% !important;
        background: rgba(15, 23, 42, 0.75);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4) !important;
    }
    .slide-glass-card h2 {
        font-size: 1.15rem !important;
        margin-bottom: 6px;
    }
    .slide-glass-card p {
        font-size: 0.75rem !important;
        margin-bottom: 8px;
        line-height: 1.4 !important;
    }
    .slide-glass-card .slide-badge-tag {
        font-size: 0.65rem !important;
        padding: 2px 8px !important;
        margin-bottom: 6px !important;
    }
    .slide-glass-card .btn {
        padding: 6px 12px !important;
        font-size: 0.8rem !important;
    }
    .slide-graphic {
        position: absolute !important;
        right: 0 !important;
        bottom: 0 !important;
        width: auto !important;
        height: auto !important;
        max-width: 140px !important;
        max-height: 120px !important;
        opacity: 0.35 !important;
        z-index: 1 !important;
        display: flex !important;
        justify-content: flex-end !important;
        align-items: flex-end !important;
        pointer-events: none !important;
    }
    .slide-graphic img {
        max-height: 110px !important;
        width: auto !important;
        object-fit: contain !important;
    }
    .keno-balls-graphic {
        padding-right: 0 !important;
        gap: 6px !important;
        transform: scale(0.6) translate(20px, 20px) !important;
    }
    .jackpot-trophy-graphic {
        padding-right: 0 !important;
        transform: scale(0.6) translate(20px, 20px) !important;
    }
    .jackpot-trophy-graphic i {
        font-size: 5rem !important;
    }
    .category-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .category-card {
        padding: 20px 16px;
        gap: 14px;
    }
    .category-card .cat-icon {
        width: 48px;
        height: 48px;
        font-size: 1.4rem;
        border-radius: 12px;
    }
    .category-card h3 {
        font-size: 1.1rem;
    }
    .lobby-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .lobby-card {
        padding: 18px 16px 16px;
    }
    .lobby-card .card-desc {
        min-height: auto;
    }
    .lobby-header h2 {
        font-size: 1.3rem;
    }
    .lobby-header p {
        font-size: 0.85rem;
    }
    .tab-item-back {
        padding: 6px 10px;
        font-size: 0.75rem;
    }
}

/* ==========================================================================
   DIRECT CHECKOUT & VIRTUAL TICKET STYLING
   ========================================================================== */

/* Direct checkout modal */
#direct-checkout-modal {
    z-index: 1500;
}

/* Hide cart and sidebar */
.purchase-sidebar-col, #cart-sidebar {
    display: none !important;
}
.mobile-cart-bar {
    display: none !important;
}

/* Virtual Ticket (Vietlott & Lotto) styling */
.virtual-ticket-card {
    background-color: #fffdf5; /* Warm off-white paper texture */
    border: 1px solid #e8e4d9;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05), inset 0 0 40px rgba(0,0,0,0.01);
    max-width: 520px;
    margin: 20px auto;
    padding: 24px;
    position: relative;
    overflow: hidden;
    font-family: 'Outfit', sans-serif;
}

.virtual-ticket-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: var(--primary);
}

.virtual-ticket-card.keno-ticket::before { background: #ea580c; }
.virtual-ticket-card.mega-ticket::before { background: #dc2626; }
.virtual-ticket-card.power-ticket::before { background: #0284c7; }
.virtual-ticket-card.lotto-ticket::before { background: #10b981; }
.virtual-ticket-card.max3d-ticket::before { background: #e02222; }
.virtual-ticket-card.max3dpro-ticket::before { background: #1a237e; }

.virtual-ticket-card .ticket-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px dashed #e2decb;
    padding-bottom: 12px;
    margin-bottom: 16px;
}

.virtual-ticket-card .vietlott-logo {
    font-weight: 900;
    font-size: 1.1rem;
    color: #b91c1c;
    letter-spacing: 1px;
}
.virtual-ticket-card.power-ticket .vietlott-logo { color: #0284c7; }
.virtual-ticket-card.keno-ticket .vietlott-logo { color: #ea580c; }
.virtual-ticket-card.lotto-ticket .vietlott-logo { color: #10b981; }
.virtual-ticket-card.max3d-ticket .vietlott-logo { color: #e02222; }
.virtual-ticket-card.max3dpro-ticket .vietlott-logo { color: #1a237e; }

.virtual-ticket-card .ticket-game-name {
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: 0.5px;
}

.virtual-ticket-card .ticket-draw-info {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.virtual-ticket-card .ticket-body {
    min-height: 150px;
}

.virtual-ticket-card .ticket-barcode {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 2px dashed #e2decb;
    text-align: center;
}

.virtual-ticket-card .barcode-lines {
    background: repeating-linear-gradient(90deg, 
        #000, #000 2px, 
        transparent 2px, transparent 4px,
        #000 4px, #000 5px, 
        transparent 5px, transparent 8px,
        #000 8px, #000 11px, 
        transparent 11px, transparent 13px
    );
    height: 38px;
    width: 80%;
    margin: 0 auto 6px auto;
}

.virtual-ticket-card .barcode-text {
    font-family: monospace;
    font-size: 0.75rem;
    letter-spacing: 2px;
    color: var(--text-secondary);
}

/* XS Kiến Thiết selection grid */
.xskt-date-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 8px;
    overflow-x: auto;
}

.xskt-date-tab {
    flex-shrink: 0;
    border: none;
    background: #f1f5f9;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.xskt-date-tab.active {
    background: var(--primary);
    color: white;
}

.xskt-provinces-pills {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 6px;
}

.xskt-province-pill {
    flex-shrink: 0;
    border: 1px solid var(--border-light);
    background: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.xskt-province-pill.active {
    background: #fee2e2;
    color: var(--primary);
    border-color: var(--border-active);
}

.xskt-tickets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
    background: #f1f5f9;
    padding: 16px;
    border-radius: 12px;
    max-height: 280px;
    overflow-y: auto;
}

.xskt-ticket-card {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 12px;
    position: relative;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    min-height: 70px;
}

.xskt-ticket-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transform: translateY(-1px);
}

.xskt-ticket-card.active {
    border-color: var(--primary);
    background: #fff5f5;
    box-shadow: 0 0 0 1px var(--primary-glow);
}

.xskt-ticket-copies {
    position: absolute;
    top: 4px;
    right: 8px;
    font-size: 0.65rem;
    font-weight: 800;
    color: #94a3b8;
}

.xskt-ticket-card.active .xskt-ticket-copies {
    color: var(--primary);
}

.xskt-ticket-number {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: #1e293b;
}

.xskt-ticket-card.active .xskt-ticket-number {
    color: var(--primary);
}

/* Horizontal XS Kiến Thiết virtual ticket */
.xskt-virtual-ticket-preview {
    background: linear-gradient(135deg, #fffcf3, #fffcf9);
    border: 2px dashed #b91c1c;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    position: relative;
    box-shadow: 0 8px 20px rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.xskt-ticket-visual-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px dashed #cbd5e1;
    padding-bottom: 8px;
}

.xskt-ticket-visual-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: #b91c1c;
}

.xskt-ticket-visual-draw-date {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.xskt-ticket-visual-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

.xskt-ticket-visual-province {
    font-size: 1.2rem;
    font-weight: 900;
    color: #0f172a;
}

.xskt-ticket-visual-num-container {
    background: #fee2e2;
    border: 2px solid var(--primary);
    border-radius: 8px;
    padding: 6px 16px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

.xskt-ticket-visual-num {
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: 4px;
    color: #dc2626;
    line-height: 1.2;
}

.xskt-ticket-visual-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-top: 1px dashed #cbd5e1;
    padding-top: 8px;
}

.xskt-ticket-visual-price {
    color: #b91c1c;
    font-weight: 700;
}

.xskt-ticket-quantity-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    background: #f8fafc;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-light);
}

.xskt-ticket-quantity-row label {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.xskt-quantity-picker {
    display: flex;
    align-items: center;
    gap: 10px;
}

.xskt-qty-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid #cbd5e1;
    background: white;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: var(--transition-fast);
}

.xskt-qty-btn:hover:not(:disabled) {
    background: #cbd5e1;
}

.xskt-qty-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.xskt-qty-val {
    font-weight: 800;
    font-size: 0.95rem;
    width: 24px;
    text-align: center;
}

/* Modal Selector Styles */
.modal-card-selector {
    max-width: 550px !important;
    width: 95%;
    border-radius: 20px !important;
    overflow: hidden;
}

.modal-card-selector .modal-body {
    padding: 24px !important;
}

.modal-card-selector .selector-wrapper-inline {
    display: block !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin-top: 0 !important;
}

.modal-card-selector .board-active-title {
    display: none !important;
}


/* ==========================================================================
   PREMIUM PRODUCT HIGHLIGHTS & UNIQUE STYLING OVERRIDES (NÉT RIÊNG SẢN PHẨM)
   ========================================================================== */

/* 1. Category Cards (Vietlott, Loto, XSKT) */
.category-card {
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
    border-radius: 20px !important;
}

/* Shine effect helper */
.category-card::after, .lobby-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.3) 50%, rgba(255, 255, 255, 0) 100%);
    transform: skewX(-25deg);
    transition: 0.75s;
    pointer-events: none;
    z-index: 5;
}
.category-card:hover::after, .lobby-card:hover::after {
    left: 150%;
    transition: all 0.75s ease;
}

/* Vietlott Category: Ruby Red theme */
.category-card.card-cat-vietlott {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.05) 0%, rgba(254, 242, 242, 0.4) 100%) !important;
    border: 1.5px solid rgba(239, 68, 68, 0.18) !important;
}
.category-card.card-cat-vietlott:hover {
    border-color: rgba(239, 68, 68, 0.5) !important;
    box-shadow: 0 15px 35px rgba(239, 68, 68, 0.12), 0 5px 15px rgba(239, 68, 68, 0.05) !important;
    transform: translateY(-5px);
}
.card-cat-vietlott .cat-icon {
    background: linear-gradient(135deg, #ef4444, #b91c1c) !important;
    color: white !important;
    box-shadow: 0 5px 15px rgba(239, 68, 68, 0.3) !important;
}

/* Loto Category: Royal Blue theme */
.category-card.card-cat-loto {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(239, 246, 255, 0.4) 100%) !important;
    border: 1.5px solid rgba(37, 99, 235, 0.18) !important;
}
.category-card.card-cat-loto:hover {
    border-color: rgba(37, 99, 235, 0.5) !important;
    box-shadow: 0 15px 35px rgba(37, 99, 235, 0.12), 0 5px 15px rgba(37, 99, 235, 0.05) !important;
    transform: translateY(-5px);
}
.card-cat-loto .cat-icon {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8) !important;
    color: white !important;
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.3) !important;
}

/* XS Kiến Thiết Category: Emerald Green theme */
.category-card.card-cat-xskt {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, rgba(240, 253, 244, 0.4) 100%) !important;
    border: 1.5px solid rgba(16, 185, 129, 0.18) !important;
}
.category-card.card-cat-xskt:hover {
    border-color: rgba(16, 185, 129, 0.5) !important;
    box-shadow: 0 15px 35px rgba(16, 185, 129, 0.12), 0 5px 15px rgba(16, 185, 129, 0.05) !important;
    transform: translateY(-5px);
}
.card-cat-xskt .cat-icon {
    background: linear-gradient(135deg, #10b981, #047857) !important;
    color: white !important;
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.3) !important;
}

/* Mua Chung Category: Purple theme */
.category-card.card-cat-group-buy {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.05) 0%, rgba(245, 243, 255, 0.4) 100%) !important;
    border: 1.5px solid rgba(139, 92, 246, 0.18) !important;
}
.category-card.card-cat-group-buy:hover {
    border-color: rgba(139, 92, 246, 0.5) !important;
    box-shadow: 0 15px 35px rgba(139, 92, 246, 0.12), 0 5px 15px rgba(139, 92, 246, 0.05) !important;
    transform: translateY(-5px);
}
.card-cat-group-buy .cat-icon {
    background: linear-gradient(135deg, #8b5cf6, #6d28d9) !important;
    color: white !important;
    box-shadow: 0 5px 15px rgba(139, 92, 246, 0.3) !important;
}

/* 2. Individual Game Lobby Cards (Lobby Cards) */
.lobby-card {
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
    border-radius: 18px !important;
    border: 1.5px solid var(--border-light) !important;
}

/* Keno: Orange Amber gradient with Fire Spotlight */
.lobby-card.card-keno {
    background: linear-gradient(135deg, rgba(254, 243, 199, 0.55) 0%, #ffffff 65%, rgba(254, 242, 242, 0.45) 100%) !important;
    border-color: rgba(239, 68, 68, 0.3) !important;
    position: relative;
    overflow: hidden;
    transform: scale(1.02);
    z-index: 1;
}
.lobby-card.card-keno:hover {
    border-color: #ff4500 !important;
    box-shadow: 0 15px 35px rgba(239, 68, 68, 0.22), 0 5px 15px rgba(245, 158, 11, 0.1) !important;
    transform: translateY(-8px) scale(1.04) !important;
}
.lobby-card.card-keno .card-icon {
    background: linear-gradient(135deg, #ef4444, #ff4500, #ff8c00) !important;
    color: white !important;
    box-shadow: 0 5px 15px rgba(239, 68, 68, 0.35) !important;
}

/* Mega: Royal Crimson Blue gradient */
.lobby-card.card-mega {
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.04) 0%, #ffffff 80%, rgba(2, 132, 199, 0.02) 100%) !important;
    border-color: rgba(2, 132, 199, 0.15) !important;
}
.lobby-card.card-mega:hover {
    border-color: #0284c7 !important;
    box-shadow: 0 12px 25px rgba(2, 132, 199, 0.14) !important;
    transform: translateY(-6px);
}
.lobby-card.card-mega .card-icon {
    background: linear-gradient(135deg, #0284c7, #0369a1) !important;
    color: white !important;
    box-shadow: 0 4px 10px rgba(2, 132, 199, 0.25) !important;
}

/* Power: Deep Scarlet Ruby gradient */
.lobby-card.card-power {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.04) 0%, #ffffff 80%, rgba(220, 38, 38, 0.02) 100%) !important;
    border-color: rgba(220, 38, 38, 0.15) !important;
}
.lobby-card.card-power:hover {
    border-color: #dc2626 !important;
    box-shadow: 0 12px 25px rgba(220, 38, 38, 0.14) !important;
    transform: translateY(-6px);
}
.lobby-card.card-power .card-icon {
    background: linear-gradient(135deg, #dc2626, #991b1b) !important;
    color: white !important;
    box-shadow: 0 4px 10px rgba(220, 38, 38, 0.25) !important;
}

/* Max 3D: Purple Amethyst gradient */
.lobby-card.card-max3d {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.04) 0%, #ffffff 80%, rgba(168, 85, 247, 0.02) 100%) !important;
    border-color: rgba(168, 85, 247, 0.15) !important;
}
.lobby-card.card-max3d:hover {
    border-color: #a855f7 !important;
    box-shadow: 0 12px 25px rgba(168, 85, 247, 0.14) !important;
    transform: translateY(-6px);
}
.lobby-card.card-max3d .card-icon {
    background: linear-gradient(135deg, #a855f7, #7e22ce) !important;
    color: white !important;
    box-shadow: 0 4px 10px rgba(168, 85, 247, 0.25) !important;
}

/* Max 3D Pro: Deep Indigo Violet gradient */
.lobby-card.card-max3dpro {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.04) 0%, #ffffff 80%, rgba(236, 72, 153, 0.02) 100%) !important;
    border-color: rgba(236, 72, 153, 0.15) !important;
}
.lobby-card.card-max3dpro:hover {
    border-color: #ec4899 !important;
    box-shadow: 0 12px 25px rgba(236, 72, 153, 0.14) !important;
    transform: translateY(-6px);
}
.lobby-card.card-max3dpro .card-icon {
    background: linear-gradient(135deg, #ec4899, #be185d) !important;
    color: white !important;
    box-shadow: 0 4px 10px rgba(236, 72, 153, 0.25) !important;
}

/* Lotto 5/35: Emerald Mint gradient */
.lobby-card.card-lotto {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.04) 0%, #ffffff 80%, rgba(16, 185, 129, 0.02) 100%) !important;
    border-color: rgba(16, 185, 129, 0.15) !important;
}
.lobby-card.card-lotto:hover {
    border-color: #10b981 !important;
    box-shadow: 0 12px 25px rgba(16, 185, 129, 0.14) !important;
    transform: translateY(-6px);
}
.lobby-card.card-lotto .card-icon {
    background: linear-gradient(135deg, #10b981, #047857) !important;
    color: white !important;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.25) !important;
}

/* 3. Quick Grid Items (Home Page Category Grid) */
/* 3. Quick Grid Items (Home Page Category Grid) */
.grid-item {
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 20px !important;
    overflow: hidden;
    position: relative;
    background: linear-gradient(145deg, #ffffff, #f8fafc) !important;
    padding: 24px 12px 18px 12px !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03) !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
}

.grid-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: transparent;
    transition: background 0.3s ease;
}

.grid-item:hover {
    transform: translateY(-8px) !important;
    background: #ffffff !important;
}

/* Hover icons effect */
.grid-item:hover .grid-icon {
    transform: translateY(-3px) scale(1.08) rotate(5deg);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.grid-icon {
    width: 56px !important;
    height: 56px !important;
    font-size: 1.5rem !important;
    margin-bottom: 12px !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

/* Grid Badges styling */
.grid-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 0.58rem;
    font-weight: 850;
    padding: 2px 7px;
    border-radius: 6px;
    color: white;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 2px 5px rgba(0,0,0,0.12);
    z-index: 2;
}
.badge-orange { background: linear-gradient(135deg, #f59e0b, #d97706); }
.badge-blue { background: linear-gradient(135deg, #0284c7, #0369a1); }
.badge-red { background: linear-gradient(135deg, #dc2626, #991b1b); }
.badge-pink { background: linear-gradient(135deg, #ec4899, #be185d); }
.badge-teal { background: linear-gradient(135deg, #14b8a6, #0f766e); }
.badge-fire {
    background: linear-gradient(135deg, #ef4444, #ff4500, #ff8c00) !important;
    animation: pulseGlow 1.5s infinite ease-in-out !important;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.6) !important;
    color: white !important;
}

/* Color theme mappings for Quick Menu Grid Items */
.grid-item[data-game="keno"] {
    border: 2px solid #fdba74 !important;
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 50%, #fef3c7 100%) !important;
    box-shadow: 0 8px 20px rgba(249, 115, 22, 0.15), 0 0 12px rgba(249, 115, 22, 0.25) !important;
    z-index: 1;
    position: relative;
    overflow: hidden !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}
.grid-item[data-game="keno"]::before { 
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 5px !important;
    background: linear-gradient(90deg, #f97316, #ef4444) !important; 
    z-index: 3 !important;
}
.grid-item[data-game="keno"]::after {
    content: '' !important;
    position: absolute !important;
    top: -50% !important;
    left: -50% !important;
    width: 200% !important;
    height: 200% !important;
    background: radial-gradient(circle, rgba(249, 115, 22, 0.16) 0%, rgba(239, 68, 68, 0.08) 40%, transparent 70%) !important;
    animation: fireMove 6s infinite linear !important;
    z-index: 1 !important;
    pointer-events: none;
}
.grid-item[data-game="keno"] .grid-badge {
    z-index: 2;
}
.grid-item[data-game="keno"] .grid-icon,
.grid-item[data-game="keno"] .grid-label,
.grid-item[data-game="keno"] .grid-desc,
.grid-item[data-game="keno"] .grid-prize-max {
    position: relative;
    z-index: 2;
}
.grid-item[data-game="keno"] .keno-icon {
    background: radial-gradient(circle at 30% 30%, #ffedd5 0%, #f97316 70%, #ea580c 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(234, 88, 12, 0.3) !important;
}
.grid-item[data-game="keno"] .grid-label {
    color: inherit !important;
    text-shadow: none !important;
    font-weight: inherit !important;
}
.grid-item[data-game="keno"] .grid-desc {
    color: inherit !important;
    text-shadow: none !important;
    opacity: inherit !important;
}
.grid-item[data-game="keno"] .grid-prize-max {
    color: #ea580c !important;
    background: rgba(234, 88, 12, 0.1) !important;
    box-shadow: 0 0 8px rgba(234, 88, 12, 0.15) !important;
    font-size: 0.76rem !important;
    font-weight: 850 !important;
    animation: textPulse 1.5s infinite ease-in-out !important;
    border: none !important;
}
@keyframes fireMove {
    0% { transform: rotate(0deg) translate(0, 0); }
    50% { transform: rotate(180deg) translate(-2%, -2%); }
    100% { transform: rotate(360deg) translate(0, 0); }
}
@keyframes pulseGlow {
    0% { transform: scale(1); box-shadow: 0 0 5px rgba(239, 68, 68, 0.4); }
    50% { transform: scale(1.05); box-shadow: 0 0 12px rgba(239, 68, 68, 0.7); }
    100% { transform: scale(1); box-shadow: 0 0 5px rgba(239, 68, 68, 0.4); }
}
@keyframes flicker {
    0% { transform: scale(1) rotate(-1deg); filter: drop-shadow(0 1px 3px rgba(239, 68, 68, 0.5)) brightness(1); }
    50% { transform: scale(1.08) rotate(2deg); filter: drop-shadow(0 5px 12px rgba(245, 158, 11, 0.95)) brightness(1.25); }
    100% { transform: scale(0.95) rotate(-2deg); filter: drop-shadow(0 2px 5px rgba(239, 68, 68, 0.6)) brightness(1.05); }
}
.grid-item[data-game="keno"]:hover { 
    border-color: #f97316 !important; 
    box-shadow: 0 10px 25px rgba(249, 115, 22, 0.3), 0 0 20px rgba(249, 115, 22, 0.4) !important; 
    transform: translateY(-8px) scale(1.05) !important;
}

.grid-item[data-game="mega"] {
    border: 1.5px solid #bae6fd !important;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%) !important;
    box-shadow: 0 8px 20px rgba(14, 165, 233, 0.08) !important;
}
.grid-item[data-game="mega"]::before { 
    background: linear-gradient(90deg, #0ea5e9, #2563eb) !important; 
}
.grid-item[data-game="mega"] .mega-icon {
    background: radial-gradient(circle at 30% 30%, #e0f2fe 0%, #0ea5e9 70%, #0284c7 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(2, 132, 199, 0.3) !important;
}
.grid-item[data-game="mega"]:hover { 
    border-color: #0ea5e9 !important; 
    box-shadow: 0 12px 25px rgba(2, 132, 199, 0.2) !important; 
}

.grid-item[data-game="power"] {
    border: 1.5px solid #fecaca !important;
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%) !important;
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.08) !important;
}
.grid-item[data-game="power"]::before { 
    background: linear-gradient(90deg, #ef4444, #b91c1c) !important; 
}
.grid-item[data-game="power"] .power-icon {
    background: radial-gradient(circle at 30% 30%, #fee2e2 0%, #ef4444 70%, #dc2626 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(220, 38, 38, 0.3) !important;
}
.grid-item[data-game="power"]:hover { 
    border-color: #ef4444 !important; 
    box-shadow: 0 12px 25px rgba(239, 68, 68, 0.2) !important; 
}

.grid-item[data-game="max3d"] {
    border: 1.5px solid #e9d5ff !important;
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%) !important;
    box-shadow: 0 8px 20px rgba(168, 85, 247, 0.08) !important;
}
.grid-item[data-game="max3d"]::before { 
    background: linear-gradient(90deg, #a855f7, #7e22ce) !important; 
}
.grid-item[data-game="max3d"] .max3d-icon {
    background: radial-gradient(circle at 30% 30%, #f3e8ff 0%, #a855f7 70%, #7e22ce 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(168, 85, 247, 0.3) !important;
}
.grid-item[data-game="max3d"]:hover { 
    border-color: #a855f7 !important; 
    box-shadow: 0 12px 25px rgba(168, 85, 247, 0.2) !important; 
}

.grid-item[data-game="max3dpro"] {
    border: 1.5px solid #fbcfe8 !important;
    background: linear-gradient(135deg, #fdf2f8 0%, #fce7f3 100%) !important;
    box-shadow: 0 8px 20px rgba(236, 72, 153, 0.08) !important;
}
.grid-item[data-game="max3dpro"]::before { 
    background: linear-gradient(90deg, #ec4899, #be185d) !important; 
}
.grid-item[data-game="max3dpro"] .max3dpro-icon {
    background: radial-gradient(circle at 30% 30%, #fce7f3 0%, #ec4899 70%, #be185d 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(236, 72, 153, 0.3) !important;
}
.grid-item[data-game="max3dpro"]:hover { 
    border-color: #ec4899 !important; 
    box-shadow: 0 12px 25px rgba(236, 72, 153, 0.2) !important; 
}

.grid-item[data-game="lotto"] {
    border: 1.5px solid #bbf7d0 !important;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%) !important;
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.08) !important;
}
.grid-item[data-game="lotto"]::before { 
    background: linear-gradient(90deg, #10b981, #047857) !important; 
}
.grid-item[data-game="lotto"] .lotto-icon {
    background: radial-gradient(circle at 30% 30%, #dcfce7 0%, #10b981 70%, #047857 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3) !important;
}
.grid-item[data-game="lotto"]:hover { 
    border-color: #10b981 !important; 
    box-shadow: 0 12px 25px rgba(16, 185, 129, 0.2) !important; 
}

.grid-item[data-game="loto_tuchon"] {
    border: 1.5px solid #cbd5e1 !important;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%) !important;
    box-shadow: 0 8px 20px rgba(100, 116, 139, 0.08) !important;
}
.grid-item[data-game="loto_tuchon"]::before { 
    background: linear-gradient(90deg, #64748b, #475569) !important; 
}
.grid-item[data-game="loto_tuchon"] .loto-tc-icon {
    background: radial-gradient(circle at 30% 30%, #f1f5f9 0%, #64748b 70%, #475569 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(100, 116, 139, 0.3) !important;
}
.grid-item[data-game="loto_tuchon"]:hover { 
    border-color: #64748b !important; 
    box-shadow: 0 12px 25px rgba(100, 116, 139, 0.2) !important; 
}

.grid-item[data-game="xskt"] {
    border: 1.5px solid #99f6e4 !important;
    background: linear-gradient(135deg, #f0fdfa 0%, #ccfbf1 100%) !important;
    box-shadow: 0 8px 20px rgba(20, 184, 166, 0.08) !important;
}
.grid-item[data-game="xskt"]::before { 
    background: linear-gradient(90deg, #14b8a6, #0f766e) !important; 
}
.grid-item[data-game="xskt"] .xskt-icon {
    background: radial-gradient(circle at 30% 30%, #ccfbf1 0%, #14b8a6 70%, #0f766e 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(20, 184, 166, 0.3) !important;
}
.grid-item[data-game="xskt"]:hover { 
    border-color: #14b8a6 !important; 
    box-shadow: 0 12px 25px rgba(20, 184, 166, 0.2) !important; 
}

/* Max Prize Value Badge Styling */
.grid-prize-max {
    font-size: 0.72rem;
    font-weight: 750;
    color: #ef4444;
    margin-top: 5px;
    background: rgba(239, 68, 68, 0.08);
    padding: 2px 8px;
    border-radius: 20px;
    letter-spacing: 0.2px;
}
.grid-item[data-game="keno"] .grid-prize-max {
    color: #ea580c;
    background: rgba(234, 88, 12, 0.1);
    box-shadow: 0 0 8px rgba(234, 88, 12, 0.15);
    font-size: 0.76rem;
    font-weight: 850;
    animation: textPulse 1.5s infinite ease-in-out;
}
.grid-item[data-game="mega"] .grid-prize-max {
    color: #0284c7;
    background: rgba(2, 132, 199, 0.08);
}
.grid-item[data-game="power"] .grid-prize-max {
    color: #dc2626;
    background: rgba(220, 38, 38, 0.08);
}
.grid-item[data-game="max3d"] .grid-prize-max {
    color: #7e22ce;
    background: rgba(126, 34, 206, 0.08);
}
.grid-item[data-game="max3dpro"] .grid-prize-max {
    color: #be185d;
    background: rgba(190, 24, 93, 0.08);
}
.grid-item[data-game="lotto"] .grid-prize-max {
    color: #047857;
    background: rgba(4, 120, 87, 0.08);
}
.grid-item[data-game="loto_tuchon"] .grid-prize-max {
    color: #475569;
    background: rgba(71, 85, 105, 0.08);
}
.grid-item[data-game="xskt"] .grid-prize-max {
    color: #0f766e;
    background: rgba(15, 118, 110, 0.08);
}

@keyframes textPulse {
    0% { transform: scale(1); opacity: 0.95; }
    50% { transform: scale(1.04); opacity: 1; text-shadow: 0 0 6px rgba(234, 88, 12, 0.3); }
    100% { transform: scale(1); opacity: 0.95; }
}

/* Wallet and Profile Details Styling */
.wallet-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.wallet-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--border-light);
}
.wallet-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.wallet-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}
.wallet-val {
    font-size: 1.15rem;
    font-weight: 900;
    color: var(--text-primary);
}
.profile-card-item {
    background: #f8fafc;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    transition: all 0.2s ease;
}
.profile-card-item:hover {
    border-color: #cbd5e1;
}
.profile-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.details-title {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    border-bottom: 1px dashed var(--border-light);
    padding-bottom: 4px;
}
.detail-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    line-height: 1.4;
}
.detail-label {
    color: var(--text-secondary);
    font-weight: 500;
    flex-shrink: 0;
}
.detail-val {
    color: var(--text-primary);
    font-weight: 600;
    text-align: right;
    word-break: break-all;
    padding-left: 8px;
}

/* History Categories & Cards Styling */
.history-section-title {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--text-secondary);
    margin-bottom: 15px;
    letter-spacing: 0.5px;
}
.history-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}
@media (max-width: 768px) {
    .history-grid {
        grid-template-columns: 1fr;
    }
}
.history-category-card {
    display: flex;
    align-items: center;
    gap: 18px;
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 20px 22px;
    cursor: pointer;
    transition: all var(--transition-normal);
    width: 100%;
    box-sizing: border-box;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03), 0 1px 3px rgba(0, 0, 0, 0.02);
}
.history-category-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06), 0 3px 6px rgba(0, 0, 0, 0.04);
    border-color: rgba(220, 38, 38, 0.3);
}
.history-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}
.icon-vietlott {
    background: #fef2f2;
    color: #ef4444;
}
.icon-xskt {
    background: #eff6ff;
    color: #3b82f6;
}
.icon-loto {
    background: #faf5ff;
    color: #a855f7;
}
.icon-group-buy {
    background: #f5f3ff;
    color: #8b5cf6;
}
.icon-wallet-main {
    background: #ecfdf5;
    color: #10b981;
}
.icon-wallet-reward {
    background: #fff7ed;
    color: #f97316;
}
.history-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.category-name {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-primary);
}
.category-desc {
    font-size: 0.82rem;
    color: var(--text-secondary);
}
.history-wallet-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.history-wallet-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 20px 22px;
    cursor: pointer;
    transition: all var(--transition-normal);
    width: 100%;
    box-sizing: border-box;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03), 0 1px 3px rgba(0, 0, 0, 0.02);
}
.history-wallet-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06), 0 3px 6px rgba(0, 0, 0, 0.04);
    border-color: rgba(220, 38, 38, 0.3);
}
.wallet-left {
    display: flex;
    align-items: center;
    gap: 18px;
}
.chevron-icon {
    color: var(--text-secondary);
    font-size: 1rem;
    transition: transform 0.2s;
}
.history-wallet-card:hover .chevron-icon {
    transform: translateX(4px);
    color: var(--primary);
}
.history-list-header {
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 12px;
    margin-bottom: 15px;
}
.btn-back {
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Inline Profile Edit Styling */
.form-group-sm {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.form-label-sm {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-secondary);
}
.form-control-sm {
    padding: 6px 10px !important;
    font-size: 0.8rem !important;
    height: auto !important;
    border-radius: 8px !important;
}
.btn-xs {
    padding: 2px 6px !important;
    font-size: 0.7rem !important;
    border-radius: 4px !important;
}

/* Vietlott Products Grid styling */
.vietlott-products-grid button {
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}
.vietlott-products-grid button:hover {
    transform: translateY(-2px);
    border-color: var(--primary) !important;
    background: #fff5f5 !important;
    color: var(--primary) !important;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.1);
}

/* Order Detail Ball styling */
.detail-ball-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 0;
    border-bottom: 1px dashed #e2e8f0;
}
.detail-ball-row:last-child {
    border-bottom: none;
}
.detail-ball-label {
    font-weight: 800;
    color: #64748b;
    font-size: 0.85rem;
    min-width: 20px;
}
.detail-balls-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.detail-ball {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #ff5252 0%, #c62828 80%);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
    box-shadow: 0 2px 6px rgba(198, 40, 40, 0.3);
    border: 1px solid rgba(255,255,255,0.25);
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.detail-ball-special {
    background: radial-gradient(circle at 35% 35%, #ffeb3b 0%, #f57f17 80%);
    box-shadow: 0 2px 6px rgba(245, 127, 23, 0.3);
    color: #3e2723;
}
.detail-ball-text {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1e293b;
    background: #f1f5f9;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

/* Vietlott Product Selection Cards */
.vietlott-prod-card {
    display: flex;
    align-items: center;
    padding: 20px 22px;
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03), 0 1px 3px rgba(0, 0, 0, 0.02);
}

.vietlott-prod-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    transition: width 0.25s ease;
}

/* Keno styling */
.vietlott-prod-card.keno::before { background: #ea580c; }
.vietlott-prod-card.keno .prod-card-icon { color: #ea580c; background: #fff7ed; }
.vietlott-prod-card.keno:hover {
    border-color: #f97316;
    box-shadow: 0 12px 24px rgba(234, 88, 12, 0.12);
}

/* Mega styling */
.vietlott-prod-card.mega::before { background: #1d4ed8; }
.vietlott-prod-card.mega .prod-card-icon { color: #1d4ed8; background: #eff6ff; }
.vietlott-prod-card.mega:hover {
    border-color: #2563eb;
    box-shadow: 0 12px 24px rgba(29, 78, 216, 0.12);
}

/* Power styling */
.vietlott-prod-card.power::before { background: #dc2626; }
.vietlott-prod-card.power .prod-card-icon { color: #dc2626; background: #fef2f2; }
.vietlott-prod-card.power:hover {
    border-color: #ef4444;
    box-shadow: 0 12px 24px rgba(220, 38, 38, 0.12);
}

/* Lotto styling */
.vietlott-prod-card.lotto::before { background: #059669; }
.vietlott-prod-card.lotto .prod-card-icon { color: #059669; background: #ecfdf5; }
.vietlott-prod-card.lotto:hover {
    border-color: #10b981;
    box-shadow: 0 12px 24px rgba(5, 150, 105, 0.12);
}

/* Max3d styling */
.vietlott-prod-card.max3d::before { background: #7e22ce; }
.vietlott-prod-card.max3d .prod-card-icon { color: #7e22ce; background: #faf5ff; }
.vietlott-prod-card.max3d:hover {
    border-color: #a855f7;
    box-shadow: 0 12px 24px rgba(126, 34, 206, 0.12);
}

/* Max3d Pro styling */
.vietlott-prod-card.max3dpro::before { background: #6b21a8; }
.vietlott-prod-card.max3dpro .prod-card-icon { color: #6b21a8; background: #faf5ff; }
.vietlott-prod-card.max3dpro:hover {
    border-color: #9333ea;
    box-shadow: 0 12px 24px rgba(107, 33, 168, 0.12);
}

.vietlott-prod-card:hover {
    transform: translateY(-3px);
}

.vietlott-prod-card:hover::before {
    width: 8px;
}

.prod-card-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-right: 18px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.vietlott-prod-card:hover .prod-card-icon {
    transform: scale(1.1);
}

.prod-card-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    text-align: left;
}

.prod-name {
    font-size: 1.1rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 4px;
}

.prod-desc {
    font-size: 0.8rem;
    color: #475569;
    font-weight: 500;
    line-height: 1.4;
}

.prod-arrow {
    color: #94a3b8;
    font-size: 0.95rem;
    transition: transform 0.2s ease, color 0.2s ease;
    margin-left: 12px;
}

.vietlott-prod-card:hover .prod-arrow {
    transform: translateX(3px);
    color: #475569;
}

@media (max-width: 480px) {
    .vietlott-products-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
}

/* Checkout Confirmation Modal styles */
.confirm-line-item {
    background: #f8fafc;
    border: 1px solid #edf2f7;
    border-radius: 10px;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.confirm-line-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.confirm-line-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
}
.confirm-line-numbers {
    font-size: 1.05rem;
    font-weight: 800;
    color: #1e293b;
    letter-spacing: 0.5px;
}
.confirm-line-price {
    font-size: 0.9rem;
    font-weight: 800;
    color: #475569;
}

/* Profile collapsible accordion styling */
.collapsible-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    padding: 6px 0;
    transition: color 0.2s ease;
}

.collapsible-header:hover {
    color: var(--primary);
}

.collapsible-header .details-title {
    font-size: 0.85rem;
    font-weight: 800;
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.accordion-chevron {
    font-size: 0.8rem;
    color: var(--text-secondary);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Collapsible body container */
.collapsible-body {
    max-height: 500px;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s ease, opacity 0.3s ease;
    opacity: 1;
}

.collapsible-body.collapsed {
    max-height: 0;
    opacity: 0;
    pointer-events: none;
}

.accordion-chevron.collapsed {
    transform: rotate(-90deg);
}

/* Sidebar collapsibility overrides */
.account-grid-layout {
    grid-template-columns: 300px 1fr !important;
    transition: grid-template-columns 0.3s cubic-bezier(0.4, 0, 0.2, 1), gap 0.3s ease;
}

.profile-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
}

/* Collapsed state (Desktop) */
.account-grid-layout.sidebar-collapsed {
    grid-template-columns: 0px 1fr !important;
    gap: 0 !important;
}

.account-grid-layout.sidebar-collapsed .profile-card {
    transform: translateX(-350px);
    opacity: 0;
    visibility: hidden;
    padding: 0 !important;
    width: 0 !important;
    margin: 0 !important;
    border: none !important;
    overflow: hidden;
}

/* Slide-in drawer (Mobile) */
@media (max-width: 768px) {
    .account-grid-layout {
        display: flex !important;
        flex-direction: column !important;
        gap: 16px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .profile-card {
        position: static !important;
        width: 100% !important;
        transform: none !important;
        visibility: visible !important;
        opacity: 1 !important;
        background: #ffffff !important;
        border: 1px solid var(--border-light) !important;
        border-radius: var(--radius-md) !important;
        box-shadow: var(--shadow-sm) !important;
        padding: 20px !important;
        margin-bottom: 12px !important;
    }
}

/* Region selection button group premium active states */
#btn-xskt-reg-mn.active, #btn-xskt-reg-mt.active {
    background: var(--primary) !important;
    color: white !important;
    border-color: var(--primary) !important;
}

/* XSKT Quantity Selector Modal Grid buttons styling */
.xskt-pop-qty-btn {
    background: white;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    padding: 12px 8px;
    font-weight: 700;
    font-size: 0.95rem;
    color: #b91c1c;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.xskt-pop-qty-btn:hover {
    border-color: #fca5a5;
    background: #fff5f5;
    transform: translateY(-1px);
}

.xskt-pop-qty-btn.active {
    background: #b91c1c !important;
    color: white !important;
    border-color: #b91c1c !important;
    box-shadow: 0 4px 10px rgba(185, 28, 28, 0.25);
}

/* XSKT selected quantity indicator on ticket card */
.xskt-ticket-selected-qty {
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--primary);
    background: #fff5f5;
    border: 1px solid var(--border-active);
    padding: 2px 6px;
    border-radius: 4px;
    margin-top: 6px;
    letter-spacing: 0.2px;
}

/* Selected item hover style */
.xskt-selected-item {
    transition: var(--transition-fast);
}
.xskt-selected-item:hover {
    border-color: var(--primary) !important;
    box-shadow: var(--shadow-sm);
}

/* XSKT selected item layout classes */
.xskt-selected-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    font-size: 0.88rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-fast);
}
.xskt-selected-item-left {
    display: flex;
    align-items: center;
    gap: 8px;
}
.xskt-selected-item-num {
    font-weight: 800;
    color: #b91c1c;
    font-size: 1.05rem;
    letter-spacing: 0.5px;
}
.xskt-selected-item-prov {
    color: #64748b;
    font-weight: 600;
    font-size: 0.8rem;
}
.xskt-selected-item-right {
    display: flex;
    align-items: center;
    gap: 12px;
}
.xskt-selected-item-qty {
    font-weight: 700;
    color: #475569;
}
.xskt-selected-item-del {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 1.35rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    padding: 0 4px;
    transition: transform 0.1s ease;
}
.xskt-selected-item-del:hover {
    transform: scale(1.15);
}

/* XSKT popup quantity grid class */
.xskt-pop-qty-grid-class {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 8px !important;
    width: 100% !important;
    margin-top: 5px !important;
    max-height: 220px !important;
    overflow-y: auto !important;
    padding-right: 4px !important;
}

/* Hide horizontal scrollbars for clean native look */
.game-tabs-container::-webkit-scrollbar,
.xskt-date-tabs::-webkit-scrollbar,
.xskt-provinces-pills::-webkit-scrollbar {
    display: none !important;
}
.game-tabs-container,
.xskt-date-tabs,
.xskt-provinces-pills {
    -ms-overflow-style: none !important;  /* IE and Edge */
    scrollbar-width: none !important;  /* Firefox */
}

/* Mobile responsive overrides for XSKT components */
@media (max-width: 480px) {
    .xskt-tickets-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)) !important;
        padding: 10px !important;
        gap: 8px !important;
        border-radius: 8px !important;
        margin-bottom: 15px !important;
    }
    
    .xskt-ticket-card {
        padding: 10px 8px !important;
        min-height: 64px !important;
    }
    
    .xskt-ticket-number {
        font-size: 1.15rem !important;
        letter-spacing: 0.8px !important;
    }
    
    .xskt-pop-qty-grid-class {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 6px !important;
    }
    
    .xskt-popup-ticket-preview {
        max-width: 100% !important;
        padding: 12px 15px !important;
        border-radius: 12px !important;
    }
    
    #xskt-pop-num {
        font-size: 1.85rem !important;
        letter-spacing: 3px !important;
    }
    
    /* Make clear selection and max selection button text smaller on mobile */
    #btn-xskt-pop-clear, #btn-xskt-pop-max {
        font-size: 0.8rem !important;
        padding: 8px !important;
    }
    
    /* Ensure modal-body has responsive padding and spacing */
    #xskt-qty-selector-modal .modal-body {
        padding: 15px !important;
        gap: 12px !important;
    }
}

/* ==========================================================================
   MOBILE UX OPTIMIZATIONS (PC PRESERVED UNTOUCHED)
   ========================================================================== */
@media (max-width: 768px) {
    /* 1. Lobby Game Grid layout: 2 Columns & Premium cards */
    .quick-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px 10px !important;
    }
    
    /* Premium horizontal bars for XSKT & Loto Tự Chọn on Mobile */
    .grid-item[data-game="xskt"],
    .grid-item[data-game="loto_tuchon"] {
        grid-column: span 2 !important;
        display: grid !important;
        grid-template-columns: auto 1fr auto !important;
        grid-template-rows: auto auto !important;
        align-items: center !important;
        text-align: left !important;
        gap: 2px 14px !important;
        padding: 12px 16px !important;
        min-height: 80px !important;
        border-radius: 16px !important;
    }
    
    .grid-item[data-game="xskt"] {
        background: linear-gradient(135deg, #f0fdfa 0%, #ccfbf1 100%) !important;
        border: 1px solid #99f6e4 !important;
        box-shadow: 0 4px 6px -1px rgba(20, 184, 166, 0.08) !important;
    }
    
    .grid-item[data-game="loto_tuchon"] {
        background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%) !important;
        border: 1px solid #e9d5ff !important;
        box-shadow: 0 4px 6px -1px rgba(139, 92, 246, 0.08) !important;
    }
    
    .grid-item[data-game="xskt"] .grid-icon,
    .grid-item[data-game="loto_tuchon"] .grid-icon {
        grid-area: 1 / 1 / 3 / 2 !important;
        margin-bottom: 0 !important;
        width: 44px !important;
        height: 44px !important;
        font-size: 1.25rem !important;
    }
    
    .grid-item[data-game="xskt"] .grid-label,
    .grid-item[data-game="loto_tuchon"] .grid-label {
        grid-area: 1 / 2 / 2 / 3 !important;
        margin-bottom: 0 !important;
        align-self: end !important;
        font-size: 0.88rem !important;
    }
    
    .grid-item[data-game="xskt"] .grid-desc,
    .grid-item[data-game="loto_tuchon"] .grid-desc {
        grid-area: 2 / 2 / 3 / 3 !important;
        margin-top: 0 !important;
        align-self: start !important;
        font-size: 0.72rem !important;
    }
    
    .grid-item[data-game="xskt"] .grid-badge,
    .grid-item[data-game="loto_tuchon"] .grid-badge {
        grid-area: 1 / 3 / 2 / 4 !important;
        position: static !important;
        justify-self: end !important;
        align-self: end !important;
        font-size: 0.6rem !important;
        padding: 2px 6px !important;
        border-radius: 6px !important;
    }
    
    .grid-item[data-game="xskt"] .grid-prize-max,
    .grid-item[data-game="loto_tuchon"] .grid-prize-max {
        grid-area: 2 / 3 / 3 / 4 !important;
        margin-top: 2px !important;
        justify-self: end !important;
        align-self: start !important;
        font-size: 0.72rem !important;
        font-weight: 800 !important;
    }
    
    .grid-item {
        padding: 14px 10px !important;
        border-radius: 12px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        position: relative !important;
        min-height: 110px !important;
        justify-content: center !important;
    }
    
    .grid-icon {
        width: 42px !important;
        height: 42px !important;
        font-size: 1.2rem !important;
        margin-bottom: 6px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .grid-label {
        font-size: 0.8rem !important;
        font-weight: 800 !important;
        margin-bottom: 2px !important;
        white-space: normal !important;
        word-break: break-word !important;
        line-height: 1.2 !important;
    }
    
    .grid-desc {
        display: block !important; /* Show descriptions on mobile */
        font-size: 0.68rem !important;
        opacity: 0.8 !important;
        margin: 0 !important;
        line-height: 1.2 !important;
    }
    
    .grid-badge {
        font-size: 0.52rem !important;
        padding: 2px 5px !important;
        top: 6px !important;
        right: 6px !important;
        border-radius: 4px !important;
    }
    
    .grid-prize-max {
        font-size: 0.65rem !important;
        padding: 1px 6px !important;
        margin-top: 3px !important;
    }
    
    .grid-item[data-game="keno"] .grid-prize-max {
        font-size: 0.68rem !important;
    }

    /* 2. Board Selector Rows: Minimalist mockup-based layout */
    .boards-list {
        background: #ffffff !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 14px !important;
        overflow: hidden !important;
        gap: 0 !important;
        margin-bottom: 15px !important;
    }
    
    .board-item-container {
        margin-bottom: 0 !important;
    }
    
    .board-item-container:not(:last-child) .board-row {
        border-bottom: 1px solid #f1f5f9 !important;
    }
    
    /* Unified flexbox layout for all board rows (empty or active) */
    .board-row {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        padding: 10px 8px !important;
        background: #ffffff !important;
        border-radius: 0 !important;
        margin-bottom: 0 !important;
        box-shadow: none !important;
        gap: 6px 0 !important;
    }
    
    .board-letter {
        order: 1 !important;
        font-size: 0.95rem !important;
        font-weight: 800 !important;
        color: #1e293b !important;
        background: none !important;
        border: none !important;
        width: auto !important;
        height: auto !important;
    }
    
    .btn-board-quick {
        order: 2 !important;
        margin-left: 8px !important;
        width: 30px !important;
        height: 30px !important;
        border-radius: 50% !important;
        background: #ffffff !important;
        border: 1px solid #cbd5e1 !important;
        box-shadow: 0 2px 4px rgba(0,0,0,0.06) !important;
        color: #dc2626 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .btn-board-quick i::before {
        content: "\f2f9" !important; /* fa-rotate / refresh icon */
        font-family: "Font Awesome 6 Free" !important;
        font-weight: 900 !important;
    }
    
    .board-play-type-label {
        display: none !important; /* Hide on first row of board on mobile */
    }
    
    .board-numbers .board-play-type-label {
        display: inline-flex !important; /* Show only inside numbers container */
        order: -1 !important;
        margin: 0 !important;
        margin-right: 8px !important;
        background: #f1f5f9 !important;
        border: 1px solid #cbd5e1 !important;
        color: #475569 !important;
        font-weight: 850 !important;
        font-size: 0.65rem !important;
        padding: 2px 8px !important;
        border-radius: 12px !important;
        box-shadow: none !important;
        flex-shrink: 0 !important;
        align-items: center !important;
        justify-content: center !important;
        height: 22px !important;
        white-space: nowrap !important;
        text-transform: uppercase !important;
    }
    
    .board-price {
        order: 4 !important;
        margin-left: auto !important;
        margin-right: 8px !important;
        background: #ffffff !important;
        border: 1px solid #fca5a5 !important;
        color: #dc2626 !important;
        font-weight: 800 !important;
        font-size: 0.75rem !important;
        width: 32px !important;
        height: 32px !important;
        border-radius: 50% !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        box-shadow: 0 2px 4px rgba(220,38,38,0.06) !important;
    }
    
    .btn-board-clear {
        order: 5 !important;
        width: 30px !important;
        height: 30px !important;
        border-radius: 50% !important;
        background: #ffffff !important;
        border: 1px solid #fee2e2 !important;
        color: #ef4444 !important;
        box-shadow: 0 2px 4px rgba(239,68,68,0.06) !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .board-numbers {
        order: 3 !important;
        flex: 1 !important;
        margin-left: 4px !important;
        margin-right: 4px !important;
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
        gap: 4px !important;
        font-size: 0.82rem !important;
        min-height: auto !important;
        scrollbar-width: none !important; /* Hide Firefox scrollbar */
        padding-bottom: 0 !important;
    }
    .board-numbers.wrap-2-rows {
        flex-direction: column !important;
        align-items: flex-start !important;
        overflow-x: visible !important;
        white-space: normal !important;
        padding-bottom: 0 !important;
    }
    .board-numbers-subrow {
        display: flex !important;
        flex-direction: row !important;
        justify-content: flex-start !important;
        align-items: center !important;
        gap: 5px !important;
        width: 100% !important;
        flex-wrap: nowrap !important;
    }
    .board-numbers::-webkit-scrollbar {
        display: none !important; /* Hide Chrome/Safari scrollbar */
    }

    /* Hide empty numbers block and clear button cleanly without breaking layout */
    .board-row:not(:has(.has-numbers)) .board-numbers {
        display: none !important;
    }
    
    .board-row:not(:has(.has-numbers)) .btn-board-clear {
        display: none !important;
    }
    
    .board-num-badge {
        width: 26px !important;
        height: 26px !important;
        font-size: 0.82rem !important;
        flex-shrink: 0 !important;
    }

    /* 3. Dropdown Selection Header (draws, play type, bac): Stacking on Mobile */
    .boards-header-row {
        flex-wrap: wrap !important;
        gap: 10px 8px !important;
        justify-content: flex-start !important;
        align-items: center !important;
        padding-bottom: 12px !important;
    }
    
    .draws-select-group {
        flex: 1 1 calc(50% - 6px) !important;
        min-width: 110px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 4px !important;
        margin: 0 !important;
    }
    
    .draws-select-group label {
        font-size: 0.72rem !important;
        color: var(--text-secondary) !important;
        margin: 0 !important;
        white-space: nowrap !important;
        text-align: left !important;
    }
    
    .draws-select-group select, .draws-select-group .form-select {
        width: 100% !important;
        height: 36px !important;
        box-sizing: border-box !important;
        font-size: 0.8rem !important;
        padding: 4px 8px !important;
        border-radius: 8px !important;
        margin: 0 !important;
    }
    
    #keno-bac-group {
        display: none !important;
    }
    
    #keno-bao-group {
        flex: 1 1 100% !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
        align-items: center !important;
        margin-top: 4px !important;
    }

    /* 4. Selector modal body and keno combos responsiveness */
    #number-selector-modal .modal-body {
        max-height: calc(100vh - 150px) !important;
        padding: 16px 10px !important;
    }
    
    /* Shrink the size of selector balls so they fit perfectly on screen */
    #number-selector-modal .ball-item {
        font-size: 0.72rem !important;
        width: 28px !important;
        height: 28px !important;
        line-height: 28px !important;
    }
    
    #number-selector-modal .balls-grid {
        gap: 5px !important;
    }
    
    /* 10 columns for Keno balls grid so it takes only 8 rows and fits completely */
    #number-selector-modal .keno-balls-grid {
        grid-template-columns: repeat(10, 1fr) !important;
    }
    
    #number-selector-modal .keno-balls-grid .ball-item {
        width: 26px !important;
        height: 26px !important;
        font-size: 0.68rem !important;
        line-height: 26px !important;
    }
    
    .keno-combination-container {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 8px !important;
    }
    
    .keno-combo-card {
        padding: 10px 4px !important;
    }
    
    .keno-combo-card h4 {
        font-size: 0.85rem !important;
    }
    
    .keno-combo-card p {
        font-size: 0.62rem !important;
    }

    /* 5. Virtual ticket card padding adjustment */
    .virtual-ticket-card {
        padding: 16px 8px !important;
        margin: 10px auto !important;
        width: 100% !important;
        max-width: 480px !important;
        box-sizing: border-box !important;
    }

    /* Mobile virtual ticket header grid */
    .virtual-ticket-card .ticket-header {
        display: grid !important;
        grid-template-columns: auto 1fr !important;
        grid-template-rows: auto auto !important;
        gap: 6px 12px !important;
        align-items: center !important;
        border-bottom: 2px dashed #e2decb !important;
        padding-bottom: 10px !important;
    }
    .virtual-ticket-card .vietlott-logo {
        grid-column: 1 !important;
        grid-row: 1 !important;
        font-size: 1.1rem !important;
    }
    .virtual-ticket-card .ticket-game-name {
        grid-column: 2 !important;
        grid-row: 1 !important;
        font-size: 1rem !important;
        justify-self: end !important;
        margin: 0 !important;
    }
    .virtual-ticket-card .ticket-draw-info {
        grid-column: 1 / span 2 !important;
        grid-row: 2 !important;
        font-size: 0.75rem !important;
        color: var(--text-secondary) !important;
        background: #f8fafc !important;
        padding: 4px 8px !important;
        border-radius: 6px !important;
        width: 100% !important;
        box-sizing: border-box !important;
        text-align: left !important;
        margin: 0 !important;
    }

    /* Keno prize tabs styling */
    .btn-prize-tab {
        background: white;
        color: #475569;
        border: 1px solid #cbd5e1;
        padding: 8px 16px;
        border-radius: 8px;
        font-weight: 700;
        cursor: pointer;
        transition: all 0.2s ease;
    }
    .btn-prize-tab.active {
        background: #ea580c;
        color: white;
        border-color: #ea580c;
    }
}

@media (max-width: 480px) {
    /* Fine-tune for very small mobile screens */
    .keno-combination-container {
        grid-template-columns: 1fr !important;
        gap: 8px !important;
    }
    .keno-combo-card {
        padding: 10px 15px !important;
        text-align: left !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
    }
}

/* ==========================================
   MOBILE SIDE DRAWER DESIGN
   ========================================== */
.mobile-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}
.mobile-drawer-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.mobile-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 82%;
    max-width: 340px;
    height: 100vh;
    background: #ffffff;
    z-index: 10000;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}
.mobile-drawer.open {
    transform: translateX(0);
}

/* Header */
.drawer-header {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    padding: 30px 20px 24px;
    color: #ffffff;
    position: relative;
    border-bottom-left-radius: 24px;
    box-shadow: 0 4px 20px rgba(220, 38, 38, 0.25);
}
.drawer-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
}
.drawer-close-btn:hover {
    opacity: 1;
}
.drawer-user-info {
    display: flex;
    align-items: center;
    gap: 16px;
}
.drawer-avatar {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: #ffffff;
    color: #dc2626;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}
.drawer-user-details h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.drawer-user-details p {
    margin: 4px 0 0;
    font-size: 0.85rem;
    opacity: 0.85;
}
.drawer-login-btn {
    background: #ffffff;
    color: #dc2626;
    border: none;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-top: 6px;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}
.drawer-login-btn:active {
    transform: scale(0.95);
}

/* Body */
.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px 20px;
}

/* Wallets Section */
.drawer-wallets {
    margin-bottom: 24px;
}
.drawer-wallet-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
}
.drawer-wallet-card:hover {
    background: #f1f5f9;
}
.wallet-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.wallet-icon-box {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(220, 38, 38, 0.08);
    color: #dc2626;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}
.wallet-icon-box i.text-red {
    color: #ef4444;
}
.wallet-text {
    display: flex;
    flex-direction: column;
}
.wallet-title {
    font-size: 0.72rem;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0.5px;
}
.wallet-balance {
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
}
.wallet-balance.text-red {
    color: #ef4444;
}
.wallet-action-btn {
    border: 1.5px solid #dc2626;
    background: transparent;
    color: #dc2626;
    border-radius: 20px;
    padding: 4px 16px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}
.wallet-action-btn.btn-withdraw {
    border-color: #ef4444;
    color: #ef4444;
}
.wallet-action-btn:active {
    transform: scale(0.95);
    background: rgba(220, 38, 38, 0.05);
}

/* Menu List */
.drawer-menu-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.drawer-menu-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-radius: 12px;
    color: #1e293b;
    text-decoration: none;
    transition: all 0.2s;
    background: #ffffff;
    border: 1px solid transparent;
}
.drawer-menu-item:hover, .drawer-menu-item:active {
    background: #f8fafc;
    color: #dc2626;
    border-color: #f1f5f9;
}
.menu-item-left {
    display: flex;
    align-items: center;
    gap: 14px;
    font-weight: 600;
    font-size: 0.92rem;
}
.menu-item-left i {
    width: 20px;
    font-size: 1.1rem;
    color: #64748b;
    transition: color 0.2s;
}
.drawer-menu-item:hover i, .drawer-menu-item:active i {
    color: #dc2626;
}
.drawer-menu-item .chevron-icon {
    font-size: 0.75rem;
    color: #cbd5e1;
}

/* Footer */
.drawer-footer {
    padding: 16px 20px;
    border-top: 1px solid #f1f5f9;
}
.drawer-logout-btn {
    width: 100%;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #64748b;
    padding: 10px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    border-style: solid;
}
.drawer-logout-btn:hover, .drawer-logout-btn:active {
    background: #fef2f2;
    color: #ef4444;
    border-color: #fee2e2;
}

/* ==========================================
   MOBILE SCREEN UI OPTIMIZATIONS
   ========================================== */
@media (max-width: 768px) {
    /* Flatten nesting cards to sit directly on page background */
    .account-card-panel.history-card {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        padding: 12px 16px 80px 16px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .history-card-header {
        border-bottom: none !important;
        margin-bottom: 12px !important;
        padding-bottom: 0 !important;
    }

    #btn-toggle-profile {
        display: none !important;
    }

    /* Flatten purchase panel main card on mobile */
    .purchase-main-col {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
    }

    /* Beautiful 3D Lottery Balls styling inside ticket preview & editor */
    .virtual-ticket-card.keno-ticket .board-num-badge {
        background: radial-gradient(circle at 35% 35%, #ffedd5 0%, #f97316 70%, #ea580c 100%) !important;
        color: #ffffff !important;
        border: none !important;
        box-shadow: 0 2px 4px rgba(234, 88, 12, 0.3) !important;
        text-shadow: 0 1px 1px rgba(0,0,0,0.2) !important;
    }
    
    .virtual-ticket-card.mega-ticket .board-num-badge {
        background: radial-gradient(circle at 35% 35%, #fee2e2 0%, #ef4444 70%, #dc2626 100%) !important;
        color: #ffffff !important;
        border: none !important;
        box-shadow: 0 2px 4px rgba(220, 38, 38, 0.3) !important;
        text-shadow: 0 1px 1px rgba(0,0,0,0.2) !important;
    }
    
    .virtual-ticket-card.power-ticket .board-num-badge {
        background: radial-gradient(circle at 35% 35%, #e0f2fe 0%, #0ea5e9 70%, #0284c7 100%) !important;
        color: #ffffff !important;
        border: none !important;
        box-shadow: 0 2px 4px rgba(2, 132, 199, 0.3) !important;
        text-shadow: 0 1px 1px rgba(0,0,0,0.2) !important;
    }
    
    .virtual-ticket-card.lotto-ticket .board-num-badge {
        background: radial-gradient(circle at 35% 35%, #d1fae5 0%, #10b981 70%, #059669 100%) !important;
        color: #ffffff !important;
        border: none !important;
        box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3) !important;
        text-shadow: 0 1px 1px rgba(0,0,0,0.2) !important;
    }
    
    .virtual-ticket-card.lotto-ticket .board-num-badge.lotto-special,
    .board-num-badge.lotto-special {
        background: radial-gradient(circle at 35% 35%, #fffbeb 0%, #d97706 70%, #b45309 100%) !important;
        color: #ffffff !important;
        border: 1.5px solid #fbbf24 !important;
        box-shadow: 0 2px 4px rgba(217, 119, 6, 0.4) !important;
        text-shadow: 0 1px 1px rgba(0,0,0,0.2) !important;
    }

    .board-num-badge {
        width: 26px !important;
        height: 26px !important;
        font-size: 0.82rem !important;
        line-height: 26px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .account-container {
        padding: 16px 16px 80px 16px !important;
        box-sizing: border-box !important;
        width: 100% !important;
    }
}

/* ==========================================================================
   Draws Accordion & Live Ticket Matching Styles
   ========================================================================== */
.draw-accordion-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
    transition: all 0.2s ease;
}
.draw-accordion-item:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.draw-accordion-header {
    padding: 12px 16px;
    background: #f8fafc;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s ease;
}
.draw-accordion-header:hover {
    background: #f1f5f9;
}
.draw-accordion-item.active .draw-accordion-header {
    background: #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
}

.draw-accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s cubic-bezier(0, 1, 0, 1);
    background: #ffffff;
}
.draw-accordion-item.active .draw-accordion-body {
    max-height: 2000px;
    transition: max-height 0.3s cubic-bezier(1, 0, 1, 0);
}

.matching-ball {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px !important;
    height: 30px !important;
    border-radius: 50%;
    background: #f1f5f9;
    color: #64748b;
    font-weight: 800;
    font-size: 0.85rem !important;
    border: 1px solid #cbd5e1;
    margin: 2.5px !important;
    transition: all 0.2s ease;
}
@media (max-width: 768px) {
    .matching-ball {
        width: 23px !important;
        height: 23px !important;
        font-size: 0.7rem !important;
        margin: 0 !important;
    }
}
.matching-ball.keno-ball {
    background: radial-gradient(circle at 35% 35%, #ffedd5 0%, #f97316 70%, #ea580c 100%) !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 2px 4px rgba(234, 88, 12, 0.2) !important;
    text-shadow: 0 1px 1px rgba(0,0,0,0.1) !important;
}
.matching-ball.mega-ball {
    background: radial-gradient(circle at 35% 35%, #fee2e2 0%, #ef4444 70%, #dc2626 100%) !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.2) !important;
    text-shadow: 0 1px 1px rgba(0,0,0,0.1) !important;
}
.matching-ball.power-ball {
    background: radial-gradient(circle at 35% 35%, #e0f2fe 0%, #0ea5e9 70%, #0284c7 100%) !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 2px 4px rgba(2, 132, 199, 0.2) !important;
    text-shadow: 0 1px 1px rgba(0,0,0,0.1) !important;
}
.matching-ball.lotto-ball {
    background: radial-gradient(circle at 35% 35%, #d1fae5 0%, #10b981 70%, #059669 100%) !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2) !important;
    text-shadow: 0 1px 1px rgba(0,0,0,0.1) !important;
}
.matching-ball.max3d-ball {
    background: radial-gradient(circle at 35% 35%, #f3e8ff 0%, #c084fc 70%, #9333ea 100%) !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 2px 4px rgba(147, 51, 234, 0.2) !important;
    text-shadow: 0 1px 1px rgba(0,0,0,0.1) !important;
}
.matching-ball.max3dpro-ball {
    background: radial-gradient(circle at 35% 35%, #f5f3ff 0%, #a78bfa 70%, #7c3aed 100%) !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 2px 4px rgba(124, 58, 237, 0.2) !important;
    text-shadow: 0 1px 1px rgba(0,0,0,0.1) !important;
}
.matching-ball.lotto-special {
    background: radial-gradient(circle at 35% 35%, #fffbeb 0%, #d97706 70%, #b45309 100%) !important;
    color: #ffffff !important;
    border: 1.5px solid #fbbf24 !important;
    box-shadow: 0 2px 4px rgba(217, 119, 6, 0.3) !important;
    text-shadow: 0 1px 1px rgba(0,0,0,0.1) !important;
}
.matching-ball.matched {
    background: #22c55e !important;
    border-color: #22c55e !important;
    color: #ffffff !important;
    box-shadow: 0 0 5px rgba(34, 197, 94, 0.4);
}
.matching-ball.matched-special {
    background: radial-gradient(circle at 35% 35%, #fffbeb 0%, #d97706 70%, #b45309 100%) !important;
    border-color: #fbbf24 !important;
    color: #ffffff !important;
    box-shadow: 0 0 6px rgba(217, 119, 6, 0.4);
}
.matching-ball.unmatched {
    opacity: 0.35;
    background: #f8fafc;
    color: #94a3b8;
    border-color: #e2e8f0;
}

/* Max 3D / Pro virtual ticket badge stylings */
.board-num-badge.max3d-digit-badge {
    border-radius: 6px !important;
    width: auto !important;
    padding: 2px 8px !important;
    min-width: 38px !important;
    height: 25px !important;
    line-height: 21px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.82rem !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
    margin-right: 4px !important;
}

.board-num-badge.max3d-digit-badge.max3d-badge {
    background: radial-gradient(circle at 35% 35%, #fee2e2 0%, #ef4444 70%, #dc2626 100%) !important;
}

.board-num-badge.max3d-digit-badge.max3dpro-badge {
    background: radial-gradient(circle at 35% 35%, #e0f2fe 0%, #3b82f6 70%, #1d4ed8 100%) !important;
}

.max3d-digits-container {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    margin-top: 10px;
}

.digit-selector-set .set-title {
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.digit-columns-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.digit-col-box {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.digit-col-box .col-label {
    display: block;
    font-size: 0.75rem;
    color: #64748b;
    text-align: center;
    margin-bottom: 8px;
    font-weight: 800;
    text-transform: uppercase;
}

.digit-balls-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

.digit-balls-grid .ball-item.digit-ball {
    width: 100%;
    aspect-ratio: 1;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 50%;
    border: 1px solid #cbd5e1;
    background: white;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.digit-balls-grid .ball-item.digit-ball:hover {
    border-color: var(--primary);
    background: rgba(220, 38, 38, 0.05);
}

.digit-balls-grid .ball-item.digit-ball.selected {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: white !important;
    box-shadow: 0 2px 5px rgba(220, 38, 38, 0.4);
}

#panel-max3dpro .digit-balls-grid .ball-item.digit-ball.selected {
    background: #1a237e !important;
    border-color: #1a237e !important;
    box-shadow: 0 2px 5px rgba(26, 35, 126, 0.3);
}

/* ==========================================
   CLOVER LUCK BACKGROUND DECORATION
   ========================================== */
.clover-bg {
    position: fixed;
    pointer-events: none;
    z-index: -1; /* Always behind the main content */
    opacity: 0.16; /* Increased opacity for clear visibility */
    background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cdefs%3E%3Cpath id='leaf' d='M 50 50 C 40 40, 30 30, 35 20 C 40 10, 48 15, 50 24 C 52 15, 60 10, 65 20 C 70 30, 60 40, 50 50 Z' /%3E%3C/defs%3E%3Cg fill='%2322c55e'%3E%3Cuse href='%23leaf' /%3E%3Cuse href='%23leaf' transform='rotate(90 50 50)' /%3E%3Cuse href='%23leaf' transform='rotate(180 50 50)' /%3E%3Cuse href='%23leaf' transform='rotate(270 50 50)' /%3E%3Cpath d='M 50 50 C 46 65, 38 78, 22 84 C 20 85, 18 84, 19 82 C 34 76, 42 63, 47 50' /%3E%3C/g%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    transition: transform 0.5s ease-out;
}

.clover-1 {
    top: 8%;
    left: -60px;
    width: 220px;
    height: 220px;
    transform: rotate(15deg);
    animation: cloverFloat1 25s infinite alternate ease-in-out;
}

.clover-2 {
    bottom: 12%;
    right: -80px;
    width: 280px;
    height: 280px;
    transform: rotate(-30deg);
    animation: cloverFloat2 30s infinite alternate ease-in-out;
}

.clover-3 {
    top: 55%;
    left: -70px;
    width: 160px;
    height: 160px;
    transform: rotate(45deg);
    animation: cloverFloat3 22s infinite alternate ease-in-out;
}

.clover-4 {
    top: 25%;
    right: 5%;
    width: 90px;
    height: 90px;
    opacity: 0.12; /* Increased opacity for smaller clover */
    transform: rotate(10deg);
    animation: cloverFloat1 28s infinite alternate ease-in-out;
}

@keyframes cloverFloat1 {
    0% { transform: translateY(0) rotate(15deg); }
    100% { transform: translateY(25px) rotate(35deg); }
}

@keyframes cloverFloat2 {
    0% { transform: translateY(0) rotate(-30deg); }
    100% { transform: translateY(-35px) rotate(-10deg); }
}

@keyframes cloverFloat3 {
    0% { transform: translateY(0) rotate(45deg); }
    100% { transform: translateY(20px) rotate(65deg); }
}

/* History Order Card Styles (Pop-out mobile order cards) */
.history-order-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 16px !important;
    padding: 18px 18px 18px 15px !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05) !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    position: relative !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    margin-bottom: 6px;
}

.history-order-card:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.08) !important;
    border-color: #cbd5e1 !important;
}

/* Prominent Ticket Countdown styling */
.ticket-countdown-wrapper {
    display: inline-flex !important;
    align-items: center !important;
    margin-top: 4px !important;
    font-size: 0.85rem !important;
}
.ticket-countdown-wrapper span {
    display: inline-flex !important;
    align-items: center !important;
}
.ticket-countdown-wrapper span span {
    font-weight: 800 !important;
    color: #e11d48 !important;
    font-size: 1.05rem !important;
    background: #ffe4e6 !important;
    padding: 2px 6px !important;
    border-radius: 4px !important;
    margin-left: 6px !important;
    border: 1px solid #fda4af !important;
    line-height: 1.2 !important;
}

/* Group Buy Ticket Cards */
.group-buy-ticket-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 15px;
}
.group-buy-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 18px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    transition: all 0.2s ease;
}
.group-buy-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
    border-color: #cbd5e1;
}
.gb-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px dashed #e2e8f0;
    padding-bottom: 10px;
    margin-bottom: 12px;
}
.gb-logo-tag {
    font-weight: 800;
    font-size: 0.85rem;
    padding: 4px 10px;
    border-radius: 6px;
    color: #ffffff;
}
.gb-logo-mega {
    background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
}
.gb-logo-power {
    background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
}
.gb-draw-info {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 500;
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}
.gb-numbers-box {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}
.gb-ball {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.85rem;
    color: #ffffff;
}
.gb-ball-mega {
    background: radial-gradient(circle at 30% 30%, #3b82f6, #1d4ed8);
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.3);
}
.gb-ball-power {
    background: radial-gradient(circle at 30% 30%, #ef4444, #b91c1c);
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.3);
}
.gb-details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 12px;
    background: #f8fafc;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.85rem;
}
.gb-detail-item {
    display: flex;
    flex-direction: column;
}
.gb-detail-label {
    color: #64748b;
    font-size: 0.75rem;
    margin-bottom: 2px;
}
.gb-detail-val {
    font-weight: 700;
    color: #1e293b;
}
.gb-progress-wrapper {
    margin-bottom: 14px;
}
.gb-progress-bar {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 4px;
}
.gb-progress-fill {
    height: 100%;
    background: #10b981;
    border-radius: 4px;
    width: 0%;
    transition: width 0.4s ease;
}
.gb-progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
}
.gb-action-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.gb-qty-selector {
    display: flex;
    align-items: center;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    overflow: hidden;
    height: 38px;
}
.gb-qty-btn {
    width: 32px;
    height: 100%;
    background: #f1f5f9;
    border: none;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.15s;
    outline: none;
}
.gb-qty-btn:hover {
    background: #e2e8f0;
}
.gb-qty-input {
    width: 44px;
    height: 100%;
    border: none;
    text-align: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: #1e293b;
    outline: none;
}
.gb-buy-btn {
    flex: 1;
    height: 38px;
    border-radius: 8px;
    background: #ea580c;
    color: #ffffff;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 10px rgba(234, 88, 12, 0.2);
    min-width: 140px;
}
.gb-buy-btn:hover {
    background: #d97706;
    transform: translateY(-1px);
}
.gb-buy-btn:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    box-shadow: none;
}
.gb-image-link {
    font-size: 0.75rem;
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
}
.gb-image-link:hover {
    text-decoration: underline;
}
.gb-status-tag {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
}
.gb-status-pending { background: #fef3c7; color: #d97706; }
.gb-status-won { background: #d1fae5; color: #065f46; }
.gb-status-lost { background: #f1f5f9; color: #64748b; }

/* ==========================================
   ADVANCED GROUP BUY PREMIUM STYLING
   ========================================== */
.gb-floating-add-btn {
    position: fixed;
    bottom: 80px;
    right: 20px;
    height: 48px;
    padding: 0 20px;
    border-radius: 24px;
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
    color: white;
    font-size: 0.95rem;
    font-weight: 800;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.4);
    border: none;
    cursor: pointer;
    z-index: 99;
    transition: all 0.2s ease-in-out;
}
.gb-floating-add-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.6);
}
.gb-floating-add-btn:active {
    transform: scale(0.95);
}

.gb-game-tabs {
    scrollbar-width: none; /* Firefox */
}
.gb-game-tabs::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.gb-game-tab {
    padding: 8px 16px;
    border-radius: 20px;
    border: 1.5px solid #cbd5e1;
    background: white;
    color: #475569;
    font-weight: 700;
    font-size: 0.88rem;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s;
}
.gb-game-tab.active {
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 10px rgba(139, 92, 246, 0.3);
}

.gb-preset-pct-card {
    background: white;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    outline: none;
}
.gb-preset-pct-card .pct-val {
    font-size: 1.1rem;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 2px;
}
.gb-preset-pct-card .money-val {
    font-size: 0.78rem;
    color: #64748b;
    font-weight: 600;
}
.gb-preset-pct-card.active {
    border-color: #059669;
    background: #ecfdf5;
}
.gb-preset-pct-card.active .pct-val {
    color: #059669;
}
.gb-preset-pct-card.active .money-val {
    color: #047857;
}

.gb-join-selector-ball {
    width: 38px;
    height: 38px;
    border-radius: 19px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
    user-select: none;
}

/* Mega ball styles */
.gb-ball-mega {
    background: radial-gradient(circle at 30% 30%, #ff4d4d, #cc0000);
    color: white;
}
.gb-join-selector-ball.gb-ball-mega-outline {
    border: 2px solid #ef4444;
    color: #ef4444;
}
.gb-join-selector-ball.gb-ball-mega-outline.active {
    background: radial-gradient(circle at 30% 30%, #ff4d4d, #cc0000);
    color: white;
    border-color: transparent;
    box-shadow: 0 3px 8px rgba(239, 68, 68, 0.4);
}

/* Power ball styles */
.gb-ball-power {
    background: radial-gradient(circle at 30% 30%, #ffad33, #e67300);
    color: white;
}
.gb-join-selector-ball.gb-ball-power-outline {
    border: 2px solid #f97316;
    color: #f97316;
}
.gb-join-selector-ball.gb-ball-power-outline.active {
    background: radial-gradient(circle at 30% 30%, #ffad33, #e67300);
    color: white;
    border-color: transparent;
    box-shadow: 0 3px 8px rgba(249, 115, 22, 0.4);
}

/* Lotto ball styles */
.gb-ball-lotto {
    background: radial-gradient(circle at 30% 30%, #4ade80, #15803d);
    color: white;
}
.gb-join-selector-ball.gb-ball-lotto-outline {
    border: 2px solid #10b981;
    color: #10b981;
}
.gb-join-selector-ball.gb-ball-lotto-outline.active {
    background: radial-gradient(circle at 30% 30%, #4ade80, #15803d);
    color: white;
    border-color: transparent;
    box-shadow: 0 3px 8px rgba(16, 185, 129, 0.4);
}

/* Mini ball tag in list */
.gb-ball-mini {
    width: 20px;
    height: 20px;
    border-radius: 10px;
    background: #e2e8f0;
    color: #475569;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 800;
}

/* Integrated Analysis Iframe Panel Styles */
#view-analysis {
    display: none;
    position: fixed;
    top: 94px;
    left: 0;
    width: 100vw;
    height: calc(100vh - 94px);
    z-index: 99;
    background: #f8fafc;
    padding: 0 !important;
    margin: 0 !important;
    flex-direction: column;
}

#view-analysis.active {
    display: flex !important;
}

@media (max-width: 768px) {
    #view-analysis {
        top: 72px;
        height: calc(100vh - 72px - 58px);
    }
}

.analysis-tabs-container {
    display: none;
    gap: 10px;
    padding: 12px 16px 14px 16px;
    background: #f8fafc;
    border-bottom: 1.5px solid #e2e8f0;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    box-shadow: inset 0 -2px 4px rgba(0, 0, 0, 0.01);
}

@media (max-width: 768px) {
    .analysis-tabs-container {
        display: flex;
    }
}

.analysis-tabs-container::-webkit-scrollbar {
    display: none;
}

.analysis-tab {
    display: inline-flex;
    align-items: center;
    padding: 10px 18px;
    border-radius: 12px;
    border: 1.5px solid #e2e8f0;
    background: #ffffff;
    font-size: 0.85rem;
    font-weight: 700;
    color: #334155;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(15, 23, 42, 0.01);
}

.analysis-tab:hover {
    transform: translateY(-2px);
    border-color: #cbd5e1;
    box-shadow: 0 4px 8px rgba(15, 23, 42, 0.04);
}

.analysis-tab.active {
    color: #ffffff;
    border-color: transparent;
}

.analysis-tab.active i {
    color: #ffffff !important;
}

/* Brand-specific active gradients */
.analysis-tab[data-src="index.html"].active {
    background: linear-gradient(135deg, #ff5e36, #ff2a2a);
    box-shadow: 0 4px 12px rgba(255, 42, 42, 0.35);
}
.analysis-tab[data-src="mega.html"].active {
    background: linear-gradient(135deg, #f43f5e, #be123c);
    box-shadow: 0 4px 12px rgba(225, 29, 72, 0.35);
}
.analysis-tab[data-src="power.html"].active {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
}
.analysis-tab[data-src="lotto.html"].active {
    background: linear-gradient(135deg, #10b981, #047857);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}
.analysis-tab[data-src="max3dpro.html"].active {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
}
.analysis-tab[data-src="max3dplus.html"].active {
    background: linear-gradient(135deg, #a855f7, #6b21a8);
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.35);
}
.analysis-tab[data-src="xskt.html"].active {
    background: linear-gradient(135deg, #f97316, #c2410c);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.35);
}

#analysis-iframe {
    flex: 1;
    width: 100%;
    height: 100%;
    border: none;
    background: #f8fafc;
    transition: opacity 0.25s ease-in-out;
}

#analysis-iframe.loading {
    opacity: 0.3;
}

/* Navigation Dropdown Menu styling */
.nav-dropdown {
    position: relative;
    display: flex;
}

.nav-dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #ffffff;
    min-width: 210px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    z-index: 1000;
    padding: 8px 0;
    margin-top: 5px;
    animation: slideDownFade 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: #475569;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background-color: #fef2f2;
    color: #e74c3c;
}

.dropdown-item i {
    width: 16px;
    text-align: center;
}

.dropdown-arrow {
    font-size: 0.75rem;
    transition: transform 0.2s;
    color: #94a3b8;
    margin-left: 2px;
}

.nav-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
    color: #e74c3c;
}

@keyframes slideDownFade {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Keno/Mega/Power/Lotto Hot Numbers Styling */
.keno-hot-btn, .mega-hot-btn, .power-hot-btn, .lotto-hot-btn {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid #ef4444;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.05);
}

.keno-hot-btn:hover, .mega-hot-btn:hover, .power-hot-btn:hover, .lotto-hot-btn:hover {
    background: #ef4444;
    color: white !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.2);
}

.keno-hot-btn span, .mega-hot-btn span, .power-hot-btn span, .lotto-hot-btn span {
    font-size: 0.65rem;
    font-weight: 500;
    color: #64748b;
    transition: color 0.2s ease;
}

.keno-hot-btn:hover span, .mega-hot-btn:hover span, .power-hot-btn:hover span, .lotto-hot-btn:hover span {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Image Zoom Lightbox Modal */
.zoom-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    overflow: hidden;
}

.zoom-modal.active {
    display: flex;
}

.zoom-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10002;
}

.zoom-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.zoom-content-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    user-select: none;
}

.zoom-content-wrapper:active {
    cursor: grabbing;
}

#zoomed-ticket-img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    transform-origin: center center;
    transition: transform 0.1s ease-out;
    pointer-events: none; /* Let the wrapper handle mouse events */
}


