:root {
    --deep-void: #0a0a14;
    --panel-bg: rgba(18, 18, 35, 0.85);
    --glass-border: rgba(120, 80, 255, 0.15);
    --accent-purple: #8b5cf6;
    --accent-blue: #3b82f6;
    --accent-cyan: #06b6d4;
    --accent-pink: #ec4899;
    --neon-green: #22d3ee;
    --text-primary: #e8e4f0;
    --text-secondary: #9390a8;
    --danger: #ef4444;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background: var(--deep-void);
    color: var(--text-primary);
    font-family: 'Anybody', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

.font-mono { font-family: 'JetBrains Mono', monospace; }

/* Animated background */
.bg-particles {
    position: fixed;
    inset: 0;
    z-index: 0;
    background: 
        radial-gradient(ellipse 80% 60% at 20% 80%, rgba(139,92,246,0.08) 0%, transparent 60%),
        radial-gradient(ellipse 60% 80% at 80% 20%, rgba(59,130,246,0.06) 0%, transparent 60%),
        radial-gradient(ellipse 50% 50% at 50% 50%, rgba(6,182,212,0.03) 0%, transparent 70%);
    pointer-events: none;
}

.bg-particles::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(1px 1px at 10% 20%, rgba(139,92,246,0.4) 0%, transparent 100%),
        radial-gradient(1px 1px at 30% 60%, rgba(59,130,246,0.3) 0%, transparent 100%),
        radial-gradient(1px 1px at 50% 10%, rgba(6,182,212,0.35) 0%, transparent 100%),
        radial-gradient(1px 1px at 70% 80%, rgba(236,72,153,0.3) 0%, transparent 100%),
        radial-gradient(1px 1px at 90% 40%, rgba(139,92,246,0.25) 0%, transparent 100%),
        radial-gradient(1px 1px at 15% 90%, rgba(59,130,246,0.3) 0%, transparent 100%),
        radial-gradient(1px 1px at 85% 15%, rgba(6,182,212,0.4) 0%, transparent 100%);
    animation: sparkleFloat 20s ease-in-out infinite alternate;
}

@keyframes sparkleFloat {
    0% { transform: translateY(0) rotate(0deg); opacity: 0.6; }
    50% { opacity: 1; }
    100% { transform: translateY(-30px) rotate(1deg); opacity: 0.6; }
}

/* Glass panels */
.glass-panel {
    background: var(--panel-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
}

/* Timer glow */
.timer-glow {
    text-shadow: 0 0 20px currentColor, 0 0 40px currentColor, 0 0 60px currentColor;
}

@keyframes timerPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.85; transform: scale(1.02); }
}

.timer-pulse {
    animation: timerPulse 1s ease-in-out infinite;
}

@keyframes timerShake {
    0%, 100% { transform: translateX(0) rotate(0deg); }
    10% { transform: translateX(-3px) rotate(-1deg); }
    30% { transform: translateX(3px) rotate(1deg); }
    50% { transform: translateX(-2px) rotate(-0.5deg); }
    70% { transform: translateX(2px) rotate(0.5deg); }
    90% { transform: translateX(-1px) rotate(0deg); }
}

.timer-shake {
    animation: timerShake 0.3s ease-in-out infinite;
}

/* Panic mode */
.panic-mode::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 50;
    box-shadow: inset 0 0 120px rgba(239,68,68,0.3), inset 0 0 60px rgba(239,68,68,0.15);
    animation: panicPulse 0.8s ease-in-out infinite alternate;
}

@keyframes panicPulse {
    0% { box-shadow: inset 0 0 80px rgba(239,68,68,0.2), inset 0 0 40px rgba(239,68,68,0.1); }
    100% { box-shadow: inset 0 0 140px rgba(239,68,68,0.4), inset 0 0 70px rgba(239,68,68,0.2); }
}

/* Upload zone */
.upload-zone {
    border: 2px dashed rgba(139,92,246,0.4);
    transition: all 0.3s ease;
}

.upload-zone:hover, .upload-zone.drag-over {
    border-color: var(--accent-purple);
    background: rgba(139,92,246,0.06);
    box-shadow: 0 0 30px rgba(139,92,246,0.1);
}

/* Chat bubbles */
.chat-user {
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    border-radius: 18px 18px 4px 18px;
}

.chat-ai {
    background: rgba(40, 38, 60, 0.9);
    border: 1px solid rgba(139,92,246,0.2);
    border-radius: 18px 18px 18px 4px;
}

/* Typing dots */
@keyframes typingBounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-6px); }
}

.typing-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--text-secondary);
    animation: typingBounce 1.2s ease-in-out infinite;
}

.typing-dot:nth-child(2) { animation-delay: 0.15s; }
.typing-dot:nth-child(3) { animation-delay: 0.3s; }

/* Suggestion chips */
.chip {
    background: rgba(139,92,246,0.12);
    border: 1px solid rgba(139,92,246,0.25);
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 300;
}

.chip:hover {
    background: rgba(139,92,246,0.25);
    border-color: var(--accent-purple);
    box-shadow: 0 0 15px rgba(139,92,246,0.2);
    transform: translateY(-1px);
}

/* Thumbnail strip */
.thumb-strip {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 8px 4px;
    scrollbar-width: thin;
    scrollbar-color: rgba(139,92,246,0.3) transparent;
}

.thumb-strip::-webkit-scrollbar { height: 4px; }
.thumb-strip::-webkit-scrollbar-track { background: transparent; }
.thumb-strip::-webkit-scrollbar-thumb { background: rgba(139,92,246,0.3); border-radius: 4px; }

.thumb-item {
    flex-shrink: 0;
    border: 2px solid transparent;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.thumb-item:hover, .thumb-item.active {
    border-color: var(--accent-purple);
    box-shadow: 0 0 15px rgba(139,92,246,0.3);
}

/* Confetti overlay */
@keyframes confettiFall {
    0% { transform: translateY(-100vh) rotate(0deg); opacity: 1; }
    100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

.confetti-piece {
    position: fixed;
    width: 10px;
    height: 10px;
    top: -10px;
    z-index: 100;
    animation: confettiFall 3s ease-in forwards;
}

/* Scrollbar global */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(139,92,246,0.25); border-radius: 3px; }

/* Neon button */
.neon-btn {
    position: relative;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
    border: none;
    border-radius: 12px;
    color: white;
    font-family: 'Anybody', sans-serif;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
    overflow: hidden;
}

.neon-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(139,92,246,0.4);
}

.neon-btn:active {
    transform: translateY(0);
}

/* Stats bar */
.stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 300;
    color: var(--text-secondary);
}

.stat-value {
    color: var(--accent-cyan);
    font-weight: 700;
}

/* Image compare */
.image-label {
    position: absolute;
    top: 8px;
    padding: 3px 10px;
    border-radius: 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.label-before {
    left: 8px;
    background: rgba(239,68,68,0.8);
}

.label-after {
    right: 8px;
    background: rgba(34,211,238,0.8);
}

/* Fade in animation */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in-up {
    animation: fadeInUp 0.4s ease-out;
}

/* Time's up overlay */
.times-up-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10,10,20,0.92);
    backdrop-filter: blur(10px);
}

@keyframes scaleIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.scale-in {
    animation: scaleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .main-layout {
        flex-direction: column !important;
    }
    .image-panel, .chat-panel {
        width: 100% !important;
        max-width: 100% !important;
    }
}