/**
 * Vietlott Module — Premium Design System v2
 * Glassmorphism • Neumorphism • Animated Gradients • 3D Balls
 * Light mode only — Strong animations
 */

/* ============================================
   CSS VARIABLES & DESIGN TOKENS
   ============================================ */
:root {
    /* Game Brand Colors */
    --vl-mega-primary: #C62828;
    --vl-mega-secondary: #E53935;
    --vl-mega-gradient: linear-gradient(135deg, #B71C1C 0%, #E53935 50%, #FF5252 100%);
    --vl-mega-light: #FFEBEE;
    --vl-mega-glow: rgba(229, 57, 53, 0.4);

    --vl-power-primary: #0D47A1;
    --vl-power-secondary: #42A5F5;
    --vl-power-gradient: linear-gradient(135deg, #0D47A1 0%, #1565C0 50%, #42A5F5 100%);
    --vl-power-light: #E3F2FD;
    --vl-power-glow: rgba(13, 71, 161, 0.4);

    --vl-6x36-primary: #1B5E20;
    --vl-6x36-secondary: #66BB6A;
    --vl-6x36-gradient: linear-gradient(135deg, #1B5E20 0%, #2E7D32 50%, #66BB6A 100%);
    --vl-6x36-light: #E8F5E9;

    --vl-123-primary: #E65100;
    --vl-123-secondary: #FF9800;
    --vl-123-gradient: linear-gradient(135deg, #E65100 0%, #F57C00 50%, #FF9800 100%);
    --vl-123-light: #FFF3E0;

    --vl-thantai-primary: #4A148C;
    --vl-thantai-secondary: #AB47BC;
    --vl-thantai-gradient: linear-gradient(135deg, #4A148C 0%, #7B1FA2 50%, #AB47BC 100%);
    --vl-thantai-light: #F3E5F5;

    --vl-bingo-primary: #AD1457;
    --vl-bingo-secondary: #F06292;
    --vl-bingo-gradient: linear-gradient(135deg, #AD1457 0%, #D81B60 50%, #F06292 100%);
    --vl-bingo-light: #FCE4EC;

    --vl-keno-primary: #D32F2F;
    --vl-keno-secondary: #FF5252;

    --vl-lotto-primary: #2E7D32;
    --vl-lotto-secondary: #4CAF50;

    /* Design Tokens */
    --vl-radius: 16px;
    --vl-radius-sm: 10px;
    --vl-radius-lg: 20px;
    --vl-shadow-soft: 0 2px 12px rgba(0,0,0,0.06);
    --vl-shadow: 0 4px 24px rgba(0,0,0,0.08);
    --vl-shadow-hover: 0 12px 40px rgba(0,0,0,0.14);
    --vl-shadow-glow: 0 0 30px rgba(212,175,55,0.15);
    --vl-transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --vl-transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --vl-transition-spring: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Glass effect */
    --vl-glass-bg: rgba(255,255,255,0.08);
    --vl-glass-border: rgba(255,255,255,0.15);
    --vl-glass-blur: 16px;
}

/* ============================================
   KEYFRAME ANIMATIONS
   ============================================ */

/* Animated mesh gradient background */
@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    25% { background-position: 100% 50%; }
    50% { background-position: 100% 0%; }
    75% { background-position: 0% 100%; }
}

/* Glow pulse for jackpot amounts */
@keyframes glowPulse {
    0%, 100% { text-shadow: 0 0 10px rgba(255,255,255,0.3); }
    50% { text-shadow: 0 0 25px rgba(255,255,255,0.6), 0 0 50px rgba(212,175,55,0.3); }
}

/* Shimmer effect for badges */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Floating particles */
@keyframes floatUp {
    0% { transform: translateY(0) scale(1); opacity: 0.6; }
    50% { opacity: 1; }
    100% { transform: translateY(-120px) scale(0.3); opacity: 0; }
}

@keyframes floatSlow {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(5deg); }
}

/* Ball drop with bounce */
@keyframes ballDrop {
    0% { opacity: 0; transform: translateY(-30px) scale(0.3); }
    50% { transform: translateY(6px) scale(1.08); }
    70% { transform: translateY(-3px) scale(0.98); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* Card entrance */
@keyframes cardSlideUp {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Subtle rotate for icons */
@keyframes iconSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Pulse ring */
@keyframes pulseRing {
    0% { transform: scale(0.9); opacity: 0.7; }
    50% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.7; }
}

/* Count up number flicker */
@keyframes countFlicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Border glow */
@keyframes borderGlow {
    0%, 100% { box-shadow: 0 0 5px rgba(212,175,55,0.2), inset 0 0 5px rgba(212,175,55,0.05); }
    50% { box-shadow: 0 0 20px rgba(212,175,55,0.4), inset 0 0 10px rgba(212,175,55,0.1); }
}

/* ============================================
   HERO / JACKPOT DASHBOARD
   ============================================ */
.vl-hero {
    background:
        radial-gradient(ellipse at 20% 50%, rgba(212,175,55,0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(66,165,245,0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(229,57,53,0.05) 0%, transparent 50%),
        linear-gradient(135deg, #0a1628 0%, #111d35 25%, #1a2d52 50%, #0f1e38 75%, #0a1628 100%);
    background-size: 100% 100%, 100% 100%, 100% 100%, 300% 300%;
    animation: gradientShift 15s ease infinite;
    border-radius: var(--vl-radius-lg);
    padding: 36px;
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
    color: #fff;
}

/* Particle dots overlay */
.vl-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 15% 25%, rgba(212,175,55,0.25) 1px, transparent 1px),
        radial-gradient(circle at 85% 75%, rgba(212,175,55,0.2) 1px, transparent 1px),
        radial-gradient(circle at 45% 10%, rgba(255,255,255,0.15) 1px, transparent 1px),
        radial-gradient(circle at 70% 45%, rgba(255,255,255,0.1) 1px, transparent 1px),
        radial-gradient(circle at 25% 80%, rgba(66,165,245,0.2) 1px, transparent 1px),
        radial-gradient(circle at 90% 30%, rgba(229,57,53,0.15) 1px, transparent 1px);
    background-size: 100% 100%;
    animation: floatSlow 8s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

/* Gold accent line */
.vl-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #D4AF37, #F5D15C, #D4AF37, transparent);
    z-index: 1;
}

.vl-hero > * { position: relative; z-index: 1; }

.vl-hero-title {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: #D4AF37;
    margin-bottom: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.vl-hero-title i {
    font-size: 18px;
    animation: pulseRing 2s ease-in-out infinite;
}

/* ============================================
   JACKPOT CARDS (Glassmorphism)
   ============================================ */
.vl-jackpot-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 28px;
}

.vl-jackpot-card {
    border-radius: var(--vl-radius);
    padding: 28px;
    position: relative;
    overflow: hidden;
    transition: var(--vl-transition);
    text-decoration: none;
    color: #fff;
    display: block;
    border: 1px solid rgba(255,255,255,0.12);
}

/* Glass overlay */
.vl-jackpot-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 60%);
    pointer-events: none;
    z-index: 0;
}

.vl-jackpot-card > * { position: relative; z-index: 1; }

.vl-jackpot-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: var(--vl-shadow-hover);
    color: #fff;
    text-decoration: none;
    border-color: rgba(255,255,255,0.25);
}

.vl-jackpot-card.mega {
    background: var(--vl-mega-gradient);
    box-shadow: 0 8px 32px rgba(198,40,40,0.3);
}
.vl-jackpot-card.mega:hover {
    box-shadow: 0 16px 48px rgba(198,40,40,0.45);
}

.vl-jackpot-card.power {
    background: var(--vl-power-gradient);
    box-shadow: 0 8px 32px rgba(13,71,161,0.3);
}
.vl-jackpot-card.power:hover {
    box-shadow: 0 16px 48px rgba(13,71,161,0.45);
}

.vl-jackpot-card-name {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 3px;
    opacity: 0.9;
    margin-bottom: 10px;
    font-weight: 700;
}

.vl-jackpot-card-amount {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 14px;
    line-height: 1.1;
    animation: glowPulse 3s ease-in-out infinite;
}

.vl-jackpot-card-amount span {
    font-size: 16px;
    font-weight: 500;
    opacity: 0.8;
}

.vl-jackpot-card-balls {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
}

.vl-jackpot-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    opacity: 0.85;
    flex-wrap: wrap;
    gap: 4px;
}

/* ============================================
   MINI GAME CARDS (Hero bottom)
   ============================================ */
.vl-hero-mini-games {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}

.vl-mini-game-card {
    background: var(--vl-glass-bg);
    border: 1px solid var(--vl-glass-border);
    backdrop-filter: blur(var(--vl-glass-blur));
    -webkit-backdrop-filter: blur(var(--vl-glass-blur));
    border-radius: var(--vl-radius-sm);
    padding: 12px 14px;
    text-decoration: none;
    color: #fff;
    transition: var(--vl-transition);
    display: flex;
    align-items: center;
    gap: 10px;
}

.vl-mini-game-card:hover {
    background: rgba(255,255,255,0.14);
    border-color: rgba(212,175,55,0.4);
    color: #fff;
    text-decoration: none;
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

.vl-mini-game-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.vl-mini-game-info { flex: 1; min-width: 0; }

.vl-mini-game-name {
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vl-mini-game-date {
    font-size: 11px;
    opacity: 0.65;
}

/* ============================================
   TYPE SELECTOR (Premium Pills)
   ============================================ */
.vl-type-selector {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    margin-bottom: 28px;
    justify-content: flex-start;
    padding: 6px;
    background: #f1f3f5;
    border-radius: var(--vl-radius);
    border: 1px solid #e5e7eb;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.vl-type-selector::-webkit-scrollbar { display: none; }

.vl-type-btn {
    padding: 10px 18px;
    border-radius: var(--vl-radius-sm);
    color: #555;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: var(--vl-transition);
    display: flex;
    align-items: center;
    gap: 6px;
    border: none;
    background: transparent;
    white-space: nowrap;
    scroll-snap-align: start;
    flex-shrink: 0;
    position: relative;
}

.vl-type-btn i {
    font-size: 12px;
    opacity: 0.7;
    transition: var(--vl-transition-fast);
}

.vl-type-btn:hover {
    background: rgba(0,0,0,0.05);
    color: #333;
    text-decoration: none;
    transform: translateY(-1px);
}

.vl-type-btn:hover i { opacity: 1; }

.vl-type-btn.active,
.vl-type-btn.active:hover {
    color: #fff;
    box-shadow: 0 4px 14px rgba(0,0,0,0.2);
    transform: translateY(-1px);
}

.vl-type-btn.active i { opacity: 1; }

/* Active states per game */
.vl-type-btn.active.mega { background: var(--vl-mega-gradient); }
.vl-type-btn.active.power { background: var(--vl-power-gradient); }
.vl-type-btn.active.t6x36 { background: var(--vl-6x36-gradient); }
.vl-type-btn.active.t123 { background: var(--vl-123-gradient); }
.vl-type-btn.active.thantai { background: var(--vl-thantai-gradient); }
.vl-type-btn.active.dt123 { background: var(--vl-123-gradient); }
.vl-type-btn.active.thantai4 { background: var(--vl-thantai-gradient); }
.vl-type-btn.active.bingo18 { background: var(--vl-bingo-gradient); }
.vl-type-btn.active.max3d { background: var(--vl-6x36-gradient); }
.vl-type-btn.active.max3dpro { background: linear-gradient(135deg, #01579B, #0288D1, #03A9F4); }
.vl-type-btn.active.keno { background: linear-gradient(135deg, #BF360C, #E64A19, #FF5722); }
.vl-type-btn.active.lotto535 { background: linear-gradient(135deg, #1B5E20, #388E3C, #4CAF50); }

/* Default active for "Tất cả" */
.vl-type-btn.active.all {
    background: linear-gradient(135deg, #1a2744, #2d3f5e, #3a506b);
}

/* Accent borders */
.vl-type-btn.mega { border-left: 3px solid var(--vl-mega-primary); }
.vl-type-btn.power { border-left: 3px solid var(--vl-power-primary); }
.vl-type-btn.max3d { border-left: 3px solid var(--vl-6x36-primary); }
.vl-type-btn.max3dpro { border-left: 3px solid #0288D1; }
.vl-type-btn.keno { border-left: 3px solid #E64A19; }
.vl-type-btn.lotto535 { border-left: 3px solid var(--vl-lotto-primary); }
.vl-type-btn.dt123 { border-left: 3px solid var(--vl-123-primary); }
.vl-type-btn.thantai4 { border-left: 3px solid var(--vl-thantai-primary); }
.vl-type-btn.bingo18 { border-left: 3px solid var(--vl-bingo-primary); }

/* Hover states per game */
.vl-type-btn.mega:hover { background: var(--vl-mega-light); color: var(--vl-mega-primary); }
.vl-type-btn.power:hover { background: var(--vl-power-light); color: var(--vl-power-primary); }
.vl-type-btn.max3d:hover { background: var(--vl-6x36-light); color: var(--vl-6x36-primary); }
.vl-type-btn.max3dpro:hover { background: #E0F7FA; color: #0277BD; }
.vl-type-btn.keno:hover { background: #FBE9E7; color: #BF360C; }
.vl-type-btn.lotto535:hover { background: var(--vl-6x36-light); color: var(--vl-lotto-primary); }
.vl-type-btn.dt123:hover { background: var(--vl-123-light); color: var(--vl-123-primary); }
.vl-type-btn.thantai4:hover { background: var(--vl-thantai-light); color: var(--vl-thantai-primary); }
.vl-type-btn.bingo18:hover { background: var(--vl-bingo-light); color: var(--vl-bingo-primary); }

/* ============================================
   GAME SECTION CARDS (Overview - Neumorphism)
   ============================================ */
.vl-game-section {
    margin-bottom: 28px;
    border-radius: var(--vl-radius);
    overflow: hidden;
    background: #fff;
    transition: var(--vl-transition);
    box-shadow: var(--vl-shadow-soft);
    border: 1px solid rgba(0,0,0,0.04);
}

.vl-game-section:hover {
    box-shadow: var(--vl-shadow);
    transform: translateY(-2px);
}

.vl-game-header {
    padding: 16px 24px;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* Subtle texture overlay on header */
.vl-game-header::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(255,255,255,0.03) 10px,
        rgba(255,255,255,0.03) 20px
    );
    pointer-events: none;
}

.vl-game-header > * { position: relative; z-index: 1; }

.vl-game-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.vl-game-header-link {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: var(--vl-transition-fast);
    display: flex;
    align-items: center;
    gap: 4px;
}

.vl-game-header-link:hover {
    color: #fff;
    text-decoration: none;
}

.vl-game-body {
    padding: 20px 24px;
}

/* ============================================
   RESULT CARDS (Neumorphism style)
   ============================================ */
.vl-result-card {
    border: 1px solid #eee;
    border-radius: var(--vl-radius-sm);
    padding: 20px;
    text-align: center;
    transition: var(--vl-transition);
    position: relative;
    background: #fff;
    box-shadow: var(--vl-shadow-soft);
}

.vl-result-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--vl-shadow-hover);
    border-color: #ddd;
}

.vl-result-card:first-child {
    border-width: 2px;
}

/* Themed first-card borders */
.theme-mega .vl-result-card:first-child { border-color: var(--vl-mega-secondary); }
.theme-power .vl-result-card:first-child { border-color: var(--vl-power-secondary); }
.theme-6x36 .vl-result-card:first-child { border-color: var(--vl-6x36-secondary); }
.theme-123 .vl-result-card:first-child { border-color: var(--vl-123-secondary); }
.theme-thantai .vl-result-card:first-child { border-color: var(--vl-thantai-secondary); }
.theme-dt123 .vl-result-card:first-child { border-color: var(--vl-123-secondary); }
.theme-thantai4 .vl-result-card:first-child { border-color: var(--vl-thantai-secondary); }

.vl-numbers-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin-bottom: 12px;
}

/* ============================================
   3D GLOSSY NUMBER BALLS
   ============================================ */
.vl-ball {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    color: #fff;
    font-weight: 700;
    font-size: 17px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    position: relative;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: default;
}

.vl-ball:hover {
    transform: scale(1.15) rotate(-5deg);
}

/* Glossy shine */
.vl-ball::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 8px;
    width: 16px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    transform: rotate(-30deg);
}

/* Themed balls */
.theme-mega .vl-ball, .vl-ball.mega {
    background: radial-gradient(circle at 30% 30%, #FF6B6B, #C62828 70%);
    box-shadow: inset 0 -4px 8px rgba(0,0,0,0.2), inset 0 4px 8px rgba(255,255,255,0.15), 0 4px 12px rgba(198,40,40,0.4);
}

.theme-power .vl-ball, .vl-ball.power {
    background: radial-gradient(circle at 30% 30%, #64B5F6, #0D47A1 70%);
    box-shadow: inset 0 -4px 8px rgba(0,0,0,0.2), inset 0 4px 8px rgba(255,255,255,0.15), 0 4px 12px rgba(13,71,161,0.4);
}

.theme-6x36 .vl-ball, .vl-ball.t6x36 {
    background: radial-gradient(circle at 30% 30%, #81C784, #1B5E20 70%);
    box-shadow: inset 0 -4px 8px rgba(0,0,0,0.2), inset 0 4px 8px rgba(255,255,255,0.15), 0 4px 12px rgba(27,94,32,0.4);
}

.theme-123 .vl-ball, .vl-ball.t123 {
    background: radial-gradient(circle at 30% 30%, #FFB74D, #E65100 70%);
    box-shadow: inset 0 -4px 8px rgba(0,0,0,0.2), inset 0 4px 8px rgba(255,255,255,0.15), 0 4px 12px rgba(230,81,0,0.4);
}

.theme-thantai .vl-ball, .vl-ball.thantai {
    background: radial-gradient(circle at 30% 30%, #CE93D8, #4A148C 70%);
    box-shadow: inset 0 -4px 8px rgba(0,0,0,0.2), inset 0 4px 8px rgba(255,255,255,0.15), 0 4px 12px rgba(74,20,140,0.4);
}

/* Bonus ball */
.vl-ball.bonus {
    background: radial-gradient(circle at 30% 30%, #FFD54F, #F57F17 70%) !important;
    box-shadow: inset 0 -4px 8px rgba(0,0,0,0.15), inset 0 4px 8px rgba(255,255,255,0.2), 0 4px 14px rgba(245,127,23,0.5) !important;
    color: #333 !important;
    text-shadow: none !important;
}

.vl-bonus-label {
    font-size: 10px;
    color: #F57F17;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 3px;
}

/* Mini balls */
.vl-ball.mini {
    width: 32px;
    height: 32px;
    font-size: 13px;
}

.vl-ball.mini::before {
    top: 3px; left: 5px;
    width: 10px; height: 7px;
}

/* Ball stagger animation */
.vl-ball-animated {
    opacity: 0;
    animation: ballDrop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.vl-ball-animated:nth-child(1) { animation-delay: 0.05s; }
.vl-ball-animated:nth-child(2) { animation-delay: 0.12s; }
.vl-ball-animated:nth-child(3) { animation-delay: 0.19s; }
.vl-ball-animated:nth-child(4) { animation-delay: 0.26s; }
.vl-ball-animated:nth-child(5) { animation-delay: 0.33s; }
.vl-ball-animated:nth-child(6) { animation-delay: 0.40s; }
.vl-ball-animated:nth-child(7) { animation-delay: 0.47s; }

/* ============================================
   JACKPOT BADGES (Shimmer)
   ============================================ */
.vl-jackpot-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 24px;
    margin-bottom: 8px;
    position: relative;
    overflow: hidden;
}

/* Shimmer effect */
.vl-jackpot-badge::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255,255,255,0.3) 50%,
        transparent 100%
    );
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
    pointer-events: none;
}

.theme-mega .vl-jackpot-badge { background: var(--vl-mega-light); color: var(--vl-mega-primary); }
.theme-power .vl-jackpot-badge { background: var(--vl-power-light); color: var(--vl-power-primary); }
.theme-6x36 .vl-jackpot-badge { background: var(--vl-6x36-light); color: var(--vl-6x36-primary); }
.theme-123 .vl-jackpot-badge { background: var(--vl-123-light); color: var(--vl-123-primary); }
.theme-thantai .vl-jackpot-badge { background: var(--vl-thantai-light); color: var(--vl-thantai-primary); }
.theme-dt123 .vl-jackpot-badge { background: var(--vl-123-light); color: var(--vl-123-primary); }
.theme-thantai4 .vl-jackpot-badge { background: var(--vl-thantai-light); color: var(--vl-thantai-primary); }

/* ============================================
   TYPE PAGE — FEATURED + HISTORY
   ============================================ */
.vl-featured-layout {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 28px;
}

.vl-featured-card {
    border-radius: var(--vl-radius);
    overflow: hidden;
    box-shadow: var(--vl-shadow);
    background: #fff;
    border: 1px solid rgba(0,0,0,0.04);
}

.vl-featured-header {
    padding: 22px 28px;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* Decorative pattern */
.vl-featured-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 90% 80%, rgba(255,255,255,0.08) 0%, transparent 50%),
        repeating-linear-gradient(
            -45deg,
            transparent,
            transparent 15px,
            rgba(255,255,255,0.02) 15px,
            rgba(255,255,255,0.02) 30px
        );
    pointer-events: none;
}

.vl-featured-header > * { position: relative; z-index: 1; }

.vl-featured-header-left h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
}

.vl-featured-header-left .vl-draw-info {
    font-size: 13px;
    opacity: 0.85;
    margin-top: 4px;
}

.vl-featured-header .vl-next-draw {
    text-align: right;
    font-size: 12px;
    opacity: 0.9;
}

.vl-featured-header .vl-next-draw strong {
    display: block;
    font-size: 14px;
}

.vl-featured-body {
    padding: 32px 28px;
    text-align: center;
    background: linear-gradient(180deg, #fafbfc 0%, #fff 100%);
}

.vl-featured-numbers {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #f0f0f0;
}

.vl-featured-numbers .vl-ball {
    width: 56px;
    height: 56px;
    font-size: 21px;
}

.vl-featured-numbers .vl-ball::before {
    top: 5px; left: 10px;
    width: 18px; height: 13px;
}

/* Featured jackpot display */
.vl-featured-jackpot {
    padding: 18px 28px;
    border-radius: var(--vl-radius-sm);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
}

.vl-featured-jackpot::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    background-size: 200% 100%;
    animation: shimmer 4s ease-in-out infinite;
    pointer-events: none;
}

.theme-mega .vl-featured-jackpot { background: var(--vl-mega-light); color: var(--vl-mega-primary); }
.theme-power .vl-featured-jackpot { background: var(--vl-power-light); color: var(--vl-power-primary); }
.theme-6x36 .vl-featured-jackpot { background: var(--vl-6x36-light); color: var(--vl-6x36-primary); }
.theme-123 .vl-featured-jackpot { background: var(--vl-123-light); color: var(--vl-123-primary); }
.theme-thantai .vl-featured-jackpot { background: var(--vl-thantai-light); color: var(--vl-thantai-primary); }

.vl-featured-jackpot i { font-size: 28px; position: relative; z-index: 1; }
.vl-featured-jackpot-value { font-size: 26px; font-weight: 800; position: relative; z-index: 1; }
.vl-featured-jackpot-label { font-size: 13px; font-weight: 500; opacity: 0.8; }

/* Winners badge */
.vl-featured-winners {
    font-size: 13px;
    color: #888;
    margin-bottom: 16px;
}

/* ============================================
   PRIZE TABLE (Premium)
   ============================================ */
.vl-prizes-section { margin-top: 20px; }

.vl-prizes-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: var(--vl-radius-sm);
    overflow: hidden;
    box-shadow: var(--vl-shadow-soft);
    font-size: 14px;
}

.vl-prizes-table thead th {
    padding: 14px 18px;
    text-align: left;
    font-weight: 700;
    font-size: 12px;
    color: #fff;
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
    z-index: 2;
}

/* Themed table headers */
.theme-mega .vl-prizes-table thead th { background: var(--vl-mega-primary); }
.theme-power .vl-prizes-table thead th { background: var(--vl-power-primary); }
.theme-6x36 .vl-prizes-table thead th { background: var(--vl-6x36-primary); }
.theme-123 .vl-prizes-table thead th { background: var(--vl-123-primary); }
.theme-thantai .vl-prizes-table thead th { background: var(--vl-thantai-primary); }

.vl-prizes-table tbody td {
    padding: 12px 18px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
    transition: background 0.2s;
}

.vl-prizes-table tbody tr:hover td {
    background: #f8f9fa;
}

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

.vl-prizes-table tbody tr:nth-child(even):hover td {
    background: #f0f2f5;
}

/* Jackpot row highlight */
.vl-prizes-table tbody tr:first-child {
    font-weight: 700;
}

.vl-prizes-table tbody tr:first-child td {
    background: linear-gradient(90deg, #FFF8E1, #FFFDE7) !important;
    border-bottom: 2px solid #FFD54F;
}

/* Hot badge for jackpot row */
.vl-prize-hot {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #FF6B35, #F7C948);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 6px;
    vertical-align: middle;
}

/* Match dots */
.vl-match-dots {
    display: flex;
    gap: 3px;
}

.vl-match-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    transition: var(--vl-transition-fast);
}

.vl-match-dot.filled {
    background: currentColor;
    opacity: 0.85;
    box-shadow: 0 0 4px currentColor;
}

.vl-match-dot.empty {
    background: transparent;
    border: 2px solid currentColor;
    opacity: 0.2;
    width: 8px;
    height: 8px;
    margin-top: 2px;
}

/* ============================================
   HISTORY CARDS
   ============================================ */
.vl-history-sidebar {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.vl-history-card {
    border: 1px solid #eee;
    border-radius: var(--vl-radius-sm);
    padding: 16px 18px;
    transition: var(--vl-transition);
    background: #fff;
    text-decoration: none;
    color: inherit;
    display: block;
    box-shadow: var(--vl-shadow-soft);
}

.vl-history-card:hover {
    box-shadow: var(--vl-shadow);
    transform: translateY(-3px);
    text-decoration: none;
    color: inherit;
    border-color: #ddd;
}

.vl-history-date {
    font-size: 12px;
    font-weight: 600;
    color: #888;
    margin-bottom: 8px;
}

.vl-history-balls {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.vl-history-jackpot {
    font-size: 12px;
    font-weight: 700;
}

/* ============================================
   KENO / BINGO18 TIMELINE LAYOUT
   ============================================ */
.vl-timeline-container {
    position: relative;
    padding-left: 24px;
}

.vl-timeline-container::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, #E53935 0%, #FF9800 50%, #4CAF50 100%);
    border-radius: 2px;
}

.vl-timeline-item {
    position: relative;
    padding: 12px 16px;
    margin-bottom: 8px;
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: var(--vl-radius-sm);
    transition: var(--vl-transition);
    box-shadow: var(--vl-shadow-soft);
}

.vl-timeline-item::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 18px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #E53935;
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px #E53935;
}

.vl-timeline-item:hover {
    transform: translateX(4px);
    box-shadow: var(--vl-shadow);
    border-color: #ddd;
}

.vl-timeline-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 12px;
    color: #888;
    font-weight: 600;
}

.vl-timeline-numbers {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

/* Carousel for Keno/Bingo */
.vl-carousel-container {
    position: relative;
    overflow: hidden;
}

.vl-carousel-track {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 8px 4px;
    scrollbar-width: none;
}

.vl-carousel-track::-webkit-scrollbar { display: none; }

.vl-carousel-slide {
    min-width: 200px;
    flex-shrink: 0;
    scroll-snap-align: start;
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: var(--vl-radius-sm);
    padding: 14px;
    text-align: center;
    transition: var(--vl-transition);
    box-shadow: var(--vl-shadow-soft);
}

.vl-carousel-slide:hover {
    box-shadow: var(--vl-shadow);
    transform: translateY(-2px);
}

/* ============================================
   DATE SELECTOR
   ============================================ */
.vl-date-selector {
    background: linear-gradient(135deg, #f8f9fa, #fff);
    border-radius: var(--vl-radius);
    padding: 20px 24px;
    margin-bottom: 24px;
    border: 1px solid #e9ecef;
    box-shadow: var(--vl-shadow-soft);
}

.vl-date-selector-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #555;
}

/* ============================================
   CERTIFICATE / DETAIL VIEW
   ============================================ */
.vl-certificate {
    background: #fff;
    border-radius: var(--vl-radius);
    box-shadow: var(--vl-shadow);
    overflow: hidden;
    margin-bottom: 24px;
}

.vl-certificate-header {
    padding: 28px 36px;
    color: #fff;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.vl-certificate-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 120%, rgba(255,255,255,0.1) 0%, transparent 60%);
    pointer-events: none;
}

.vl-certificate-header h2 {
    margin: 0 0 6px;
    font-size: 24px;
    font-weight: 700;
    position: relative;
}

.vl-certificate-header .vl-cert-draw {
    font-size: 14px;
    opacity: 0.85;
    position: relative;
}

.vl-certificate-body {
    padding: 36px;
    text-align: center;
    background: linear-gradient(180deg, #fafbfc, #fff);
}

.vl-certificate-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #999;
    font-weight: 700;
    margin-bottom: 20px;
}

.vl-certificate-numbers { margin-bottom: 28px; }

.vl-certificate-numbers .vl-ball {
    width: 62px;
    height: 62px;
    font-size: 23px;
    margin: 0 4px;
}

.vl-certificate-numbers .vl-ball::before {
    top: 6px; left: 12px;
    width: 20px; height: 14px;
}

.vl-certificate-jackpot {
    padding: 22px 36px;
    border-radius: var(--vl-radius-sm);
    margin-bottom: 24px;
    display: inline-flex;
    align-items: center;
    gap: 16px;
    position: relative;
    overflow: hidden;
}

.vl-certificate-jackpot::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
    pointer-events: none;
}

.vl-certificate-jackpot i { font-size: 30px; position: relative; z-index: 1; }
.vl-certificate-jackpot-value { font-size: 30px; font-weight: 800; position: relative; z-index: 1; }
.vl-certificate-jackpot-sub { font-size: 13px; opacity: 0.8; }

/* Draw navigation */
.vl-draw-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.vl-draw-nav a {
    padding: 10px 20px;
    border-radius: var(--vl-radius-sm);
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: var(--vl-transition);
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8f9fa;
    color: #555;
    border: 1px solid #e9ecef;
}

.vl-draw-nav a:hover {
    text-decoration: none;
    background: #e9ecef;
    transform: translateX(2px);
}

/* ============================================
   EMPTY STATE
   ============================================ */
.vl-empty {
    text-align: center;
    padding: 60px 20px;
    color: #bbb;
}

.vl-empty i {
    font-size: 56px;
    margin-bottom: 16px;
    display: block;
    opacity: 0.5;
}

.vl-empty p { font-size: 16px; }

/* ============================================
   LOADING SKELETON
   ============================================ */
.vl-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: var(--vl-radius-sm);
}

.vl-skeleton-ball {
    width: 46px;
    height: 46px;
    border-radius: 50%;
}

.vl-skeleton-text {
    height: 14px;
    margin-bottom: 8px;
}

.vl-skeleton-text.short { width: 60%; }
.vl-skeleton-text.medium { width: 80%; }

/* ============================================
   SCROLL REVEAL — STAGGER
   ============================================ */
.vl-reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.vl-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays for child sections */
.vl-reveal.vl-stagger-1 { transition-delay: 0.05s; }
.vl-reveal.vl-stagger-2 { transition-delay: 0.1s; }
.vl-reveal.vl-stagger-3 { transition-delay: 0.15s; }
.vl-reveal.vl-stagger-4 { transition-delay: 0.2s; }
.vl-reveal.vl-stagger-5 { transition-delay: 0.25s; }
.vl-reveal.vl-stagger-6 { transition-delay: 0.3s; }

/* ============================================
   COUNTUP ANIMATION (JS helper)
   ============================================ */
.vl-countup {
    display: inline-block;
    transition: opacity 0.3s;
}

.vl-countup.counting {
    animation: countFlicker 0.1s steps(1) infinite;
}

/* ============================================
   THEMED HEADERS (Game Section Overview)
   ============================================ */
.theme-mega .vl-game-header { background: var(--vl-mega-gradient); }
.theme-power .vl-game-header { background: var(--vl-power-gradient); }
.theme-6x36 .vl-game-header { background: var(--vl-6x36-gradient); }
.theme-123 .vl-game-header { background: var(--vl-123-gradient); }
.theme-thantai .vl-game-header { background: var(--vl-thantai-gradient); }
.theme-dt123 .vl-game-header { background: var(--vl-123-gradient); }
.theme-thantai4 .vl-game-header { background: var(--vl-thantai-gradient); }

/* ============================================
   KENO TABLE (Static Prize Reference)
   ============================================ */
.vl-prizes-section .vl-keno-header {
    background: linear-gradient(135deg, #D32F2F, #E53935);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 992px) {
    .vl-featured-layout {
        grid-template-columns: 1fr;
    }
    .vl-history-sidebar {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 8px;
        scrollbar-width: none;
    }
    .vl-history-sidebar::-webkit-scrollbar { display: none; }
    .vl-history-card {
        min-width: 200px;
        flex-shrink: 0;
    }
}

@media (max-width: 768px) {
    .vl-hero {
        padding: 24px 18px;
        border-radius: var(--vl-radius);
    }
    .vl-jackpot-cards {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .vl-jackpot-card { padding: 22px; }
    .vl-jackpot-card-amount { font-size: 24px; }
    .vl-hero-mini-games {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .vl-mini-game-card { padding: 10px 12px; }

    .vl-ball {
        width: 38px;
        height: 38px;
        font-size: 14px;
    }
    .vl-ball::before {
        top: 3px; left: 6px;
        width: 11px; height: 8px;
    }

    .vl-featured-numbers .vl-ball {
        width: 44px;
        height: 44px;
        font-size: 17px;
    }

    .vl-certificate-numbers .vl-ball {
        width: 48px;
        height: 48px;
        font-size: 18px;
    }

    .vl-prizes-table {
        font-size: 12px;
    }
    .vl-prizes-table thead th,
    .vl-prizes-table tbody td {
        padding: 10px 12px;
    }

    .vl-type-selector {
        padding: 4px;
        gap: 4px;
    }
    .vl-type-btn {
        padding: 8px 14px;
        font-size: 12px;
    }

    .vl-featured-body {
        padding: 24px 18px;
    }
    .vl-featured-header {
        padding: 18px 20px;
    }
    .vl-game-header { padding: 14px 18px; }
    .vl-game-body { padding: 16px 18px; }

    .vl-certificate-body { padding: 24px 18px; }
    .vl-certificate-header { padding: 20px 24px; }
}

@media (max-width: 480px) {
    .vl-hero { padding: 18px 14px; }
    .vl-hero-mini-games {
        grid-template-columns: 1fr 1fr;
    }
    .vl-numbers-row { gap: 4px; }
    .vl-ball {
        width: 34px;
        height: 34px;
        font-size: 13px;
    }

    .vl-type-selector {
        margin-left: -4px;
        margin-right: -4px;
        border-radius: var(--vl-radius-sm);
    }

    .vl-carousel-slide { min-width: 170px; }
}
