/* ===========================
   ELITE TECH/AV PRODUCTION THEME
   Cinematic • Broadcast • Professional
   =========================== */

/* ===========================
   CINEMATIC EFFECTS
   =========================== */

/* Film Strip Border */
@keyframes filmStrip {
    0%, 100% {
        box-shadow: 
            inset 0 0 0 2px #00ff88,
            inset 0 8px 0 -6px #00ff88,
            inset 0 16px 0 -6px #00ff88,
            inset 0 24px 0 -6px #00ff88,
            0 0 30px rgba(0, 255, 136, 0.4);
    }
    50% {
        box-shadow: 
            inset 0 0 0 2px #00f5ff,
            inset 0 8px 0 -6px #00f5ff,
            inset 0 16px 0 -6px #00f5ff,
            inset 0 24px 0 -6px #00f5ff,
            0 0 50px rgba(0, 245, 255, 0.4);
    }
}

.film-strip {
    animation: filmStrip 3s ease-in-out infinite;
}

/* Cinematic Letterbox */
.cinematic-frame {
    position: relative;
    overflow: hidden;
}

.cinematic-frame::before,
.cinematic-frame::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 15%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.9),
        rgba(0, 0, 0, 0.7)
    );
    z-index: 10;
}

.cinematic-frame::before {
    top: 0;
}

.cinematic-frame::after {
    bottom: 0;
}

/* ===========================
   AUDIO VISUALIZATION
   =========================== */

@keyframes audioWave {
    0%, 100% {
        height: 20%;
    }
    50% {
        height: 100%;
    }
}

.audio-visualizer {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 4px;
    height: 60px;
}

.audio-bar {
    width: 4px;
    background: linear-gradient(to top, #00ff88, #00f5ff);
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.6);
    animation: audioWave 0.6s ease-in-out infinite;
}

.audio-bar:nth-child(1) { animation-delay: 0s; }
.audio-bar:nth-child(2) { animation-delay: 0.1s; }
.audio-bar:nth-child(3) { animation-delay: 0.2s; }
.audio-bar:nth-child(4) { animation-delay: 0.3s; }
.audio-bar:nth-child(5) { animation-delay: 0.4s; }
.audio-bar:nth-child(6) { animation-delay: 0.3s; }
.audio-bar:nth-child(7) { animation-delay: 0.2s; }
.audio-bar:nth-child(8) { animation-delay: 0.1s; }

/* ===========================
   VU METER EFFECTS
   =========================== */

@keyframes vuMeter {
    0% {
        width: 30%;
        box-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
    }
    50% {
        width: 80%;
        box-shadow: 0 0 30px rgba(0, 255, 136, 0.8);
    }
    100% {
        width: 30%;
        box-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
    }
}

.vu-meter {
    height: 8px;
    background: rgba(0, 255, 136, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin: 1rem 0;
}

.vu-meter-bar {
    height: 100%;
    background: linear-gradient(90deg, #00ff88, #00f5ff);
    border-radius: 4px;
    animation: vuMeter 2s ease-in-out infinite;
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.6);
}

/* ===========================
   BROADCAST EFFECTS
   =========================== */

/* Static Noise Effect */
@keyframes staticNoise {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 100% 100%;
    }
}

.broadcast-static {
    position: relative;
    overflow: hidden;
}

.broadcast-static::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' seed='2'/%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    background-size: 200px 200px;
    animation: staticNoise 0.2s linear infinite;
    pointer-events: none;
    z-index: 1;
}

/* Interlace Effect */
.interlace {
    position: relative;
}

.interlace::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15),
        rgba(0, 0, 0, 0.15) 50%,
        transparent 50%,
        transparent
    );
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 2;
}

/* Chromatic Aberration */
@keyframes chromaticShift {
    0%, 100% {
        text-shadow: 
            -2px 0 #00ff88,
            2px 0 #00f5ff,
            0 0 10px rgba(0, 255, 136, 0.3);
    }
    50% {
        text-shadow: 
            -3px 0 #00ff88,
            3px 0 #00f5ff,
            0 0 15px rgba(0, 255, 136, 0.5);
    }
}

.chromatic-text {
    animation: chromaticShift 2s ease-in-out infinite;
    font-weight: 900;
}

/* ===========================
   WAVEFORM DISPLAY
   =========================== */

.waveform-container {
    position: relative;
    height: 100px;
    background: rgba(0, 255, 136, 0.05);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: 8px;
    overflow: hidden;
    margin: 2rem 0;
}

.waveform {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(
        to top,
        rgba(0, 255, 136, 0.4),
        rgba(0, 255, 136, 0.1)
    );
}

