/* The Vigil CSS - Modern Surveillance Interface */

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

body {
    background: linear-gradient(135deg, #001a33 0%, #003366 50%, #001a33 100%);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Hero Section */
.hero-section {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: radial-gradient(ellipse at center, rgba(77, 148, 255, 0.1) 0%, transparent 70%);
}

.hero-content {
    text-align: center;
    z-index: 2;
    max-width: 800px;
    padding: 2rem;
}

.hero-icon {
    font-size: 4rem;
    margin-bottom: 2rem;
    color: var(--accent-primary);
    animation: float 3s ease-in-out infinite;
    filter: drop-shadow(0 0 10px rgba(77, 148, 255, 0.5));
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-family: var(--font-accent);
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-weight: 400;
}

/* Floating particles background */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--accent-primary);
    border-radius: 50%;
    animation: particleFloat 15s infinite linear;
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) translateX(0);
        opacity: 0;
    }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% {
        transform: translateY(-100vh) translateX(100px);
        opacity: 0;
    }
}

/* Main Content */
.main-content {
    min-height: 100vh;
    padding: 4rem 2rem;
    position: relative;
}

.intro-section {
    max-width: 800px;
    margin: 0 auto 4rem;
    text-align: center;
    transform: translateY(50px);
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.intro-section.visible {
    transform: translateY(0);
    opacity: 1;
}

.intro-text {
    background: rgba(240, 248, 255, 0.03);
    backdrop-filter: blur(15px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 3rem;
    font-size: 1.3rem;
    line-height: 1.8;
    color: var(--text-secondary);
    font-style: italic;
    position: relative;
    overflow: hidden;
}

.intro-text::before {
    content: '👁️';
    position: absolute;
    top: 1rem;
    left: 2rem;
    font-size: 4rem;
    opacity: 0.3;
}

/* Surveillance Container */
.surveillance-container {
    max-width: 1400px;
    margin: 0 auto 4rem;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    transform: translateY(50px);
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.surveillance-container.visible {
    transform: translateY(0);
    opacity: 1;
}

/* Camera Section */
.camera-section {
    background: rgba(240, 248, 255, 0.03);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.camera-section:hover {
    transform: translateY(-5px);
    border-color: var(--accent-primary);
    box-shadow: 
        0 25px 50px rgba(0, 26, 51, 0.3),
        0 0 50px rgba(77, 148, 255, 0.15);
}

.camera-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(77, 148, 255, 0.1),
        transparent
    );
    transition: left 0.8s ease;
}

.camera-section:hover::before {
    left: 100%;
}

/* Camera Display */
.camera-display {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 16px;
    overflow: hidden;
    background: #000;
    margin-bottom: 1.5rem;
}

.camera-feed {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
    position: relative;
    filter: contrast(1.1) brightness(0.95) saturate(0.9);
    animation: vhs-distortion 8s ease-in-out infinite;
}

/* VHS Effects */
.camera-display::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    background: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(255, 255, 255, 0.03) 2px,
            rgba(255, 255, 255, 0.03) 4px
        );
    animation: vhs-lines 0.1s linear infinite;
}

.camera-display::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    background: 
        linear-gradient(
            90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.1) 50%,
            transparent 100%
        );
    animation: vhs-static 3s linear infinite;
    opacity: 0;
}

/* VHS Static Band */
.camera-display .vhs-static-band {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 15px;
    background: 
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.3) 0%,
            rgba(255, 255, 255, 0.1) 50%,
            rgba(255, 255, 255, 0.3) 100%
        );
    z-index: 3;
    pointer-events: none;
    animation: vhs-static-sweep 4s linear infinite;
    opacity: 0.7;
    filter: blur(0.5px);
    mix-blend-mode: screen;
}

/* VHS Noise Overlay */
.camera-display .vhs-noise {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    background-image: 
        radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px),
        radial-gradient(circle, rgba(0,0,0,0.1) 1px, transparent 1px);
    background-size: 15px 15px, 25px 25px;
    background-position: 0 0, 10px 10px;
    animation: vhs-noise-flicker 0.5s steps(2) infinite;
    opacity: 0.3;
}

