/* ===== TWITCH LIVE BANNER STYLES ===== */

/* Banner Container */
.twitch-live-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #6441a5 0%, #9146ff 100%);
    color: white;
    padding: 12px 20px;
    z-index: 9999;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    animation: slideDown 0.5s ease-out;
}

/* Slide down animation */
@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Banner Content */
.twitch-live-content {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 1200px;
    width: 100%;
}

/* Live Pulse Indicator */
.twitch-live-pulse {
    width: 12px;
    height: 12px;
    background-color: #ff4444;
    border-radius: 50%;
    animation: pulse 2s infinite;
    flex-shrink: 0;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 68, 68, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 68, 68, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 68, 68, 0);
    }
}

/* Banner Text */
.twitch-live-content span {
    font-weight: 600;
    font-size: 16px;
    white-space: nowrap;
}

/* Watch Now Button */
.twitch-live-content a {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
    white-space: nowrap;
}

.twitch-live-content a:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Close Button */
.twitch-close-button {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s ease;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.twitch-close-button:hover {
    opacity: 1;
    background-color: rgba(255, 255, 255, 0.1);
}

/* Layout Adjustments */
/* Modern browsers with :has() support */
body:has(.twitch-live-banner) {
    padding-top: 50px;
}

/* Fallback for browsers without :has() support */
body.twitch-banner-active {
    padding-top: 50px;
}

/* Adjust navbar when banner is present */
body:has(.twitch-live-banner) .navbar,
body.twitch-banner-active .navbar {
    top: 50px;
}

/* Mobile Responsive */
@media (max-width: 767px) {
    .twitch-live-banner {
        padding: 10px 15px;
        min-height: 60px;
    }
    
    .twitch-live-content {
        gap: 10px;
        text-align: center;
        padding-right: 40px; /* Make room for close button */
    }
    
    .twitch-live-content span {
        font-size: 14px;
    }
    
    .twitch-live-content a {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .twitch-close-button {
        right: 10px;
        font-size: 20px;
        width: 25px;
        height: 25px;
    }
    
    /* Adjust body padding for mobile */
    body:has(.twitch-live-banner),
    body.twitch-banner-active {
        padding-top: 60px;
    }
    
    /* Adjust navbar for mobile */
    body:has(.twitch-live-banner) .navbar,
    body.twitch-banner-active .navbar {
        top: 60px;
    }
    
    /* Make entire banner clickable on mobile (except close button) */
    .twitch-live-content {
        cursor: pointer;
    }
}

@media (max-width: 480px) {
    .twitch-live-content {
        flex-direction: column;
        gap: 8px;
        padding-right: 35px;
    }
    
    .twitch-live-content span {
        font-size: 13px;
    }
    
    .twitch-live-content a {
        padding: 5px 10px;
        font-size: 12px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .twitch-live-banner {
        background: #6441a5;
        border-bottom: 2px solid white;
    }
    
    .twitch-live-content a {
        border: 2px solid white;
        background-color: rgba(255, 255, 255, 0.1);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .twitch-live-banner {
        animation: none;
    }
    
    .twitch-live-pulse {
        animation: none;
        background-color: #ff4444;
    }
    
    .twitch-live-content a {
        transition: none;
    }
    
    .twitch-close-button {
        transition: none;
    }
}