.waveform-line {
    position: absolute;
    bottom: 50%;
    width: 2px;
    background: linear-gradient(to top, #00ff88, transparent);
    left: var(--position);
    animation: waveformPulse 0.8s ease-in-out infinite;
}

@keyframes waveformPulse {
    0%, 100% {
        height: 0%;
        opacity: 0;
    }
    50% {
        height: 100%;
        opacity: 1;
    }
}

/* ===========================
   SPECTRUM ANALYZER
   =========================== */

.spectrum-analyzer {
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    height: 80px;
    gap: 3px;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.05), rgba(0, 245, 255, 0.05));
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: 12px;
    margin: 2rem 0;
}

.spectrum-bar {
    width: 100%;
    background: linear-gradient(to top, #00ff88, #00f5ff);
    border-radius: 4px 4px 0 0;
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.5);
    animation: spectrumPulse 0.5s ease-in-out infinite;
}

@keyframes spectrumPulse {
    0%, 100% {
        height: 20%;
    }
    50% {
        height: 100%;
    }
}

.spectrum-bar:nth-child(1) { animation-delay: 0s; }
.spectrum-bar:nth-child(2) { animation-delay: 0.05s; }
.spectrum-bar:nth-child(3) { animation-delay: 0.1s; }
.spectrum-bar:nth-child(4) { animation-delay: 0.15s; }
.spectrum-bar:nth-child(5) { animation-delay: 0.2s; }
.spectrum-bar:nth-child(6) { animation-delay: 0.15s; }
.spectrum-bar:nth-child(7) { animation-delay: 0.1s; }
.spectrum-bar:nth-child(8) { animation-delay: 0.05s; }

/* ===========================
   TIMECODE DISPLAY
   =========================== */

.timecode {
    font-family: 'Courier New', monospace;
    font-size: 1.2rem;
    font-weight: bold;
    color: #00ff88;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.6);
    letter-spacing: 2px;
    background: rgba(0, 0, 0, 0.5);
    padding: 0.5rem 1rem;
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 4px;
    display: inline-block;
    margin: 1rem 0;
}

@keyframes timecodeBlink {
    0%, 49%, 100% {
        opacity: 1;
    }
    50%, 99% {
        opacity: 0.7;
    }
}

.timecode-blink {
    animation: timecodeBlink 1s step-start infinite;
}

/* ===========================
   CAMERA FOCUS EFFECT
   =========================== */

@keyframes focusPulse {
    0%, 100% {
        box-shadow: 
            0 0 0 0 rgba(0, 255, 136, 0.4),
            inset 0 0 20px rgba(0, 255, 136, 0.1);
    }
    50% {
        box-shadow: 
            0 0 0 10px rgba(0, 255, 136, 0),
            inset 0 0 30px rgba(0, 255, 136, 0.2);
    }
}

.camera-focus {
    animation: focusPulse 2s ease-in-out infinite;
    border: 2px solid rgba(0, 255, 136, 0.3);
    border-radius: 12px;
}

/* ===========================
   BROADCAST TICKER
   =========================== */

@keyframes tickerScroll {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

.broadcast-ticker {
    background: linear-gradient(90deg, #0a0e1a, #111827, #0a0e1a);
    border-top: 2px solid #00ff88;
    border-bottom: 2px solid #00ff88;
    padding: 1rem;
    overflow: hidden;
    position: relative;
}

.ticker-content {
    display: flex;
    gap: 3rem;
    animation: tickerScroll 20s linear infinite;
    white-space: nowrap;
}

.ticker-item {
    color: #00ff88;
    font-weight: 600;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.ticker-item::before {
    content: '●';
    color: #00f5ff;
}

/* ===========================
   PROFESSIONAL BADGE
   =========================== */

.pro-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.2), rgba(0, 245, 255, 0.1));
    border: 2px solid #00ff88;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #00ff88;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.4);
    box-shadow: 
        0 0 20px rgba(0, 255, 136, 0.3),
        inset 0 0 20px rgba(0, 255, 136, 0.1);
    position: relative;
}

.pro-badge::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--gradient-chroma);
    border-radius: 50px;
    z-index: -1;
    opacity: 0;
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% {
        opacity: 0;
        transform: scale(1);
    }
    50% {
        opacity: 0.3;
        transform: scale(1.05);
    }
}

/* ===========================
   PROFESSIONAL GRID OVERLAY
   =========================== */

.professional-grid {
    position: relative;
    background-image: 
        linear-gradient(0deg, transparent 24%, rgba(0, 255, 136, 0.05) 25%, rgba(0, 255, 136, 0.05) 26%, transparent 27%, transparent 74%, rgba(0, 255, 136, 0.05) 75%, rgba(0, 255, 136, 0.05) 76%, transparent 77%, transparent),
        linear-gradient(90deg, transparent 24%, rgba(0, 255, 136, 0.05) 25%, rgba(0, 255, 136, 0.05) 26%, transparent 27%, transparent 74%, rgba(0, 255, 136, 0.05) 75%, rgba(0, 255, 136, 0.05) 76%, transparent 77%, transparent);
    background-size: 50px 50px;
}

