/* Enhanced Weather Notification Bar with Ultra-Smooth Animations */
.weather-notification-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #ff4444 0%, #cc1111 100%);
    color: white !important;
    padding: 14px 0;
    font-weight: 700;
    text-align: center;
    z-index: 9999;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    border-bottom: 3px solid rgba(255,255,255,0.3);
    overflow: hidden;
    white-space: nowrap;
    backdrop-filter: blur(10px);
}

/* Ensure all notification text is white */
.weather-notification-bar *,
.weather-notification-bar span,
.weather-notification-bar div,
.weather-notification-bar p,
.weather-notification-content,
.weather-notification-content * {
    color: white !important;
}

.weather-notification-content {
    display: inline-block;
    padding-left: 100%;
    animation: ultra-smooth-scroll 200s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite;
    font-size: 17px;
    letter-spacing: 0.8px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Ultra-smooth 20-keyframe animation with perfect cubic-bezier easing */
@keyframes ultra-smooth-scroll {
    0% { transform: translate3d(100%, 0, 0); }
    5% { transform: translate3d(90%, 0, 0); }
    10% { transform: translate3d(80%, 0, 0); }
    15% { transform: translate3d(70%, 0, 0); }
    20% { transform: translate3d(60%, 0, 0); }
    25% { transform: translate3d(50%, 0, 0); }
    30% { transform: translate3d(40%, 0, 0); }
    35% { transform: translate3d(30%, 0, 0); }
    40% { transform: translate3d(20%, 0, 0); }
    45% { transform: translate3d(10%, 0, 0); }
    50% { transform: translate3d(0%, 0, 0); }
    55% { transform: translate3d(-10%, 0, 0); }
    60% { transform: translate3d(-20%, 0, 0); }
    65% { transform: translate3d(-30%, 0, 0); }
    70% { transform: translate3d(-40%, 0, 0); }
    75% { transform: translate3d(-50%, 0, 0); }
    80% { transform: translate3d(-60%, 0, 0); }
    85% { transform: translate3d(-70%, 0, 0); }
    90% { transform: translate3d(-80%, 0, 0); }
    95% { transform: translate3d(-90%, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}

/* Enhanced thunderstorm animation */
.weather-notification-bar.thunderstorm {
    background: linear-gradient(135deg, #ff9800 0%, #f57000 100%);
    animation: enhanced-thunder-flash 4s ease-in-out infinite;
}

@keyframes enhanced-thunder-flash {
    0%, 85%, 100% { 
        background: linear-gradient(135deg, #ff9800 0%, #f57000 100%);
        box-shadow: 0 4px 20px rgba(0,0,0,0.4);
        border-bottom-color: rgba(255,255,255,0.3);
    }
    3%, 6% { 
        background: linear-gradient(135deg, #fff 0%, #ffeb3b 100%);
        box-shadow: 0 4px 30px rgba(255,235,59,0.9);
        border-bottom-color: rgba(255,255,255,0.8);
    }
    8%, 11% { 
        background: linear-gradient(135deg, #e3f2fd 0%, #90caf9 100%);
        box-shadow: 0 4px 25px rgba(144,202,249,0.7);
        border-bottom-color: rgba(255,255,255,0.6);
    }
}

/* Tornado warning - ultra-intense animation */
.weather-notification-bar.tornado {
    background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%);
    animation: tornado-alert 2s ease-in-out infinite;
}

@keyframes tornado-alert {
    0%, 90%, 100% { 
        background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%);
        transform: scale(1);
        box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    }
    5%, 15% { 
        background: linear-gradient(135deg, #fff 0%, #ffcdd2 100%);
        transform: scale(1.02);
        box-shadow: 0 8px 40px rgba(255,0,0,0.6);
    }
    45%, 55% { 
        background: linear-gradient(135deg, #ff1744 0%, #ad1457 100%);
        transform: scale(1.01);
        box-shadow: 0 6px 30px rgba(255,23,68,0.5);
    }
}

/* Severe weather - pulsing yellow */
.weather-notification-bar.severe {
    background: linear-gradient(135deg, #f57c00 0%, #e65100 100%);
    animation: severe-pulse 3s ease-in-out infinite;
}

@keyframes severe-pulse {
    0%, 100% { 
        background: linear-gradient(135deg, #f57c00 0%, #e65100 100%);
        box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    }
    50% { 
        background: linear-gradient(135deg, #ffb74d 0%, #ff8a65 100%);
        box-shadow: 0 6px 30px rgba(255,183,77,0.5);
    }
}

/* Body adjustments */
body.has-weather-notification {
    padding-top: 56px;
}

body.has-weather-notification .navbar {
    top: 56px;
}

/* Alert priority indicators */
.weather-notification-bar::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: rgba(255,255,255,0.8);
    animation: priority-pulse 2s ease-in-out infinite;
}

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

.weather-notification-bar.tornado::before {
    width: 8px;
    background: linear-gradient(to bottom, #fff 0%, #ff1744 100%);
    animation: tornado-priority 1s ease-in-out infinite;
}

@keyframes tornado-priority {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Enhanced mobile responsiveness */
@media (max-width: 768px) {
    .weather-notification-bar {
        padding: 10px 0;
    }
    
    .weather-notification-content {
        font-size: 15px;
        letter-spacing: 0.6px;
    }
    
    body.has-weather-notification {
        padding-top: 48px;
    }
    
    body.has-weather-notification .navbar {
        top: 48px;
    }
}

/* Hide notification bar when no alerts */
.weather-notification-bar.hidden {
    display: none;
}

/* Smooth transitions for showing/hiding */
.weather-notification-bar.fade-in {
    animation: fadeInBar 0.5s ease-out;
}

.weather-notification-bar.fade-out {
    animation: fadeOutBar 0.5s ease-out forwards;
}

@keyframes fadeInBar {
    from {
        opacity: 0;
        transform: translateY(-100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOutBar {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-100%);
    }
}