/* ═══════════════════════════════════════════════════════════
   ColorTone AI Lotto - Styles
   ═══════════════════════════════════════════════════════════ */

/* ── Lotto Ball Base ───────────────────────────────────────── */
.lotto-ball {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-weight: 700;
    color: white;
    font-size: 1.1rem;
    box-shadow: inset 0 -4px 6px rgba(0,0,0,0.2), 0 2px 8px rgba(0,0,0,0.15);
    position: relative;
    user-select: none;
}

.lotto-ball::after {
    content: '';
    position: absolute;
    top: 6px;
    left: 10px;
    width: 12px;
    height: 8px;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    transform: rotate(-20deg);
}

/* Small balls (for results table, hot/cold) */
.lotto-ball-sm {
    width: 28px;
    height: 28px;
    font-size: 0.7rem;
}

.lotto-ball-sm::after {
    top: 3px;
    left: 6px;
    width: 8px;
    height: 5px;
}

/* ── Ball Colors (Official Korean Lotto) ───────────────────── */
.ball-1-10  { background: linear-gradient(135deg, #fdb813, #f5a623); }
.ball-11-20 { background: linear-gradient(135deg, #69b8f7, #2196f3); }
.ball-21-30 { background: linear-gradient(135deg, #ff6b6b, #e53935); }
.ball-31-40 { background: linear-gradient(135deg, #9e9e9e, #616161); }
.ball-41-45 { background: linear-gradient(135deg, #81c784, #43a047); }

/* Bonus ball */
.lotto-ball-bonus {
    border: 3px solid #6366f1;
}

/* ── Ball Drop Animation ──────────────────────────────────── */
@keyframes ballDrop {
    0%   { transform: translateY(-40px) scale(0.5); opacity: 0; }
    50%  { transform: translateY(6px) scale(1.05); }
    70%  { transform: translateY(-3px) scale(0.98); }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}

.lotto-ball-animate {
    opacity: 0;
    animation: ballDrop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.lotto-ball-animate:nth-child(1) { animation-delay: 0.0s; }
.lotto-ball-animate:nth-child(2) { animation-delay: 0.12s; }
.lotto-ball-animate:nth-child(3) { animation-delay: 0.24s; }
.lotto-ball-animate:nth-child(4) { animation-delay: 0.36s; }
.lotto-ball-animate:nth-child(5) { animation-delay: 0.48s; }
.lotto-ball-animate:nth-child(6) { animation-delay: 0.60s; }

/* ── Paywall Blur ─────────────────────────────────────────── */
.blur-paywall {
    filter: blur(10px);
    pointer-events: none;
    user-select: none;
    transition: filter 0.3s ease;
}

.blur-paywall-light {
    filter: blur(6px);
    pointer-events: none;
    user-select: none;
}

/* ── Masked Ball (question mark) ──────────────────────────── */
.lotto-ball-masked {
    background: linear-gradient(135deg, #d1d5db, #9ca3af) !important;
    font-size: 1.3rem;
}

/* ── Frequency Grid Cell ──────────────────────────────────── */
.freq-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    padding: 4px 2px;
    font-size: 0.65rem;
    transition: transform 0.15s ease;
    cursor: default;
}

.freq-cell:hover {
    transform: scale(1.15);
}

.freq-cell .freq-num {
    font-weight: 700;
    font-size: 0.75rem;
}

.freq-cell .freq-count {
    font-size: 0.6rem;
    opacity: 0.7;
}

/* ── Match Badge ──────────────────────────────────────────── */
.match-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 700;
    color: white;
}

.match-0 { background: #d1d5db; color: #6b7280; }
.match-1 { background: #fbbf24; }
.match-2 { background: #f59e0b; }
.match-3 { background: #f97316; }
.match-4 { background: #ef4444; }
.match-5 { background: #dc2626; }
.match-6 { background: linear-gradient(135deg, #fbbf24, #f59e0b); box-shadow: 0 0 12px rgba(251,191,36,0.6); }

/* ── AI Analysis Card ─────────────────────────────────────── */
.ai-card {
    background: #f9fafb;
    border-radius: 12px;
    padding: 12px 16px;
    border-left: 3px solid #6366f1;
    transition: background 0.2s;
}

.ai-card:hover {
    background: #f3f4f6;
}

.ai-card-provider {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #9ca3af;
}

/* ── Countdown ────────────────────────────────────────────── */
.tabular-nums {
    font-variant-numeric: tabular-nums;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 640px) {
    .lotto-ball {
        width: 40px;
        height: 40px;
        font-size: 0.95rem;
    }

    .lotto-ball::after {
        top: 5px;
        left: 8px;
        width: 10px;
        height: 6px;
    }

    .freq-cell {
        padding: 2px 1px;
        font-size: 0.55rem;
    }

    .freq-cell .freq-num {
        font-size: 0.65rem;
    }
}