@keyframes vhs-lines {
    0% { transform: translateY(0); }
    100% { transform: translateY(-4px); }
}

@keyframes vhs-static {
    0% { 
        opacity: 0;
        transform: translateX(-100%);
    }
    2% { 
        opacity: 0.8;
        transform: translateX(-100%);
    }
    4% { 
        opacity: 0;
        transform: translateX(100%);
    }
    100% { 
        opacity: 0;
        transform: translateX(100%);
    }
}

@keyframes vhs-static-sweep {
    0% { 
        top: -15px;
        opacity: 0;
    }
    5% { 
        opacity: 0.7;
    }
    15% { 
        opacity: 0.7;
    }
    20% { 
        opacity: 0;
        top: 100%;
    }
    100% { 
        top: 100%;
        opacity: 0;
    }
}

@keyframes vhs-noise-flicker {
    0% { opacity: 0.3; }
    50% { opacity: 0.2; }
    100% { opacity: 0.3; }
}

/* VHS Distortion Effect - combine with existing camera-feed styles */

@keyframes vhs-distortion {
    0%, 100% { 
        transform: translateX(0);
        filter: contrast(1.1) brightness(0.95) saturate(0.9);
    }
    2% { 
        transform: translateX(1px);
        filter: contrast(1.15) brightness(0.9) saturate(0.85);
    }
    4% { 
        transform: translateX(-1px);
        filter: contrast(1.05) brightness(1.0) saturate(0.95);
    }
    6% { 
        transform: translateX(0);
        filter: contrast(1.1) brightness(0.95) saturate(0.9);
    }
}

.camera-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.overlay-data {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.camera-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--accent-primary);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 500;
    text-shadow: 0 0 10px rgba(77, 148, 255, 0.5);
}

