/* Container Wrapper */
.aiav-ad-wrapper {
    margin: 30px auto;
    padding: 0;
    max-width: 650px;
    background: #0d1117;
    border: 2px solid #1f2937;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    position: relative;
    box-sizing: border-box;
    clear: both;
    overflow: hidden;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* Header Top Bar TV Style */
.aiav-ad-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #161b22;
    padding: 6px 14px;
    border-bottom: 1px solid #30363d;
}

.aiav-live-tag {
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.aiav-red-dot {
    width: 8px;
    height: 8px;
    background-color: #ff2a2a;
    border-radius: 50%;
    display: inline-block;
    animation: aiav-pulse 1.2s infinite;
}

@keyframes aiav-pulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.2); }
    100% { opacity: 1; transform: scale(1); }
}

.aiav-ad-label {
    font-size: 10px;
    color: #8b949e;
    letter-spacing: 1.2px;
    font-weight: 600;
}

/* Video Player Link & Video */
.aiav-video-link {
    display: block;
    position: relative;
    text-decoration: none;
    line-height: 0;
}

.aiav-video-player {
    width: 100%;
    height: auto;
    max-height: 380px;
    object-fit: cover;
    display: block;
}

/* Countdown Badge */
.aiav-timer-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.75);
    color: #f0f6fc;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 2;
}

/* TV NEWS BANNER (HEADLINE RUNNING TEXT) */
.aiav-tv-news-ticker {
    display: flex;
    align-items: center;
    background: #090d16;
    border-top: 3px solid #e53e3e;
    height: 44px;
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
}

.aiav-tv-badge {
    background: #cc0000;
    color: #ffffff;
    font-weight: 900;
    font-size: 12px;
    padding: 0 16px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 1px;
    white-space: nowrap;
    z-index: 3;
    box-shadow: 4px 0 10px rgba(0,0,0,0.4);
    text-transform: uppercase;
}

.aiav-tv-headline-container {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    background: #111827;
}

.aiav-tv-headline-text {
    display: inline-block;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    padding-left: 100%;
    animation: aiav-marquee 16s linear infinite;
    line-height: 1.2;
}

.aiav-tv-headline-container:hover .aiav-tv-headline-text {
    animation-play-state: paused;
}

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

/* Device Visibility Control */
@media (max-width: 768px) {
    .aiav-only-desktop { display: none !important; }
    .aiav-tv-badge { font-size: 10px; padding: 0 10px; }
    .aiav-tv-headline-text { font-size: 12px; }
}

@media (min-width: 769px) {
    .aiav-only-mobile { display: none !important; }
}
