/* Custom styles for lottery website */

/* Result table */
.result-table td { font-family: 'Courier New', monospace; }
.result-table .text-red-600 { font-size: 1.5rem; letter-spacing: 0.15em; }

/* Loto number highlight */
.loto-num { transition: all 0.3s; }
.loto-num.highlight { background: #fef08a; border-radius: 4px; padding: 0 4px; }
.loto-num.new-number { animation: flashNumber 1s ease-in-out 3; }

/* Live animations */
@keyframes flashNumber {
    0%, 100% { background: transparent; }
    50% { background: #fbbf24; color: #1e3a5f; transform: scale(1.1); }
}

@keyframes pulse-live {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

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

/* Live dot */
.live-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    background: #ef4444;
    border-radius: 50%;
    animation: pulse-live 1s ease-in-out infinite;
    margin-right: 6px;
}

/* Win highlight */
.win-highlight {
    background: #dcfce7 !important;
    border-left: 4px solid #16a34a;
    animation: winPulse 0.5s ease-in-out 2;
}

@keyframes winPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); background: #bbf7d0; }
}

/* Admin sidebar */
.admin-sidebar {
    width: 240px;
    min-height: 100vh;
    transition: transform 0.3s;
}

.admin-sidebar.collapsed {
    transform: translateX(-100%);
}

@media (max-width: 768px) {
    .admin-sidebar {
        position: fixed;
        z-index: 50;
        transform: translateX(-100%);
    }
    .admin-sidebar.open { transform: translateX(0); }
}

/* Cards */
.stat-card {
    background: white;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Toast notifications */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    animation: slideIn 0.3s ease-out;
    max-width: 350px;
}

.toast.success { background: #16a34a; }
.toast.error { background: #dc2626; }
.toast.warning { background: #d97706; }
.toast.info { background: #2563eb; }

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

/* Mobile optimizations */
@media (max-width: 640px) {
    .result-table { font-size: 0.8rem; }
    .result-table .text-red-600 { font-size: 1.1rem; }
}

/* Scrollbar custom */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #94a3b8; border-radius: 3px; }

/* View Modes for Result Table (2-digit, 3-digit, full) */
.result-table.view-2digits .num-prefix {
    display: none !important;
}
.result-table.view-2digits .num-suffix-2 {
    font-weight: 800;
    color: #dc2626;
    letter-spacing: 0.08em;
}
.result-table.view-3digits .num-prefix-3 {
    display: none !important;
}
.result-table.view-3digits .num-suffix-3 {
    font-weight: 800;
    color: #2563eb;
    letter-spacing: 0.08em;
}

/* Head - Tail 2-column styling */
.head-tail-table th {
    background-color: #f8fafc;
    border-color: #e2e8f0;
}
.head-tail-table td {
    border-color: #f1f5f9;
}
.badge-cam {
    background-color: #fee2e2;
    color: #b91c1c;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
}

/* Countdown Timer */
.countdown-digit {
    background: #0f172a;
    color: #38bdf8;
    font-family: 'Courier New', monospace;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 6px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.5);
    display: inline-block;
    min-width: 32px;
    text-align: center;
}

/* Simulated spin animations */
@keyframes spinRoll {
    0% { transform: translateY(-4px); opacity: 0.4; }
    50% { transform: translateY(0); opacity: 1; color: #e11d48; }
    100% { transform: translateY(4px); opacity: 0.4; }
}
.is-spinning {
    animation: spinRoll 0.08s infinite ease-in-out;
    color: #2563eb;
    font-weight: 900;
}

/* Pascal Triangle visual */
.pascal-row {
    font-family: 'Courier New', monospace;
    letter-spacing: 0.25em;
    line-height: 1.5;
    transition: all 0.2s;
}
.pascal-row:hover {
    color: #2563eb;
    font-weight: bold;
}

/* Loto Digit Filter Highlight */
.loto-num.loto-highlight {
    background-color: #fef08a !important;
    color: #b45309 !important;
    font-weight: 900 !important;
    border-radius: 4px;
    padding: 0 4px;
    outline: 2px solid #f59e0b;
    animation: flashNumber 0.8s ease-in-out infinite;
}
.loto-num.loto-dimmed {
    opacity: 0.25;
}

/* Quick Filter Digit Buttons */
.digit-filter-btn {
    transition: all 0.15s ease-in-out;
}
.digit-filter-btn.active {
    background-color: #dc2626 !important;
    color: #ffffff !important;
    border-color: #b91c1c !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* Sổ mơ tag pills */
.dream-tag-btn {
    transition: all 0.15s ease-in-out;
}
.dream-tag-btn:hover {
    background-color: #eff6ff;
    border-color: #3b82f6;
    color: #1d4ed8;
}

/* Live Draw Realtime Styles */
.prize-placeholder {
    letter-spacing: 0.15em;
    user-select: none;
    opacity: 0.45;
}

.new-drawn-flash {
    background-color: #fef08a !important;
    color: #b91c1c !important;
    border-radius: 4px;
    padding: 1px 4px;
    animation: liveDrawPop 3s ease-out forwards;
}

@keyframes liveDrawPop {
    0% {
        transform: scale(1.25);
        background-color: #f59e0b;
        color: #ffffff;
        box-shadow: 0 0 12px rgba(245, 158, 11, 0.9);
    }
    30% {
        transform: scale(1.1);
        background-color: #fef08a;
        color: #b91c1c;
    }
    100% {
        transform: scale(1);
        background-color: transparent;
        box-shadow: none;
    }
}


