/* web/static/css/styles.css */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800;900&family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
    --bg-main: #0B0F17;
    --bg-card: rgba(17, 24, 39, 0.75);
    --bg-card-hover: rgba(31, 41, 55, 0.85);
    --border-glass: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(16, 185, 129, 0.25);
    --emerald-primary: #10B981;
    --emerald-glow: rgba(16, 185, 129, 0.4);
    --indigo-primary: #6366F1;
}

body {
    background-color: var(--bg-main);
    color: #F3F4F6;
    font-family: 'Inter', 'Cairo', sans-serif;
    overflow-x: hidden;
}

/* Glassmorphic panels */
.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: 1rem;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    transition: all 0.25s ease-in-out;
}

.glass-panel:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.glass-card-interactive {
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.glass-card-interactive:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px -5px rgba(0, 0, 0, 0.6);
    border-color: rgba(16, 185, 129, 0.3);
}

/* Neon accents & glows */
.glow-emerald {
    box-shadow: 0 0 25px -5px var(--emerald-glow);
}

.glow-indigo {
    box-shadow: 0 0 25px -5px rgba(99, 102, 241, 0.4);
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.6);
}

::-webkit-scrollbar-thumb {
    background: rgba(51, 65, 85, 0.8);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(100, 116, 139, 1);
}

/* Pulse live dot */
@keyframes pulse-live {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.live-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #10B981;
    animation: pulse-live 2s infinite;
}

/* Terminal Console View */
.terminal-view {
    background: #050811;
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.825rem;
}

.terminal-line {
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    margin-bottom: 0.15rem;
    line-height: 1.4;
    transition: background 0.15s ease;
}

.terminal-line:hover {
    background: rgba(255, 255, 255, 0.04);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.65rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: #34D399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-pending {
    background: rgba(245, 158, 11, 0.15);
    color: #FBBF24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #F87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-info {
    background: rgba(59, 130, 246, 0.15);
    color: #60A5FA;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

/* Image preview cards */
.media-preview-item {
    position: relative;
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #1E293B;
}

.media-preview-item .remove-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(0, 0, 0, 0.75);
    color: #EF4444;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.media-preview-item .remove-btn:hover {
    background: #EF4444;
    color: white;
    transform: scale(1.1);
}

/* Tab Active Styles */
.nav-tab.active {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(99, 102, 241, 0.15));
    border-color: rgba(16, 185, 129, 0.4);
    color: #FFFFFF;
    font-weight: 600;
}

/* ==========================================================================
   Comment Sniper Modern HUD & Live Radar Loading Styles
   ========================================================================== */

/* Rotating Radar Sweep */
@keyframes sniper-radar-spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.sniper-radar-sweep {
    background: conic-gradient(from 0deg, rgba(244, 63, 94, 0.6) 0deg, rgba(244, 63, 94, 0.15) 60deg, transparent 90deg);
    animation: sniper-radar-spin 2.2s linear infinite;
}

/* Shimmer Light Reflection on Progress Bar */
@keyframes sniper-shimmer-flow {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.sniper-progress-shimmer {
    background-size: 200% 100%;
    animation: sniper-shimmer-flow 2.5s infinite linear;
}

/* Pipeline Stage Highlights */
.phase-step {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.phase-step.phase-active {
    background: rgba(244, 63, 94, 0.15) !important;
    border-color: rgba(244, 63, 94, 0.6) !important;
    box-shadow: 0 0 20px -3px rgba(244, 63, 94, 0.35);
    transform: translateY(-1px);
}

.phase-step.phase-active .phase-icon {
    background: linear-gradient(135deg, #e11d48, #f43f5e) !important;
    color: #ffffff !important;
    box-shadow: 0 0 10px rgba(244, 63, 94, 0.6);
}

.phase-step.phase-done {
    background: rgba(16, 185, 129, 0.1) !important;
    border-color: rgba(16, 185, 129, 0.45) !important;
}

.phase-step.phase-done .phase-icon {
    background: #059669 !important;
    color: #ffffff !important;
}

/* Sniper Segment Tabs */
.sniper-seg-tab {
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    background: rgba(17, 24, 39, 0.6);
    border: 1px solid rgba(55, 65, 81, 0.6);
    color: #9ca3af;
}
.sniper-seg-tab:hover {
    border-color: rgba(244, 63, 94, 0.4);
}
.sniper-seg-tab.active {
    outline: 2px solid rgba(244, 63, 94, 0.6);
    outline-offset: 1px;
    box-shadow: 0 0 10px rgba(244, 63, 94, 0.25);
}

/* Glow Number Text */
.text-glow-rose {
    text-shadow: 0 0 15px rgba(244, 63, 94, 0.6), 0 0 30px rgba(244, 63, 94, 0.2);
}