.status-indicator {
    width: 8px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 50%;
    animation: pulse 1s infinite;
    box-shadow: 0 0 8px rgba(77, 148, 255, 0.7);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.timestamp {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 500;
    text-shadow: 0 0 10px rgba(240, 248, 255, 0.5);
}

.overlay-metrics {
    display: flex;
    gap: 2rem;
}

.metric {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

.metric span:first-child {
    color: var(--text-secondary);
    opacity: 0.8;
}

.metric span:last-child {
    color: var(--accent-primary);
    font-weight: 600;
}

/* Loading Indicator */
.loading-indicator {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 26, 51, 0.9);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    color: var(--accent-primary);
    font-family: var(--font-mono);
    z-index: 10;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 2px solid transparent;
    border-top: 2px solid var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Camera Navigation */
.camera-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}

.nav-btn {
    width: 48px;
    height: 48px;
    background: rgba(77, 148, 255, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--accent-primary);
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    backdrop-filter: blur(10px);
}

.nav-btn:hover {
    background: rgba(77, 148, 255, 0.2);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 
        0 10px 20px rgba(0, 26, 51, 0.2),
        0 0 20px rgba(77, 148, 255, 0.1);
}

.camera-counter {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 500;
}

/* Controls Panel */
.controls-panel {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.control-group {
    background: rgba(240, 248, 255, 0.03);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.control-group:hover {
    transform: translateY(-2px);
    border-color: var(--accent-primary);
    box-shadow: 
        0 15px 30px rgba(0, 26, 51, 0.2),
        0 0 30px rgba(77, 148, 255, 0.1);
}

.control-group h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--accent-primary);
    margin-bottom: 1.5rem;
    letter-spacing: -0.01em;
}

/* Status Grid */
.status-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: rgba(77, 148, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(77, 148, 255, 0.1);
    transition: all var(--transition-normal);
}

.status-item:hover {
    background: rgba(77, 148, 255, 0.1);
    border-color: rgba(77, 148, 255, 0.2);
}

.status-item .label {
    font-family: var(--font-main);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.status-item .value {
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--accent-primary);
}

.status-item .value.running {
    animation: pulse-text 1.5s infinite;
}

.status-item .value.low { color: var(--accent-primary); }
.status-item .value.medium { color: #ffaa00; }
.status-item .value.high { color: var(--accent-danger); }

@keyframes pulse-text {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Action Buttons */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.action-btn {
    padding: 1rem 1.5rem;
    background: rgba(77, 148, 255, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-normal);
    font-family: var(--font-main);
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    backdrop-filter: blur(10px);
}

.action-btn:hover {
    background: rgba(77, 148, 255, 0.2);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 
        0 10px 20px rgba(0, 26, 51, 0.2),
        0 0 20px rgba(77, 148, 255, 0.1);
}

.action-btn.anomaly {
    background: rgba(204, 51, 51, 0.1);
    border-color: rgba(204, 51, 51, 0.3);
    color: var(--accent-danger);
}

.action-btn.anomaly:hover {
    background: rgba(204, 51, 51, 0.2);
    border-color: var(--accent-danger);
    box-shadow: 
        0 10px 20px rgba(0, 26, 51, 0.2),
        0 0 20px rgba(204, 51, 51, 0.2);
}

/* Metrics Display */
.metrics-display {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.metric-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.85rem;
}

.metric-label {
    color: var(--text-secondary);
    min-width: 120px;
    font-family: var(--font-main);
}

.metric-progress {
    flex: 1;
    height: 6px;
    background: rgba(77, 148, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    border: 1px solid rgba(77, 148, 255, 0.2);
}

.metric-fill {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 3px;
    transition: width 1s ease;
    animation: metric-pulse 2s infinite ease-in-out;
}

.metric-fill.warning {
    background: linear-gradient(90deg, #cc6600, #ffaa00);
}

@keyframes metric-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.metric-value {
    color: var(--accent-primary);
    font-family: var(--font-mono);
    font-weight: 600;
    min-width: 40px;
    text-align: right;
}

/* Alert Feed */
.alert-feed {
    max-width: 800px;
    margin: 0 auto;
    background: rgba(240, 248, 255, 0.03);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    transform: translateY(50px);
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.alert-feed.visible {
    transform: translateY(0);
    opacity: 1;
}

.feed-header {
    padding: 1.5rem 2rem;
    background: rgba(77, 148, 255, 0.05);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.feed-header h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--accent-primary);
}

.feed-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.status-dot {
    width: 6px;
    height: 6px;
    background: var(--accent-primary);
    border-radius: 50%;
    animation: pulse 1s infinite;
}

.alerts-container {
    max-height: 300px;
    overflow-y: auto;
}

.alert-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 2rem;
    border-bottom: 1px solid rgba(77, 148, 255, 0.1);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    transition: all var(--transition-normal);
}

.alert-item:hover {
    background: rgba(77, 148, 255, 0.05);
}

.alert-item:last-child {
    border-bottom: none;
}

.alert-time {
    color: var(--accent-secondary);
    min-width: 60px;
    font-weight: 500;
}

.alert-message {
    color: var(--text-secondary);
    flex: 1;
}

.alert-item.warning {
    border-left: 3px solid #ffaa00;
}

.alert-item.warning .alert-message {
    color: #ffaa00;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 12vh;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-muted);
    animation: bounce 2s infinite;
    cursor: pointer;
    font-size: 1.2rem;
    z-index: 10;
}

/* Animations */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

/* Responsive */
@media (max-width: 1200px) {
    .surveillance-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 2rem 1rem;
    }
    
    .hero-section {
        height: 80vh;
    }
    
    .intro-text {
        padding: 2rem;
        font-size: 1.1rem;
    }
    
    .camera-section,
    .control-group {
        padding: 1.5rem;
    }
    
    .overlay-metrics {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .camera-nav {
        gap: 1rem;
    }
    
    .action-buttons {
        gap: 0.5rem;
    }
    
    .metric-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .metric-label {
        min-width: auto;
    }
}

/* Custom Scrollbar */
.alerts-container::-webkit-scrollbar {
    width: 6px;
}

.alerts-container::-webkit-scrollbar-track {
    background: rgba(77, 148, 255, 0.1);
}

.alerts-container::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 3px;
}

.alerts-container::-webkit-scrollbar-thumb:hover {
    background: var(--accent-secondary);
}