/* ═══════════════════════════════════════════════════
   DealHunter PK — Stylesheet
   Premium dark glassmorphic design system
   ═══════════════════════════════════════════════════ */

/* ── Reset ── */
* { box-sizing: border-box; }

/* ── Body ── */
body {
    background: linear-gradient(135deg, #0f172a 0%, #1a1a2e 25%, #0f172a 50%, #16213e 75%, #0f172a 100%);
    background-attachment: fixed;
    min-height: 100vh;
}

/* ── Ambient Background Orbs ── */
.bg-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
    pointer-events: none;
    z-index: 0;
}
.bg-orb-1 { width: 500px; height: 500px; top: -100px; left: -100px; background: #2e91ff; }
.bg-orb-2 { width: 400px; height: 400px; bottom: -50px; right: -50px; background: #a855f7; }
.bg-orb-3 { width: 300px; height: 300px; top: 50%; left: 50%; transform: translate(-50%, -50%); background: #06b6d4; }

/* ── Glassmorphism ── */
.glass {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.glass-light {
    background: rgba(30, 41, 59, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

/* ── Car Cards ── */
.car-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.car-card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 20px 60px -15px rgba(46, 145, 255, 0.2),
                0 0 0 1px rgba(46, 145, 255, 0.15);
}

/* ── Deal Badge Variants ── */
.deal-badge-hot {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    animation: pulseGlow 2s ease-in-out infinite;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
}
.deal-badge-great {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}
.deal-badge-fair {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}
.deal-badge-avg {
    background: linear-gradient(135deg, #64748b, #475569);
}
.deal-badge-over {
    background: linear-gradient(135deg, #6b7280, #4b5563);
}

/* ── Gradient Text ── */
.price-gradient {
    background: linear-gradient(135deg, #22c55e, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-gradient {
    background: linear-gradient(135deg, #2e91ff 0%, #a855f7 50%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Stat Card Glow Bar ── */
.stat-card {
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--glow-color, #2e91ff), transparent);
}

/* ── Score Ring ── */
.score-ring {
    position: relative;
    width: 48px;
    height: 48px;
}
.score-ring svg {
    transform: rotate(-90deg);
}

/* ── Image Container ── */
.car-image-container {
    position: relative;
    overflow: hidden;
}
.car-image-container img {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.car-card:hover .car-image-container img {
    transform: scale(1.08);
}

/* ── Custom Scrollbar ── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #0f172a; }
::-webkit-scrollbar-thumb { background: #334155; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #475569; }

/* ── Skeleton Loading ── */
.skeleton {
    background: linear-gradient(90deg, rgba(30,41,59,0.4) 25%, rgba(51,65,85,0.4) 50%, rgba(30,41,59,0.4) 75%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite linear;
    border-radius: 8px;
}

/* ── Filter Chips ── */
.filter-chip {
    transition: all 0.2s ease;
}
.filter-chip:hover {
    background: rgba(46, 145, 255, 0.15);
    border-color: rgba(46, 145, 255, 0.5);
}
.filter-chip.active {
    background: rgba(46, 145, 255, 0.2);
    border-color: #2e91ff;
    color: #2e91ff;
}

/* ── Card Enter Animation ── */
.card-enter {
    animation: slideUp 0.5s ease-out forwards;
    opacity: 0;
}

/* ── Search Input Glow ── */
.search-glow:focus {
    box-shadow: 0 0 0 2px rgba(46, 145, 255, 0.3), 0 0 20px rgba(46, 145, 255, 0.1);
}

/* ── Utility: No Scrollbar ── */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* ── Scraper Button ── */
.scraper-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.scraper-btn:hover {
    box-shadow: 0 0 25px rgba(46, 145, 255, 0.3), 0 0 0 1px rgba(46, 145, 255, 0.3);
    transform: translateY(-1px);
}
.scraper-btn:active {
    transform: translateY(0) scale(0.98);
}
.scraper-btn.running {
    pointer-events: none;
}
.scraper-btn .btn-shine {
    position: absolute;
    top: 0; left: -100%; right: 0; bottom: 0;
    width: 50%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    animation: none;
}
.scraper-btn:hover .btn-shine {
    animation: btnShine 0.8s ease-out;
}

/* ── Scraper Log Console ── */
.scraper-console {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    line-height: 1.6;
    max-height: 200px;
    overflow-y: auto;
    scroll-behavior: smooth;
}
.scraper-console::-webkit-scrollbar { width: 4px; }
.scraper-console::-webkit-scrollbar-thumb { background: #475569; border-radius: 2px; }

.log-info { color: #94a3b8; }
.log-success { color: #22c55e; }
.log-warning { color: #f59e0b; }
.log-error { color: #ef4444; }
.log-highlight { color: #2e91ff; }

/* ── Progress Bar ── */
.scraper-progress {
    height: 3px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.05);
    overflow: hidden;
}
.scraper-progress-bar {
    height: 100%;
    border-radius: 2px;
    background: linear-gradient(90deg, #2e91ff, #a855f7);
    transition: width 0.5s ease;
}

/* ── Keyframes ── */
@keyframes btnShine {
    0% { left: -100%; }
    100% { left: 200%; }
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 5px rgba(46, 145, 255, 0.3); }
    50% { box-shadow: 0 0 20px rgba(46, 145, 255, 0.6), 0 0 40px rgba(46, 145, 255, 0.2); }
}

@keyframes slideUp {
    0% { transform: translateY(30px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

@keyframes scaleIn {
    0% { transform: scale(0.9); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