.professional-grid::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(0deg, transparent 24%, rgba(0, 245, 255, 0.03) 25%, rgba(0, 245, 255, 0.03) 26%, transparent 27%, transparent 74%, rgba(0, 245, 255, 0.03) 75%, rgba(0, 245, 255, 0.03) 76%, transparent 77%, transparent),
        linear-gradient(90deg, transparent 24%, rgba(0, 245, 255, 0.03) 25%, rgba(0, 245, 255, 0.03) 26%, transparent 27%, transparent 74%, rgba(0, 245, 255, 0.03) 75%, rgba(0, 245, 255, 0.03) 76%, transparent 77%, transparent);
    background-size: 100px 100px;
    pointer-events: none;
}

/* ===========================
   SIGNAL STRENGTH INDICATOR
   =========================== */

.signal-strength {
    display: flex;
    gap: 3px;
    align-items: flex-end;
}

.signal-bar {
    width: 4px;
    background: #00ff88;
    border-radius: 2px;
    box-shadow: 0 0 8px rgba(0, 255, 136, 0.6);
}

.signal-bar.active {
    animation: signalPulse 0.5s ease-in-out infinite;
}

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

.signal-bar:nth-child(1) { height: 20%; }
.signal-bar:nth-child(2) { height: 40%; }
.signal-bar:nth-child(3) { height: 60%; }
.signal-bar:nth-child(4) { height: 80%; }
.signal-bar:nth-child(5) { height: 100%; }

/* ===========================
   PROFESSIONAL DIVIDER
   =========================== */

.pro-divider {
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent,
        #00ff88 20%,
        #00f5ff 50%,
        #00ff88 80%,
        transparent
    );
    margin: 3rem 0;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.4);
    position: relative;
}

.pro-divider::before,
.pro-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background: #00ff88;
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.6);
}

.pro-divider::before {
    left: 0;
}

.pro-divider::after {
    right: 0;
}

/* ===========================
   LIVE INDICATOR
   =========================== */

@keyframes livePulse {
    0%, 100% {
        box-shadow: 0 0 10px rgba(255, 0, 0, 0.6);
    }
    50% {
        box-shadow: 0 0 20px rgba(255, 0, 0, 0.9);
    }
}

.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 0, 0, 0.1);
    border: 2px solid #ff0000;
    border-radius: 4px;
    font-weight: 700;
    color: #ff0000;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.85rem;
}

.live-dot {
    width: 10px;
    height: 10px;
    background: #ff0000;
    border-radius: 50%;
    animation: livePulse 1s ease-in-out infinite;
}

/* ===========================
   PROFESSIONAL CARD BORDER
   =========================== */

.pro-card {
    position: relative;
    background: var(--dark-surface);
    border-radius: 16px;
    overflow: hidden;
}

.pro-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(0, 255, 136, 0.1) 0%,
        transparent 50%,
        rgba(0, 245, 255, 0.1) 100%
    );
    pointer-events: none;
    border-radius: 16px;
}

.pro-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-chroma);
    opacity: 0;
    animation: topBorderGlow 2s ease-in-out infinite;
}

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

/* ===========================
   RECORDING INDICATOR
   =========================== */

@keyframes recordingBlink {
    0%, 49%, 100% {
        background: #ff0000;
        box-shadow: 0 0 15px rgba(255, 0, 0, 0.8);
    }
    50%, 99% {
        background: #cc0000;
        box-shadow: 0 0 8px rgba(255, 0, 0, 0.4);
    }
}

.recording-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 0, 0, 0.1);
    border: 2px solid #ff0000;
    border-radius: 50px;
    font-weight: 700;
    color: #ff0000;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.recording-dot {
    width: 12px;
    height: 12px;
    background: #ff0000;
    border-radius: 50%;
    animation: recordingBlink 0.6s step-start infinite;
}

/* ===========================
   PROFESSIONAL HOVER EFFECTS
   =========================== */

.pro-hover {
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.pro-hover:hover {
    transform: translateY(-8px);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(0, 255, 136, 0.3),
        inset 0 0 20px rgba(0, 255, 136, 0.1);
}

.pro-hover:hover::before {
    opacity: 1;
}

/* ===========================
   RESPONSIVE ADJUSTMENTS
   =========================== */

@media (max-width: 768px) {
    .cinematic-frame::before,
    .cinematic-frame::after {
        height: 10%;
    }
    
    .audio-visualizer {
        height: 40px;
    }
    
    .spectrum-analyzer {
        height: 60px;
    }
}

/* ===========================
   PERFORMANCE OPTIMIZATIONS
   =========================== */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Disable animations on low-end devices */
@media (max-width: 480px) {
    .audio-visualizer,
    .spectrum-analyzer,
    .broadcast-ticker {
        animation: none;
    }
}
