/* Additional styling for theme components */

body {
    background-color: var(--primary-color, #1a1a1a);
    color: var(--text-color, #ffffff);
    line-height: 1.6;
}

a {
    color: var(--accent-color, #00d4ff);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: rgba(0, 212, 255, 0.8);
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    margin-bottom: 12px;
}

p {
    margin-bottom: 16px;
}

button {
    font-family: inherit;
}

/* Admin styling */
.wp-admin {
    background-color: #f1f1f1;
}

/* Accessibility */
:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .immersive-top-bar,
    .mobile-menu {
        display: none;
    }
}

/* Video Timeline Styles */
.video-timeline {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    overflow: hidden;
}

.default-center-view {
    width: 100%;
    height: 100%;
}

.analysis-launcher {
    width: 100%;
    flex-shrink: 0;
    margin-bottom: 12px;
}

.analysis-open-trigger {
    width: 100%;
    border: 1px solid rgba(0, 212, 255, 0.28);
    background: linear-gradient(160deg, rgba(0, 212, 255, 0.14), rgba(0, 0, 0, 0.45));
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
    text-align: left;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.analysis-open-trigger:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 212, 255, 0.7);
    box-shadow: 0 8px 18px rgba(0, 212, 255, 0.18);
}

.analysis-thumbnail {
    width: 100%;
    min-height: 86px;
    border-radius: 4px;
    border: 1px solid rgba(0, 212, 255, 0.4);
    background:
        linear-gradient(rgba(0, 212, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.05) 1px, transparent 1px),
        radial-gradient(ellipse 70% 90% at 50% 50%, rgba(0, 212, 255, 0.13) 0%, rgba(13, 17, 23, 0.0) 70%),
        #0d1117;
    background-size: 18px 18px, 18px 18px, 100% 100%, 100% 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Scanline flicker — applied unconditionally; invisible when opacity=0 */
@keyframes ac-flicker {
    0%   { filter: brightness(1);    }
    12%  { filter: brightness(0.55); }
    14%  { filter: brightness(1);    }
    45%  { filter: brightness(0.8);  }
    47%  { filter: brightness(1);    }
    72%  { filter: brightness(0.6);  }
    74%  { filter: brightness(1);    }
    88%  { filter: brightness(0.85); }
    90%  { filter: brightness(1);    }
    100% { filter: brightness(1);    }
}

/* Horizontal scanline — JS-driven via inline style + transition */
.ac-hline {
    position: absolute;
    left: -10%;
    right: -10%;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(0, 212, 255, 0.0) 15%,
        rgba(0, 212, 255, 0.28) 45%,
        rgba(180, 240, 255, 0.42) 50%,
        rgba(0, 212, 255, 0.28) 55%,
        rgba(0, 212, 255, 0.0) 85%,
        transparent 100%
    );
    box-shadow: 0 0 4px 1px rgba(0, 212, 255, 0.14);
    pointer-events: none;
    top: 0;
    opacity: 0;
    will-change: transform, opacity;
    animation: ac-flicker 0.45s linear infinite;
}

/* Vertical scanline — JS-driven via inline style + transition */
.ac-vline {
    position: absolute;
    top: -10%;
    height: 120%;
    width: 1px;
    left: 0;
    background: linear-gradient(180deg,
        transparent 0%,
        rgba(0, 212, 255, 0.0) 8%,
        rgba(0, 212, 255, 0.22) 42%,
        rgba(200, 245, 255, 0.38) 50%,
        rgba(0, 212, 255, 0.22) 58%,
        rgba(0, 212, 255, 0.0) 92%,
        transparent 100%
    );
    box-shadow: 0 0 4px 1px rgba(0, 212, 255, 0.12);
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    will-change: transform, opacity;
    animation: ac-flicker 0.45s linear infinite 0.18s;
}

/* Targeting dot — JS-driven via inline style + transition */
.ac-dot {
    position: absolute;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(200, 40, 40, 0.7);
    pointer-events: none;
    z-index: 2;
    opacity: 0;
    transform: scale(0);
    will-change: transform, opacity, left, top;
}

.analysis-thumbnail-label {
    font-size: 13px;
    letter-spacing: 2px;
    color: var(--accent-color);
    font-weight: 700;
}

.analysis-launcher-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.analysis-launcher-title {
    margin: 0;
    font-size: 15px;
    color: #fff;
}

.analysis-launcher-summary {
    margin: 0;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.78);
}



.analysis-launcher-cta {
    font-size: 12px;
    font-weight: 700;
    color: #ffd700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    align-self: flex-start;
    padding: 3px 8px;
    border: 1px solid rgba(255, 215, 0, 0.5);
    border-radius: 999px;
    background: rgba(255, 215, 0, 0.12);
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.25);
}

.ac-cta-text {
    background: linear-gradient(
        105deg,
        #a07800 15%,
        #c89a00 32%,
        #e8c840 48%,
        #d4b030 50%,
        #e8c840 52%,
        #c89a00 68%,
        #a07800 85%
    );
    background-size: 300% auto;
    background-position: 0% center;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: brightness(0.5);
}
@keyframes ac-cta-flicker {
    0%   { filter: brightness(0.5); }
    3%   { filter: brightness(0.25); }
    6%   { filter: brightness(0.5); }
    8%   { filter: brightness(0.3); }
    10%  { filter: brightness(0.5); }
    100% { filter: brightness(0.5); }
}
.ac-cta-text.flickering {
    animation: ac-cta-flicker 0.35s ease-out forwards;
}

/* Mobile: hide interactive button, show notice instead */
.analysis-mobile-notice {
    display: none;
    flex-direction: column;
    gap: 10px;
    border: 1px solid rgba(0, 212, 255, 0.18);
    border-radius: 6px;
    background: linear-gradient(160deg, rgba(0, 212, 255, 0.07), rgba(0, 0, 0, 0.45));
    padding: 10px;
    opacity: 0.7;
}

.analysis-mobile-notice-text {
    margin: 0;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.55);
    text-align: center;
    letter-spacing: 0.3px;
}

@media (max-width: 580px) {
    .analysis-open-trigger { display: none; }
    .analysis-mobile-notice { display: flex; }
}

/* ── Presentation Launcher ─────────────────────────────────────────── */
.presentation-launcher {
    width: 100%;
    flex-shrink: 0;
    margin-bottom: 12px;
    margin-top: 0;
}

.presentation-open-link {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 7px 12px;
    border: 1px solid rgba(0, 212, 255, 0.35);
    border-radius: 6px;
    background: rgba(0, 212, 255, 0.08);
    color: #e2e8f0;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    box-sizing: border-box;
    box-shadow: 0 0 0 1px rgba(0, 212, 255, 0.05);
}

.presentation-open-link:hover {
    background: rgba(0, 212, 255, 0.15);
    border-color: rgba(0, 212, 255, 0.6);
    color: #fff;
}

.presentation-launcher-icon {
    display: inline-flex;
    align-items: center;
    gap: 1px;
    color: #00d4ff;
    flex-shrink: 0;
    line-height: 1;
}

.pl-gear {
    display: inline-block;
    color: #00d4ff;
    will-change: transform;
    transform-origin: center;
}

.pl-gear-a {
    font-size: 15px;
    animation: pl-gear-cw 16s ease-in-out infinite, pl-lightning-a 11s ease-in-out infinite;
}

.pl-gear-b {
    font-size: 9px;
    opacity: 0.65;
    animation: pl-gear-ccw 10s ease-in-out infinite, pl-lightning-b 7s ease-in-out infinite 2.3s;
}

@keyframes pl-gear-cw {
    0%   { transform: rotate(0deg); }
    12%  { transform: rotate(60deg); }
    17%  { transform: rotate(54deg); }
    45%  { transform: rotate(175deg); }
    50%  { transform: rotate(180deg); }
    72%  { transform: rotate(278deg); }
    78%  { transform: rotate(272deg); }
    92%  { transform: rotate(352deg); }
    96%  { transform: rotate(362deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pl-gear-ccw {
    0%   { transform: rotate(0deg); }
    12%  { transform: rotate(-75deg); }
    17%  { transform: rotate(-68deg); }
    45%  { transform: rotate(-185deg); }
    50%  { transform: rotate(-180deg); }
    72%  { transform: rotate(-278deg); }
    78%  { transform: rotate(-270deg); }
    92%  { transform: rotate(-352deg); }
    96%  { transform: rotate(-365deg); }
    100% { transform: rotate(-360deg); }
}

@keyframes pl-lightning-a {
    0%, 75%   { filter: brightness(1);   text-shadow: none; }
    76%       { filter: brightness(1.9); text-shadow: 0 0 5px rgba(255,255,255,0.6), 0 0 10px rgba(0,212,255,0.4); }
    76.8%     { filter: brightness(1);   text-shadow: none; }
    77.6%     { filter: brightness(1.5); text-shadow: 0 0 4px rgba(255,255,255,0.4), 0 0 8px rgba(0,212,255,0.25); }
    78.4%     { filter: brightness(1);   text-shadow: none; }
    80%, 100% { filter: brightness(1);   text-shadow: none; }
}

@keyframes pl-lightning-b {
    0%, 60%   { filter: brightness(1);   text-shadow: none; }
    61%       { filter: brightness(1.7); text-shadow: 0 0 4px rgba(255,255,255,0.5), 0 0 8px rgba(0,212,255,0.3); }
    61.8%     { filter: brightness(1);   text-shadow: none; }
    62.8%     { filter: brightness(1.4); text-shadow: 0 0 3px rgba(255,255,255,0.3), 0 0 6px rgba(0,212,255,0.2); }
    63.6%     { filter: brightness(1);   text-shadow: none; }
    65%, 100% { filter: brightness(1);   text-shadow: none; }
}

.presentation-launcher-label {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.presentation-launcher-arrow {
    font-size: 18px;
    color: #00d4ff;
    flex-shrink: 0;
    line-height: 1;
    opacity: 0.8;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.presentation-open-link:hover .presentation-launcher-arrow {
    transform: translateX(4px);
    opacity: 1;
}
/* ── End Presentation Launcher ──────────────────────────────────────── */

.analysis-view {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.analysis-view-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 14px;
    flex-shrink: 0;
    background: rgba(7, 12, 20, 0.82);
    border-bottom: 1px solid rgba(0, 212, 255, 0.15);
    border-radius: 4px 4px 0 0;
}

@keyframes analysis-title-glow {
    0%   { text-shadow: 0 0 4px rgba(0, 212, 255, 0.0); color: rgba(0, 212, 255, 0.55); }
    50%  { text-shadow: 0 0 10px rgba(0, 212, 255, 0.45), 0 0 20px rgba(0, 212, 255, 0.18); color: rgba(0, 212, 255, 0.90); }
    100% { text-shadow: 0 0 4px rgba(0, 212, 255, 0.0); color: rgba(0, 212, 255, 0.55); }
}

.analysis-phase-ticker {
    position: relative;
    height: 20px;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    min-width: 0;
}

.apt-phase {
    position: absolute;
    white-space: nowrap;
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.65);
    letter-spacing: 0.3px;
    opacity: 0;
    transform: translateY(5px);
    animation: apt-cycle 15s infinite;
    pointer-events: none;
}

.apt-p0 { animation-delay: 0s; }
.apt-p1 { animation-delay: 3s; }
.apt-p2 { animation-delay: 6s; }
.apt-p3 { animation-delay: 9s; }
.apt-p4 { animation-delay: 12s; }

@keyframes apt-cycle {
    0%      { opacity: 0; transform: translateY(5px); }
    3%      { opacity: 1; transform: translateY(0); }
    17%     { opacity: 1; transform: translateY(0); }
    20%     { opacity: 0; transform: translateY(-5px); }
    20.01%  { opacity: 0; transform: translateY(5px); }
    100%    { opacity: 0; transform: translateY(5px); }
}

.apt-icon {
    display: inline-block;
    animation: apt-icon-pulse 3s ease-in-out infinite;
}

@keyframes apt-icon-pulse {
    0%, 100% { transform: scale(1); }
    40%      { transform: scale(1.25) rotate(-5deg); }
    60%      { transform: scale(1.25) rotate(5deg); }
}

.analysis-view-title {
    margin: 0;
    font-size: 15px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: rgba(0, 212, 255, 0.75);
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
    animation: analysis-title-glow 4s ease-in-out infinite;
}

.analysis-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.analysis-share-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.analysis-share-btn {
    border: 1.5px solid rgba(0, 212, 255, 0.55);
    background: transparent;
    color: #00d4ff;
    padding: 4px 11px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.4px;
    transition: all 0.2s ease;
}

.analysis-share-btn:hover {
    background: rgba(0, 212, 255, 0.12);
    border-color: rgba(0, 212, 255, 0.85);
    box-shadow: 0 0 14px rgba(0, 212, 255, 0.3);
    transform: translateY(-1px);
}

.analysis-share-btn:active {
    background: rgba(0, 212, 255, 0.2);
    transform: translateY(0);
}

.analysis-return-btn {
    border: 1.5px solid rgba(255, 255, 255, 0.75);
    background: transparent;
    color: #fff;
    padding: 5px 13px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.3px;
    transition: all 0.2s ease;
}

.analysis-return-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
    transform: translateY(-1px);
}

.analysis-return-btn:active {
    background: rgba(255, 255, 255, 0.16);
    transform: translateY(0);
}

.analysis-intel-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.65fr) minmax(0, 0.35fr) minmax(0, 1fr);
    gap: 8px;
    align-items: start;
    flex-shrink: 0;
    padding: 10px 14px;
    background: #0e141b;
    border-bottom: 1px solid #1e3040;
}

.analysis-other-card {
    border: 1px solid #1e3040;
    border-left: 2px solid rgba(0, 212, 255, 0.28);
    border-radius: 6px;
    background: #070c12;
    padding: 6px 8px;
    margin-left: 6px;
    display: flex;
    flex-direction: column;
    min-height: 0;
    grid-column: 4;
}

.analysis-other-headline {
    font-size: 9px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.68);
    margin-bottom: 4px;
    flex-shrink: 0;
}

.analysis-other-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
    max-height: 252px;
    flex: 1;
    scrollbar-width: thin;
    scrollbar-color: #1e3040 transparent;
}

.analysis-other-list::-webkit-scrollbar {
    width: 4px;
}

.analysis-other-list::-webkit-scrollbar-track {
    background: transparent;
}

.analysis-other-list::-webkit-scrollbar-thumb {
    background: #1e3040;
    border-radius: 2px;
}

.analysis-other-item {
    text-align: left;
    border: 1px solid #1e3040;
    border-radius: 4px;
    background: #0d1820;
    color: #cde;
    padding: 4px 7px;
    cursor: pointer;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 7px;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.analysis-other-item:hover {
    transform: translateY(-1px);
    border-color: rgba(0, 212, 255, 0.7);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.22);
}

.analysis-other-item.is-current {
    border-color: rgba(0, 212, 255, 0.7);
    background: #0d2030;
    color: #e8f4f8;
    cursor: default;
}

.analysis-other-item-title {
    font-size: 11px;
    font-weight: 700;
    line-height: 1.3;
}

.analysis-other-item-body {
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex: 1;
    min-width: 0;
}

.analysis-other-item-img {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: auto;
    object-fit: cover;
    border-radius: 0 3px 3px 0;
    border-left: 1px solid rgba(0, 212, 255, 0.15);
    display: block;
    pointer-events: none;
}

.analysis-other-item-count {
    font-size: 9px;
    letter-spacing: 0.4px;
    color: rgba(0, 212, 255, 0.9);
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.28);
    border-radius: 3px;
    padding: 1px 5px;
    display: inline-block;
    width: fit-content;
    margin-top: 1px;
}

.analysis-other-item-date {
    font-size: 10px;
    color: #4db8cc;
}

.analysis-other-item-status {
    font-size: 9px;
    letter-spacing: 0.7px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
}

.analysis-primary-card,
.analysis-followup-card {
    border: 1px solid #1e3040;
    border-radius: 6px;
    background: #0a1018;
    padding: 6px 8px;
    position: relative;
    overflow: visible;
}

/* Ensure the primary card paints above followup so the connector arrow is visible */
.analysis-primary-card {
    z-index: 1;
    cursor: pointer;
    transition: border-color 0.15s ease;
}

.analysis-primary-card:hover {
    border-color: rgba(0, 212, 255, 0.6);
}

.analysis-primary-card.is-active {
    border-color: rgba(0, 212, 255, 0.7);
    background: #0d2030;
}

/* Connector line from Current Analysis → Follow-up Files */
.analysis-primary-card::after {
    content: '';
    position: absolute;
    right: -23px;
    top: var(--connector-top, 50%);
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border: none;
    z-index: 3;
    pointer-events: none;
    transition: top 0.25s ease;
}

/* Connector line spanning the full gap */
.analysis-primary-card::before {
    content: '';
    position: absolute;
    right: -23px;
    top: var(--connector-top, 50%);
    transform: translateY(-50%);
    width: 23px;
    height: 1px;
    background: rgba(0, 212, 255, 0.35);
    z-index: 2;
    pointer-events: none;
    transition: top 0.25s ease;
}

/* Hide connector when there are no follow-up files */
.analysis-primary-card.connector-hidden::before,
.analysis-primary-card.connector-hidden::after {
    display: none;
}

.analysis-primary-meta,
.analysis-followup-headline {
    font-size: 9px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.68);
    margin-bottom: 4px;
}

.analysis-primary-title {
    margin: 0;
    font-size: 12px;
    color: #fff;
}

.analysis-primary-body {
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: flex-start;
    margin-top: 4px;
}

.analysis-primary-image {
    width: 68px;
    height: 68px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #1e3040;
    flex-shrink: 0;
}

.analysis-primary-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.analysis-primary-date {
    margin: 0;
    font-size: 10px;
    color: #4db8cc;
}

.analysis-primary-summary {
    margin: 4px 0 0;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.84);
    line-height: 1.35;
}

.analysis-followup-list {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.analysis-followup-item {
    text-align: left;
    border: 1px solid #1e3040;
    border-radius: 4px;
    background: #0d1820;
    color: #cde;
    padding: 3px 6px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 1px;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.analysis-followup-body {
    display: flex;
    flex-direction: row;
    gap: 6px;
    align-items: flex-start;
    width: 100%;
}

.analysis-followup-image {
    width: 38px;
    height: 38px;
    object-fit: cover;
    border-radius: 3px;
    border: 1px solid #1e3040;
    flex-shrink: 0;
}

.analysis-followup-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.analysis-followup-item:hover {
    transform: translateY(-1px);
    border-color: rgba(0, 212, 255, 0.7);
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.24);
}

.analysis-followup-item.is-active {
    border-color: rgba(0, 212, 255, 0.7);
    background: #0d2030;
    color: #e8f4f8;
}

.analysis-followup-item.is-primary {
    border-color: rgba(0, 212, 255, 0.55);
    background: #0d2030;
}

.analysis-followup-kicker {
    font-size: 9px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.64);
}

.analysis-followup-title {
    font-size: 10px;
    font-weight: 700;
}

.analysis-followup-date {
    font-size: 9px;
    color: #4db8cc;
}

.analysis-followup-summary {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.3;
}

.analysis-followup-empty {
    margin: 0;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.68);
}

/* Hide mobile elements on desktop */
.analysis-mobile-top-bar {
    display: none;
}

@media (max-width: 980px) {
    .analysis-view-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .analysis-header-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .analysis-intel-panel {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

/* Mobile Fullscreen Analysis Modal */
@media (max-width: 768px) {
    .analysis-view {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 999;
        width: 100vw;
        height: 100vh;
        background: rgba(26, 26, 26, 0.98);
        padding: 0;
        gap: 0;
        flex-direction: column;
    }

    .analysis-view-header {
        display: flex;
        flex-direction: column;
        gap: 10px;
        padding: 12px;
        border-bottom: 1px solid rgba(0, 212, 255, 0.28);
        background: rgba(0, 212, 255, 0.05);
        align-items: stretch;
        width: 100%;
    }

    .analysis-mobile-top-bar {
        display: flex;
        gap: 8px;
        justify-content: space-between;
        padding: 2px 0;
    }

    .analysis-mobile-btn {
        flex: 1;
        padding: 11px 14px;
        border: 1.5px solid rgba(0, 212, 255, 0.5);
        background: linear-gradient(135deg, rgba(0, 212, 255, 0.12), rgba(0, 212, 255, 0.04));
        color: #fff;
        border-radius: 5px;
        cursor: pointer;
        font-size: 13px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        transition: all 0.25s ease;
        line-height: 1.2;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }

    .analysis-mobile-btn:hover {
        border-color: rgba(0, 212, 255, 0.8);
        background: linear-gradient(135deg, rgba(0, 212, 255, 0.22), rgba(0, 212, 255, 0.08));
        box-shadow: 0 0 12px rgba(0, 212, 255, 0.35);
        transform: translateY(-1px);
    }

    .analysis-mobile-btn:active {
        background: linear-gradient(135deg, rgba(0, 212, 255, 0.28), rgba(0, 212, 255, 0.12));
        box-shadow: 0 0 16px rgba(0, 212, 255, 0.4) inset;
        transform: translateY(0);
    }

    .analysis-mobile-btn.active {
        border: 1.5px solid #ffd700;
        background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 215, 0, 0.08));
        color: #ffd700;
        box-shadow: 0 0 14px rgba(255, 215, 0, 0.3);
    }

    .analysis-mobile-btn.active:hover {
        border-color: #ffd700;
        background: linear-gradient(135deg, rgba(255, 215, 0, 0.28), rgba(255, 215, 0, 0.12));
        box-shadow: 0 0 18px rgba(255, 215, 0, 0.4);
    }

    .analysis-view-title {
        font-size: 16px;
        text-align: center;
        margin: 0 !important;
    }

    .analysis-header-actions {
        display: none !important;
    }

    .analysis-intel-panel {
        display: none;
        grid-template-columns: 1fr;
        padding: 12px;
        gap: 10px;
        max-height: 40vh;
        overflow-y: auto;
    }

    .analysis-intel-panel.show-intel {
        display: grid;
    }

    .analysis-view-content {
        flex: 1;
        min-height: 0;
        border: none;
        border-radius: 0;
        overflow: hidden;
        background: rgba(0, 0, 0, 0.25);
        display: none;
    }

    .analysis-view-content.show-content {
        display: flex;
    }

    .analysis-content-frame {
        width: 100%;
        height: 100%;
        border: 0;
        background: #fff;
    }
}

.analysis-view-content {
    flex: 1;
    min-height: 0;
    border: 1px solid rgba(0, 212, 255, 0.22);
    border-top: none;
    border-radius: 0 0 6px 6px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.25);
    display: flex;
    position: relative;
}

.analysis-content-frame {
    width: 100%;
    height: 100%;
    border: 0;
    background: #fff;
}

.date-picker-container {
    display: flex;
    justify-content: center;
    padding: 15px;
    background-color: rgba(0, 212, 255, 0.05);
    border-radius: 4px;
}

.video-date-picker {
    padding: 10px 15px;
    background-color: rgba(0, 212, 255, 0.1);
    border: 2px solid var(--accent-color);
    color: var(--text-color);
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.video-date-picker:hover {
    background-color: rgba(0, 212, 255, 0.2);
}

.video-date-picker:focus {
    outline: none;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

/* Compass Calendar Styles */
.compass-calendar-container {
    padding: 0px 15px;
    background-color: transparent;
    border-radius: 4px;
    display: flex;
    align-items: center;
    margin-bottom: -8px;
    width: 100%;
    position: relative;
    z-index: 10;
    border: none;
}

/* Month / year inline separators flanking today */
.compass-month-label,
.compass-year-label {
    font-size: 10px;
    font-weight: bold;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1;
    padding: 0;
    flex: 0 0 52px;
    text-align: center;
    white-space: nowrap;
}

.compass-grid {
    display: flex;
    flex-direction: row;
    gap: 0px;
    width: 100%;
    align-items: center;
    justify-content: center;
    padding: 10px 0;
    overflow-x: auto;
    overflow-y: visible;
    flex-wrap: nowrap;
}

.compass-section {
    display: none;
}

.compass-west {
    display: none;
}

.compass-center {
    display: none;
}

.compass-east {
    display: none;
}

.compass-day {
    background-color: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.4);
    color: var(--text-color);
    padding: 2px 4px;
    border-radius: 2px;
    cursor: pointer;
    opacity: calc(1 - var(--compass-dist, 0) * 0.88);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0px;
    min-width: 32px;
    min-height: 34px;
    font-size: 7px;
    flex-shrink: 0;
    line-height: 1;
    justify-content: center;
}

.compass-day:hover {
    background-color: rgba(0, 212, 255, 0.2);
    border-color: var(--accent-color);
    transform: translateY(-2px);
}

.compass-day.current {
    background-color: rgba(0, 212, 255, 0.3);
    border-color: var(--accent-color);
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.4);
}

.compass-day-other-month {
    background-color: rgba(100, 100, 100, 0.2);
    border-color: rgba(150, 150, 150, 0.4);
    color: rgba(255, 255, 255, 0.6);
}

.compass-day-other-month:hover {
    background-color: rgba(100, 100, 100, 0.3);
    border-color: rgba(150, 150, 150, 0.6);
}

/* Disabled compass days - no videos for this date */
.compass-day-disabled {
    background-color: rgba(80, 80, 80, 0.3);
    border-color: rgba(100, 100, 100, 0.3);
    color: rgba(255, 255, 255, 0.4);
    cursor: not-allowed;
    /* opacity intentionally not set here — distance gradient handles it */
}

.compass-day-disabled:hover {
    background-color: rgba(80, 80, 80, 0.3);
    border-color: rgba(100, 100, 100, 0.3);
    transform: none;
}

.compass-day-number {
    font-size: 9px;
    font-weight: bold;
    color: var(--accent-color);
    line-height: 1;
}

.compass-day-label {
    font-size: 6px;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.2px;
    line-height: 1;
}

.compass-day-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0px;
    padding: 1px;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.25), rgba(0, 212, 255, 0.08));
    border: 2px solid var(--accent-color);
    border-radius: 50%;
    width: 42px;
    height: 42px;
    justify-content: center;
    flex-shrink: 0;
    margin: 0;
    position: relative;
    box-shadow: 0 0 7px rgba(0, 212, 255, 0.28), inset 0 0 5px rgba(0, 212, 255, 0.12);
    cursor: pointer;
    appearance: none;
    overflow: visible;
    animation: solar-corona-pulse 5s ease-in-out infinite, corona-diagonal-flash 9s ease-in-out 2.3s infinite;
}

/* Flare arm 1 — erupts leftward from 9 o'clock, whips slightly upward */
.compass-day-center::before {
    content: '';
    position: absolute;
    right: calc(100% - 2px);
    top: calc(50% - 4px);
    width: 26px;
    height: 8px;
    background: linear-gradient(
        to left,
        rgba(255, 130, 0, 0.48) 0%,
        rgba(255, 200, 50, 0.36) 35%,
        rgba(0, 212, 255, 0.14) 72%,
        transparent 100%
    );
    border-radius: 0 50% 50% 0 / 0 50% 50% 0;
    filter: blur(1.8px);
    transform-origin: 100% 50%;
    animation: cme-whip-left 5s ease-in-out 0s infinite;
    pointer-events: none;
    z-index: 6;
}

/* Flare arm 2 — erupts rightward from 3 o'clock, whips slightly downward */
.compass-day-center::after {
    content: '';
    position: absolute;
    left: calc(100% - 2px);
    top: calc(50% - 4px);
    width: 26px;
    height: 8px;
    background: linear-gradient(
        to right,
        rgba(255, 110, 0, 0.46) 0%,
        rgba(255, 190, 40, 0.34) 35%,
        rgba(0, 212, 255, 0.12) 74%,
        transparent 100%
    );
    border-radius: 50% 0 0 50% / 50% 0 0 50%;
    filter: blur(2px);
    transform-origin: 0% 50%;
    animation: cme-whip-right 6.5s ease-in-out 2.8s infinite;
    pointer-events: none;
    z-index: 6;
}

.compass-day-center.compass-day-disabled {
    cursor: not-allowed;
}

.compass-day-weekday {
    font-size: 6px;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1;
}

.compass-day-large {
    font-size: 20px;
    font-weight: bold;
    color: #ffd700;
    line-height: 1;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

/* Today Indicator (always in center) */
.compass-day-today {
    background: radial-gradient(circle, rgba(0, 212, 255, 0.3), rgba(0, 212, 255, 0.12));
    border: 2px solid var(--accent-color);
    box-shadow: 0 0 7px rgba(0, 212, 255, 0.32), inset 0 0 5px rgba(0, 212, 255, 0.12);
}

/* Selected Date Highlight (can be any date in the range) */
.compass-day-selected {
    border-color: #ffd700 !important;
    background: rgba(255, 215, 0, 0.15) !important;
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.4) !important;
}

.compass-day-selected.compass-day {
    color: #ffd700;
    font-weight: bold;
    opacity: 1 !important;
}

.compass-day-center.compass-day-selected {
    border-color: #ffd700 !important;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.25), rgba(255, 215, 0, 0.08)) !important;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5), inset 0 0 8px rgba(255, 215, 0, 0.2) !important;
}

/* === F+ Compass Day Styles === */
.compass-day.fp-past {
    border-radius: 999px;
    border: 1px solid rgba(255, 160, 0, 0.22);
    background: rgba(255, 160, 0, 0.07);
}
.compass-day.fp-past .compass-day-number {
    color: rgba(255, 160, 0, 0.9);
}
.compass-day.f-near-past {
    width: 28px;
    height: 38px;
    background: rgba(255, 160, 0, 0.12);
    border: 1.5px solid rgba(255, 160, 0, 0.65);
    border-left: none;
    border-radius: 0 999px 999px 0;
}
.compass-day.f-near-past .compass-day-number {
    color: rgba(255, 170, 0, 0.95);
}
.compass-day.f-near-future {
    width: 28px;
    height: 38px;
    background: rgba(0, 180, 220, 0.10);
    border: 1.5px solid rgba(0, 180, 220, 0.60);
    border-right: none;
    border-radius: 999px 0 0 999px;
}
.compass-day-disabled.fp-past,
.compass-day-disabled.fp-future {
    background-color: rgba(80, 80, 80, 0.3);
    border: 1px solid rgba(100, 100, 100, 0.3);
    border-radius: 999px;
}
@keyframes fp-border-flash {
    0%   { box-shadow: none; }
    5%   { box-shadow: 0 0 0 1px rgba(255,210,0,0.55), 0 0 12px 2px rgba(255,180,0,0.75), 0 0 26px rgba(255,140,0,0.28); }
    20%  { box-shadow: none; }
    100% { box-shadow: none; }
}
@keyframes fp-border-flash-dim {
    0%   { box-shadow: none; }
    5%   { box-shadow: 0 0 0 1px rgba(255,210,0,0.08), 0 0 5px 1px rgba(255,180,0,0.10); }
    20%  { box-shadow: none; }
    100% { box-shadow: none; }
}

/* === Solar Flare / CME Keyframes === */

/* Slow corona glow — pulses with a warm orange tint at peak (active chromosphere) */
@keyframes solar-corona-pulse {
    0% {
        box-shadow: 0 0 7px rgba(0, 212, 255, 0.28), inset 0 0 5px rgba(0, 212, 255, 0.12);
    }
    12% {
        box-shadow:
            0 -7px 9px -4px rgba(0, 212, 255, 0.26),
            0 -13px 10px -8px rgba(255, 140, 0, 0.10),
            0 0 7px rgba(0, 212, 255, 0.28),
            inset 0 0 5px rgba(0, 212, 255, 0.12);
    }
    28% {
        box-shadow: 0 0 8px rgba(0, 212, 255, 0.28), inset 0 0 5px rgba(0, 212, 255, 0.12);
    }
    50% {
        box-shadow:
            0 0 10px 1px rgba(0, 212, 255, 0.26),
            0 0 16px rgba(255, 130, 0, 0.04),
            inset 0 0 5px rgba(0, 212, 255, 0.13);
    }
    67% {
        box-shadow:
            0 7px 9px -4px rgba(0, 212, 255, 0.24),
            0 13px 10px -8px rgba(255, 110, 0, 0.09),
            0 0 7px rgba(0, 212, 255, 0.27),
            inset 0 0 5px rgba(0, 212, 255, 0.12);
    }
    83% {
        box-shadow: 0 0 7px rgba(0, 212, 255, 0.26), inset 0 0 5px rgba(0, 212, 255, 0.12);
    }
    100% {
        box-shadow: 0 0 7px rgba(0, 212, 255, 0.28), inset 0 0 5px rgba(0, 212, 255, 0.12);
    }
}

/* Diagonal corona flashes — independent 9s cycle, offset 2.3s from main pulse */
@keyframes corona-diagonal-flash {
    0%, 100% { filter: none; }
    18% {
        filter:
            drop-shadow(5px -7px 5px rgba(0, 212, 255, 0.18))
            drop-shadow(-3px 5px 4px rgba(255, 130, 0, 0.09));
    }
    36% { filter: none; }
    62% {
        filter:
            drop-shadow(-5px -6px 5px rgba(255, 130, 0, 0.15))
            drop-shadow(4px  7px 5px rgba(0, 212, 255, 0.12));
    }
    80% { filter: none; }
}

/* CME whip left — extends leftward, tip arcs slightly upward like a plasma whip */
@keyframes cme-whip-left {
    0%   { transform: scaleX(0.02) rotate(8deg);   opacity: 0; }
    8%   { transform: scaleX(0.70) rotate(2deg);   opacity: 0.55; }
    22%  { transform: scaleX(1.12) rotate(-8deg);  opacity: 0.48; }
    44%  { transform: scaleX(1.38) rotate(-18deg); opacity: 0.22; }
    64%  { transform: scaleX(1.16) rotate(-24deg); opacity: 0.07; }
    82%  { transform: scaleX(0.48) rotate(-28deg); opacity: 0.01; }
    100% { transform: scaleX(0)    rotate(-30deg); opacity: 0; }
}

/* CME whip right — extends rightward, tip arcs slightly downward */
@keyframes cme-whip-right {
    0%   { transform: scaleX(0.02) rotate(-6deg); opacity: 0; }
    8%   { transform: scaleX(0.68) rotate(0deg);  opacity: 0.52; }
    24%  { transform: scaleX(1.18) rotate(10deg); opacity: 0.42; }
    46%  { transform: scaleX(1.42) rotate(20deg); opacity: 0.20; }
    66%  { transform: scaleX(1.12) rotate(26deg); opacity: 0.06; }
    83%  { transform: scaleX(0.44) rotate(30deg); opacity: 0.01; }
    100% { transform: scaleX(0)    rotate(32deg); opacity: 0; }
}

/* Trending Keywords — single-row pills */
.trending-keywords-container {
    background: transparent;
    border: none;
    border-radius: 10px;
    padding: 5px 12px;
    margin: 6px 0 2px 0;
    position: relative;
    overflow: hidden;
}

.trending-keywords-container::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 10px;
    padding: 1px;
    background: linear-gradient(
        to right,
        transparent 0%,
        rgba(0, 212, 255, 0.30) 50%,
        transparent 100%
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 1;
}

/* Glitch — horizontal scan bar that sweeps briefly across the panel */
@keyframes kw-glitch-shift {
    0%   { transform: translateX(0)    skewX(0deg);    filter: brightness(1); }
    20%  { transform: translateX(-4px) skewX(-0.4deg); filter: brightness(1.22) hue-rotate(14deg); }
    40%  { transform: translateX(3px)  skewX(0.4deg);  filter: brightness(1.04); }
    60%  { transform: translateX(-2px) skewX(0deg);    filter: brightness(1.13) hue-rotate(-8deg); }
    80%  { transform: translateX(1px)  skewX(0.1deg);  filter: brightness(1.04); }
    100% { transform: translateX(0)    skewX(0deg);    filter: brightness(1); }
}
@keyframes kw-glitch-bar {
    0%   { opacity: 0;    top: 10%; }
    25%  { opacity: 0.18; top: 35%; }
    50%  { opacity: 0.10; top: 60%; }
    75%  { opacity: 0.15; top: 22%; }
    100% { opacity: 0;    top: 78%; }
}
.trending-keywords-container::before {
    content: '';
    position: absolute;
    left: 0; right: 0;
    height: 2px;
    background: rgba(0, 212, 255, 0.65);
    pointer-events: none;
    z-index: 2;
    opacity: 0;
    top: 30%;
}
.trending-keywords-container.is-glitching {
    animation: kw-glitch-shift 0.13s steps(5);
}
.trending-keywords-container.is-glitching::before {
    animation: kw-glitch-bar 0.13s steps(5);
}

@keyframes slideInAndFade {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}
.video-item.new-video { animation: slideInAndFade 0.6s ease-out forwards; }

/* Row of 5 pills */
.trending-keywords-list {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    min-height: 32px;
}

/* Each pill: [velocity] [word] [count] */
.keyword-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(0, 212, 255, 0.08);
    border: 1px solid rgba(0, 212, 255, 0.22);
    border-radius: 7px;
    padding: 4px 10px;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    transition: background 0.2s, border-color 0.2s;
}
.keyword-tag:hover  { background: rgba(0, 212, 255, 0.18); border-color: rgba(0, 212, 255, 0.5); }
.keyword-tag.active { background: rgba(0, 212, 255, 0.30); border-color: rgba(0, 212, 255, 0.75); font-weight: bold; }

/* Velocity arrow */
.kw-vel {
    font-size: 9px;
    font-weight: bold;
    line-height: 1;
    letter-spacing: -1px;
    flex-shrink: 0;
}
.kw-vel-up   { color: #3ddc84; text-shadow: 0 0 4px rgba(61, 220, 132, 0.5); }
.kw-vel-down { color: #ff5f5f; text-shadow: 0 0 4px rgba(255, 95, 95, 0.5); }
.kw-vel-flat { color: #ffd700; font-size: 11px; letter-spacing: 0; }

/* Keyword word */
.kw-word {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.9);
}

/* Mention count */
.keyword-count {
    font-size: 10px;
    font-weight: bold;
    color: #ffd700;
}

.keywords-loading {
    display: block;
    width: 100%;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    font-style: italic;
}
.keywords-empty {
    display: block;
    width: 100%;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    font-style: italic;
}

/* Video filtering styles - UPDATED */
.video-item.filtered-out {
    opacity: 0.15 !important;
    pointer-events: none !important;
    filter: grayscale(100%) !important;
}

.video-item.highlighted {
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.8) !important;
    border: 2px solid rgba(0, 212, 255, 0.9) !important;
    background-color: rgba(0, 212, 255, 0.1) !important;
    transform: scale(1.02);
}

.video-item.highlighted a {
    pointer-events: auto;
    cursor: pointer;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: 130px;
    gap: 10px;
    padding: 10px 10px 10px 10px;
    overflow: hidden;
    flex: 1;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
    margin-top: 0;
}

.video-item {
    background-color: rgba(0, 212, 255, 0.05);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 130px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.video-item:hover {
    border-color: var(--accent-color);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
    transform: translateY(-3px);
}

.video-item.expanded,
.video-item.video-playing {
    border-color: var(--accent-color);
    box-shadow: 0 0 18px rgba(0, 212, 255, 0.6);
    transform: none !important;
}

.video-item.expanded:hover {
    transform: none !important;
}

.video-item.expanded .video-thumbnail {
    display: none;
}

.video-item.expanded .video-info {
    flex: 0 0 auto;
    padding: 6px;
}

.video-embed {
    display: none;
    width: 100%;
    flex: 1;
    position: relative;
    min-height: 0;
}

.video-item.expanded .video-embed {
    display: block;
}

.video-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-close-btn {
    display: none;
    position: absolute;
    top: 5px;
    right: 5px;
    z-index: 10;
    width: 22px;
    height: 22px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(0, 212, 255, 0.7);
    border-radius: 50%;
    color: #fff;
    font-size: 11px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: background 0.2s ease;
}

.video-close-btn:hover {
    background: rgba(0, 212, 255, 0.3);
}

.video-item.expanded .video-close-btn {
    display: flex;
}

.video-thumbnail {
    width: 100%;
    height: 70px;
    background-color: #000;
    overflow: hidden;
    position: relative;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.2s ease;
}

.video-item:hover .video-thumbnail img {
    opacity: 0.75;
}

.video-play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.video-item:hover .video-play-overlay {
    opacity: 1;
}

a.video-item {
    text-decoration: none;
    color: inherit;
    display: flex;
    cursor: pointer;
}

/* Pagination Controls */
.video-pagination {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0;
    padding: 90px 10px 10px;
    margin-top: 11px;
    border-top: 1px solid rgba(0, 212, 255, 0.2);
    flex-wrap: wrap;
    position: relative;
    overflow: hidden;
}

.video-pagination-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.video-pagination-buttons,
.video-pagination-footer {
    position: relative;
    z-index: 1;
}

.video-pagination-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    width: fit-content;
    margin: 0 auto;
    margin-bottom: 0;
}

.video-pagination-footer {
    width: 100%;
    text-align: center;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 0.5px;
    margin-top: 12px;
    padding-bottom: 0;
}

.pagination-btn {
    padding: 10px 20px;
    min-width: 110px;
    background-color: rgba(0, 212, 255, 0.1);
    border: 2px solid rgba(0, 212, 255, 0.5);
    color: var(--accent-color);
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.pagination-btn:hover:not(:disabled) {
    background-color: rgba(0, 212, 255, 0.2);
    border-color: var(--accent-color);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.4);
    transform: scale(1.05);
}

.pagination-btn:active:not(:disabled) {
    transform: scale(0.98);
}

.pagination-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.pagination-info {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    min-width: 150px;
}

.video-info {
    padding: 5px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

.video-title {
    font-size: 20px;
    font-weight: bold;
    color: var(--accent-color);
    margin: 0 0 2px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.video-channel {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 1px 0;
}

.video-meta {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

@media (max-width: 1600px) {
    .video-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 1200px) {
    .video-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .video-grid {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        grid-auto-rows: 130px;
        gap: 10px;
        overflow: hidden;
        padding: 10px 10px 10px 10px;
        margin-top: 0;
    }

    .video-item,
    .video-item.expanded {
        width: auto;
        height: 100%;
        min-height: 0;
        position: relative;
        z-index: auto;
        transform: none !important;
        display: flex;
        flex-direction: column;
    }

    .video-thumbnail {
        flex: 1;
        min-height: 0;
    }

    .video-info {
        padding: 16px 5px 5px 5px;
        pointer-events: none;
    }

    .video-channel {
        font-size: 9px;
        margin: 0;
        display: block;
        visibility: visible;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .video-meta {
        font-size: 8px;
        display: none;
    }

    .video-item.expanded .video-thumbnail {
        display: block;
    }

    .video-item.expanded .video-info {
        padding: 5px;
    }

    .video-item.expanded .video-embed,
    .video-item.expanded .video-close-btn {
        display: none;
    }

    .video-item.expanded-mobile-trigger {
        border-color: var(--accent-color);
        box-shadow: 0 0 15px rgba(0, 212, 255, 0.35);
    }

    .mobile-video-embed {
        position: relative;
        width: 100%;
        height: 100%;
        flex: 1;
        background: #000;
    }

    .mobile-video-embed iframe {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        border: none;
    }

    .mobile-video-close-btn {
        display: flex;
        position: absolute;
        top: 8px;
        right: 8px;
        z-index: 10;
    }
}

@media (max-width: 580px) {
    .video-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .video-title {
        font-size: 12px;
        -webkit-line-clamp: 2;
    }

    .video-channel {
        font-size: 8px;
    }
}

@media (max-width: 400px) {
    .video-grid {
        grid-template-columns: repeat(1, 1fr);
        gap: 5px;
        padding: 10px 5px 5px 5px;
        margin-top: 0;
    }
    
    .video-item {
        height: 100px;
    }

    .video-title {
        font-size: 12px;
        -webkit-line-clamp: 2;
    }

    .video-channel {
        font-size: 8px;
    }

    .video-meta {
        display: none;
    }
}

/* Radio Player Styles */

.radio-player-container {
    background: linear-gradient(160deg, rgba(0, 212, 255, 0.08) 0%, rgba(0, 0, 0, 0.5) 100%);
    border: 1px solid rgba(0, 212, 255, 0.28);
    border-radius: 10px;
    padding: 16px;
    margin: 0 0 15px 0;
    box-shadow: 0 4px 24px rgba(0, 212, 255, 0.08);
}

.radio-player-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ── Header ── */
.radio-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.radio-station-name {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #fff;
}

.radio-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.35);
    text-transform: uppercase;
    transition: color 0.4s ease;
}

.radio-live-badge--on {
    color: #00d4ff;
}

.radio-live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transition: background 0.4s ease, box-shadow 0.4s ease;
}

.radio-live-badge--on .radio-live-dot {
    background: #00d4ff;
    box-shadow: 0 0 6px rgba(0, 212, 255, 0.8);
    animation: radio-dot-pulse 1.4s ease-in-out infinite;
}

@keyframes radio-dot-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.35; }
}

/* ── Display (EQ + marquee) ── */
.radio-display {
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(0, 212, 255, 0.18);
    border-radius: 6px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow: hidden;
}

/* Equalizer bars */
.radio-eq {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 24px;
}

.radio-eq-bar {
    flex: 1;
    background: rgba(0, 212, 255, 0.25);
    border-radius: 2px 2px 0 0;
    height: 4px;
    transition: background 0.4s;
}

.radio-eq--playing .radio-eq-bar {
    background: #00d4ff;
}

.radio-eq--playing .radio-eq-bar:nth-child(1) { }
.radio-eq--playing .radio-eq-bar:nth-child(2) { }
.radio-eq--playing .radio-eq-bar:nth-child(3) { }
.radio-eq--playing .radio-eq-bar:nth-child(4) { }
.radio-eq--playing .radio-eq-bar:nth-child(5) { }
.radio-eq--playing .radio-eq-bar:nth-child(6) { }
.radio-eq--playing .radio-eq-bar:nth-child(7) { }

/* Marquee */
.radio-marquee {
    width: 100%;
    overflow: hidden;
}

.radio-text {
    display: inline-block;
    animation: marquee 15s linear infinite;
    font-size: 13px;
    font-weight: 600;
    color: rgba(0, 212, 255, 0.85);
    white-space: nowrap;
    padding-right: 80px;
}

@keyframes marquee {
    0%   { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* ── Controls ── */
.radio-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.radio-play-wrap {
    flex-shrink: 0;
}

.radio-btn {
    background: rgba(0, 212, 255, 0.15);
    border: 1px solid rgba(0, 212, 255, 0.4);
    color: #00d4ff;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    flex-shrink: 0;
}

.radio-btn:hover {
    background: rgba(0, 212, 255, 0.28);
    border-color: #00d4ff;
    box-shadow: 0 0 14px rgba(0, 212, 255, 0.45);
}

.radio-btn-mute {
    background: rgba(0, 212, 255, 0.22);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.25);
}

/* Volume */
.radio-volume {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
}

.radio-vol-icon {
    color: rgba(0, 212, 255, 0.6);
    flex-shrink: 0;
}

.volume-slider {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background: rgba(0, 212, 255, 0.15);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: #00d4ff;
    cursor: pointer;
    box-shadow: 0 0 6px rgba(0, 212, 255, 0.6);
}

.volume-slider::-moz-range-thumb {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: #00d4ff;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 6px rgba(0, 212, 255, 0.6);
}

@media (max-width: 768px) {
    .radio-player-container {
        padding: 12px;
    }
    .volume-slider {
        width: 60px;
    }
}

/* Trending keywords section styling */
.trending-keywords {
    margin: 20px 0;
    padding: 15px;
    background-color: rgba(0, 212, 255, 0.05);
    border-left: 4px solid var(--accent-color);
    border-radius: 4px;
}

.trending-keywords h3 {
    margin-top: 0;
    font-size: 16px;
    color: var(--accent-color);
}

/* Video grid filtering and highlighting */
.video-item.filtered-out {
    opacity: 0.15 !important;
    pointer-events: none !important;
    filter: grayscale(100%) !important;
}

.video-item.highlighted {
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.8) !important;
    border: 2px solid rgba(0, 212, 255, 0.9) !important;
    background-color: rgba(0, 212, 255, 0.1) !important;
    transform: scale(1.02);
}

/* Animation for new videos */
.video-item.new-video {
    animation: slideInTop 0.5s ease;
}

@keyframes slideInTop {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================ */
/* ANALYSIS OPEN STATE — Wide-format readability overrides      */
/* ============================================================ */

body.analysis-open .analysis-view-header {
    padding: 10px 24px;
    border-radius: 3px 3px 0 0;
    background: rgba(5, 10, 18, 0.92);
    border-bottom-color: rgba(0, 212, 255, 0.22);
}

body.analysis-open .analysis-view-title {
    font-size: 15px;
    letter-spacing: 4px;
}

body.analysis-open .analysis-intel-panel {
    padding: 10px 24px 12px;
    gap: 14px;
    background: rgba(6, 11, 20, 0.68);
    border-bottom-color: rgba(0, 212, 255, 0.14);
}

/* Adjust connector position for wider gap in analysis-open mode */
body.analysis-open .analysis-primary-card::after {
    right: -19px;
}
body.analysis-open .analysis-primary-card::before {
    right: -13px;
    width: 12px;
}
body.analysis-open .analysis-primary-card.connector-hidden::before,
body.analysis-open .analysis-primary-card.connector-hidden::after {
    display: none;
}

body.analysis-open .analysis-primary-title {
    font-size: 14px;
}

body.analysis-open .analysis-primary-summary {
    font-size: 12px;
    line-height: 1.45;
}

body.analysis-open .analysis-primary-date {
    font-size: 11px;
}

body.analysis-open .analysis-followup-title,
body.analysis-open .analysis-other-item-title {
    font-size: 12px;
}

body.analysis-open .analysis-followup-date,
body.analysis-open .analysis-other-item-date {
    font-size: 10px;
}

body.analysis-open .analysis-view-content {
    border-left-color: rgba(0, 212, 255, 0.18);
    border-right-color: rgba(0, 212, 255, 0.18);
    border-bottom-color: rgba(0, 212, 255, 0.18);
    border-radius: 0 0 3px 3px;
}

/* =====================================================================
   VIDEO TIMELINE PANEL (AVT)
   ===================================================================== */

/* Toggle button inside primary card */
.avt-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 8px;
    padding: 5px 10px;
    width: 100%;
    background: transparent;
    border: 1px solid rgba(0, 212, 255, .3);
    border-radius: 3px;
    color: rgba(0, 212, 255, .65);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: border-color .2s, color .2s, background .2s;
}
.avt-toggle-btn:hover,
.avt-toggle-btn[aria-expanded="true"] {
    border-color: rgba(0, 212, 255, .75);
    color: #00d4ff;
    background: rgba(0, 212, 255, .06);
}
.avt-toggle-btn:focus { outline: none; }
.avt-toggle-btn:focus:not([aria-expanded="true"]) {
    border-color: rgba(0, 212, 255, .3);
    color: rgba(0, 212, 255, .65);
    background: transparent;
}
.avt-toggle-icon {
    font-size: 8px;
    display: inline-block;
    transition: transform .2s;
}
.avt-toggle-btn[aria-expanded="true"] .avt-toggle-icon {
    transform: rotate(90deg);
}

/* Panel — absolutely overlays the iframe inside .analysis-view-content */
.avt-panel {
    display: none;
    flex-direction: column;
    position: absolute;
    inset: 0;
    z-index: 5;
    background: #090e14;
    border: none;
    border-radius: 0;
    overflow: hidden;
    animation: avt-drop-in .22s ease;
}
.avt-panel.is-open {
    display: flex;
}
@keyframes avt-drop-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Panel header */
.avt-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    background: #0d1820;
    border-bottom: 1px solid #1e3040;
    flex-shrink: 0;
}
.avt-header-title {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .8px;
    text-transform: uppercase;
    color: rgba(0, 212, 255, .8);
    flex-shrink: 0;
}
.avt-keywords-label {
    font-size: 9px;
    color: rgba(255,255,255,.35);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    max-width: 120px;
}
/* ── Search controls ── */
.avt-search-controls {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    min-width: 0;
}
.avt-sc-label {
    font-size: 9px;
    color: rgba(255,255,255,.4);
    white-space: nowrap;
    flex-shrink: 0;
}
.avt-sc-sep {
    font-size: 9px;
    color: rgba(255,255,255,.3);
    flex-shrink: 0;
}
.avt-sc-date {
    background: rgba(0,212,255,.06);
    border: 1px solid rgba(0,212,255,.2);
    border-radius: 3px;
    color: rgba(255,255,255,.75);
    font-size: 9px;
    padding: 2px 4px;
    width: 96px;
    flex-shrink: 0;
    color-scheme: dark;
}
.avt-sc-kw {
    background: rgba(0,212,255,.06);
    border: 1px solid rgba(0,212,255,.2);
    border-radius: 3px;
    color: rgba(255,255,255,.75);
    font-size: 9px;
    padding: 2px 5px;
    flex: 1;
    min-width: 60px;
}
.avt-sc-kw::placeholder { color: rgba(255,255,255,.2); }
.avt-sc-apply {
    background: rgba(0,212,255,.15);
    border: 1px solid rgba(0,212,255,.4);
    border-radius: 3px;
    color: #00d4ff;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 8px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background .15s;
}
.avt-sc-apply:hover { background: rgba(0,212,255,.3); }
.avt-sc-reset {
    background: none;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 3px;
    color: rgba(255,255,255,.4);
    font-size: 9px;
    padding: 2px 5px;
    cursor: pointer;
    flex-shrink: 0;
    transition: color .15s, border-color .15s;
}
.avt-sc-reset:hover { color: rgba(255,255,255,.8); border-color: rgba(255,255,255,.4); }
.avt-close-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,.35);
    font-size: 13px;
    cursor: pointer;
    padding: 2px 4px;
    line-height: 1;
    flex-shrink: 0;
    transition: color .15s;
}
.avt-close-btn:hover { color: rgba(255,255,255,.7); }

/* Timeline track — horizontal scrollable row of date markers */
.avt-timeline-track {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 0;
    padding: 6px 12px 4px;
    overflow-x: auto;
    scrollbar-width: none;
    flex-shrink: 0;
    min-height: 80px;
    max-height: 80px;
    border-bottom: 1px solid #1e3040;
}
.avt-timeline-track::-webkit-scrollbar { display: none; }

.avt-date-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    flex-shrink: 0;
    padding: 0 6px;
    cursor: pointer;
    opacity: .5;
    transition: opacity .2s;
    position: relative;
}
.avt-date-marker:hover,
.avt-date-marker.is-active { opacity: 1; }

/* Connector line — hidden when dots vary in height */
.avt-date-marker::before { display: none; }
.avt-date-marker:first-child::before { display: none; }

.avt-date-dot {
    border-radius: 50%;
    background: rgba(0,212,255,.15);
    border: 1px solid rgba(0,212,255,.5);
    transition: background .2s, transform .15s, box-shadow .15s;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.avt-date-marker.is-active .avt-date-dot {
    background: rgba(0,212,255,.35);
    border-color: #00d4ff;
    transform: scale(1.08);
    box-shadow: 0 0 10px rgba(0,212,255,.5);
}
.avt-date-count {
    font-size: inherit;
    color: rgba(0,212,255,.9);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -.5px;
    pointer-events: none;
}
.avt-date-label {
    font-size: 10px;
    font-weight: 600;
    color: rgba(255,255,255,.7);
    white-space: nowrap;
    font-family: 'Courier New', monospace;
    letter-spacing: .5px;
}
.avt-date-marker.is-active .avt-date-label { color: #00d4ff; }

/* Dot-in animation */
@keyframes avt-dot-in {
    from { opacity: 0; transform: scale(0) }
    to   { opacity: 1; transform: scale(1) }
}

/* Video grid */
.avt-grid-wrap {
    overflow-x: auto;
    overflow-y: hidden;
    padding: 6px 12px 10px;
    scrollbar-width: thin;
    scrollbar-color: #1e3040 transparent;
    flex-shrink: 0;
    min-height: 170px;
    position: relative;
    border-bottom: 1px solid #1e3040;
}
.avt-grid-wrap::-webkit-scrollbar { height: 4px; }
.avt-grid-wrap::-webkit-scrollbar-track { background: transparent; }
.avt-grid-wrap::-webkit-scrollbar-thumb { background: #1e3040; border-radius: 2px; }
.avt-grid {
    display: flex;
    flex-direction: row;
    gap: 8px;
    width: max-content;
    min-height: 140px;
}

/* Individual video card */
.avt-video-card {
    width: 140px;
    flex-shrink: 0;
    background: #0d1820;
    border: 1px solid #1a2a38;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0;
    transform: translateX(18px);
}
.avt-video-card.is-visible {
    opacity: 1;
    transform: translateX(0);
    transition: opacity .3s ease, transform .3s ease, border-color .2s, background .2s;
}
.avt-video-card:hover {
    border-color: rgba(0,212,255,.5);
    background: #0d2030;
}
.avt-video-card.is-hidden { display: none; }

/* Thumbnail */
.avt-thumb-wrap {
    position: relative;
    width: 140px;
    height: 79px;
    background: #050a10;
    overflow: hidden;
}
.avt-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.avt-thumb-placeholder {
    width: 100%;
    height: 100%;
    background: #0d1820;
}
.avt-play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0);
    transition: background .15s;
}
.avt-video-card:hover .avt-play-overlay { background: rgba(0,0,0,.4); }
.avt-play-icon {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(0,212,255,.85);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .15s;
    flex-shrink: 0;
}
.avt-play-icon::after {
    content: '';
    border-style: solid;
    border-width: 5px 0 5px 8px;
    border-color: transparent transparent transparent #000;
    margin-left: 2px;
}
.avt-video-card:hover .avt-play-icon { opacity: 1; }
.avt-duration {
    position: absolute;
    bottom: 3px;
    right: 4px;
    background: rgba(0,0,0,.72);
    color: #fff;
    font-size: 8px;
    padding: 1px 4px;
    border-radius: 2px;
    font-family: 'Courier New', monospace;
}

/* Card text info */
.avt-card-info {
    padding: 5px 6px 6px;
}
.avt-card-channel {
    font-size: 8px;
    color: rgba(0,212,255,.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}
.avt-card-title {
    font-size: 9px;
    color: rgba(255,255,255,.75);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 3px;
}
.avt-card-meta {
    font-size: 8px;
    color: rgba(255,255,255,.3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Empty state */
.avt-empty {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: rgba(255,255,255,.3);
    pointer-events: none;
}

/* Inline YouTube player — fills remaining height */
.avt-player-wrap {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    border-top: 1px solid #1e3040;
    overflow: hidden;
    animation: avt-drop-in .2s ease;
    background: #070c10;
    position: relative;
}
.avt-player-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 0;
    width: 100%;
    flex: 1;
}
/* ── Export panel ── */
.avt-export-panel {
    display: flex;
    flex-direction: column;
    border-left: 1px solid #1e3040;
    background: #070c10;
    overflow: hidden;
    position: absolute;
    left: calc(50% + 210px);
    right: 0;
    top: 0;
    bottom: 0;
}
/* ── Intel panel (mirrors export on the left) ── */
.avt-intel-panel {
    display: flex;
    flex-direction: column;
    border-right: 1px solid #1e3040;
    background: #070c10;
    overflow: hidden;
    position: absolute;
    right: calc(50% + 210px);
    left: 0;
    top: 0;
    bottom: 0;
}
.avt-intel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    border-bottom: 1px solid #1e3040;
    flex-shrink: 0;
}
.avt-intel-title {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .7px;
    text-transform: uppercase;
    color: rgba(0,212,255,.7);
}
.avt-intel-count {
    font-size: 9px;
    color: rgba(255,255,255,.3);
}
.avt-intel-body {
    flex: 1;
    overflow-y: auto;
    padding: 8px 10px;
    scrollbar-width: thin;
    scrollbar-color: #1e3040 transparent;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.avt-intel-body::-webkit-scrollbar { width: 3px; }
.avt-intel-body::-webkit-scrollbar-thumb { background: #1e3040; }
.avt-intel-empty {
    font-size: 9px;
    color: rgba(255,255,255,.2);
    display: block;
    text-align: center;
    margin-top: 12px;
}
/* Intel blocks */
.avt-intel-block {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.avt-intel-block-title {
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .6px;
    text-transform: uppercase;
    color: rgba(0,212,255,.5);
    border-bottom: 1px solid rgba(0,212,255,.1);
    padding-bottom: 3px;
}
/* Bar rows */
.avt-intel-bar-row {
    display: flex;
    align-items: center;
    gap: 5px;
}
.avt-intel-bar-label {
    font-size: 8px;
    color: rgba(255,255,255,.55);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 90px;
    flex-shrink: 0;
}
.avt-intel-bar-track {
    flex: 1;
    height: 5px;
    background: rgba(255,255,255,.06);
    border-radius: 3px;
    overflow: hidden;
}
.avt-intel-bar-fill {
    height: 100%;
    background: rgba(0,212,255,.5);
    border-radius: 3px;
    transition: width .3s ease;
}
.avt-intel-bar-val {
    font-size: 8px;
    color: rgba(255,255,255,.35);
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 22px;
    text-align: right;
}
/* Stat pills */
.avt-intel-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.avt-intel-stat {
    background: rgba(0,212,255,.07);
    border: 1px solid rgba(0,212,255,.15);
    border-radius: 3px;
    padding: 2px 6px;
    font-size: 8px;
    color: rgba(255,255,255,.6);
    white-space: nowrap;
}
.avt-intel-stat strong {
    color: rgba(0,212,255,.9);
    font-weight: 700;
}
.avt-export-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    border-bottom: 1px solid #1e3040;
    flex-shrink: 0;
}
.avt-export-title {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .7px;
    text-transform: uppercase;
    color: rgba(0,212,255,.7);
}
.avt-export-btn {
    background: rgba(0,212,255,.1);
    border: 1px solid rgba(0,212,255,.35);
    border-radius: 3px;
    color: #00d4ff;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 7px;
    cursor: pointer;
    transition: background .15s;
    white-space: nowrap;
}
.avt-export-btn:hover { background: rgba(0,212,255,.25); }
.avt-export-btn:disabled { opacity: .35; cursor: default; }
.avt-export-preview {
    flex: 1;
    overflow-y: auto;
    padding: 6px 8px;
    scrollbar-width: thin;
    scrollbar-color: #1e3040 transparent;
}
.avt-export-empty {
    font-size: 9px;
    color: rgba(255,255,255,.2);
    display: block;
    text-align: center;
    margin-top: 12px;
}
.avt-export-row {
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 5px 0;
    border-bottom: 1px solid rgba(255,255,255,.05);
    cursor: default;
}
.avt-export-row:last-child { border-bottom: none; }
.avt-export-row-date {
    font-size: 8px;
    color: rgba(0,212,255,.6);
    font-family: 'Courier New', monospace;
    white-space: nowrap;
}
.avt-export-row-chan {
    font-size: 8px;
    color: rgba(255,255,255,.45);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.avt-export-row-title {
    font-size: 9px;
    color: rgba(255,255,255,.75);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.avt-player-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 8px;
    background: #0d1820;
    border: 1px solid #1e3040;
    border-bottom: none;
    border-radius: 0;
    flex-shrink: 0;
    width: 100%;
    max-width: 420px;
}
.avt-player-channel {
    font-size: 9px;
    color: rgba(0,212,255,.6);
    white-space: nowrap;
    flex-shrink: 0;
}
.avt-player-title {
    font-size: 10px;
    color: rgba(255,255,255,.7);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}
.avt-player-close {
    background: none;
    border: none;
    color: rgba(255,255,255,.35);
    font-size: 13px;
    cursor: pointer;
    padding: 2px 4px;
    line-height: 1;
    flex-shrink: 0;
    transition: color .15s;
}
.avt-player-close:hover { color: rgba(255,255,255,.7); }
.avt-player-frame {
    flex: 1;
    width: 100%;
    max-width: 420px;
    min-height: 0;
    border: 1px solid #1e3040;
    border-radius: 0;
    display: block;
    background: #000;
}
.avt-player-placeholder {
    width: 100%;
    max-width: 420px;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 1px dashed rgba(0,212,255,.2);
    border-radius: 4px;
    background: rgba(0,212,255,.02);
    color: rgba(255,255,255,.2);
}
.avt-placeholder-icon {
    font-size: 28px;
    opacity: .3;
}
.avt-placeholder-text {
    font-size: 10px;
    letter-spacing: .8px;
    text-transform: uppercase;
}
/* Highlight the active card */
.avt-video-card.is-playing {
    border-color: #00d4ff;
    box-shadow: 0 0 0 1px rgba(0,212,255,.4);
}

/* Loading state */
.avt-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px;
    font-size: 10px;
    color: rgba(0,212,255,.5);
}
.avt-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(0,212,255,.2);
    border-top-color: rgba(0,212,255,.7);
    border-radius: 50%;
    animation: avt-spin .7s linear infinite;
    flex-shrink: 0;
}
@keyframes avt-spin { to { transform: rotate(360deg); } }

/* ── Tagline Rotator ──────────────────────────────────────────── */
.tagline-rotator {
    position: absolute;
    right: var(--horizontal-gap);
    top: 50%;
    transform: translateY(-50%);
    /* width mirrors the right sidebar: 1fr out of 1fr+3fr+1fr */
    width: calc((100% - 4 * var(--horizontal-gap)) / 5);
    text-align: center;
    pointer-events: none;
    z-index: 1;
}

.tagline-rotator-track {
    position: relative;
    height: 16px;
}

.tagline-rotator-track > span {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-size: 11px;
    font-weight: 700;
    color: #b0b8c1;
    text-shadow: 0 0 10px rgba(176, 184, 193, 0.35);
    opacity: 0;
    animation: tagline-cycle 45s infinite;
}

.tagline-rotator .tl-em {
    letter-spacing: 0;
    font-size: 13px;
    line-height: 1;
    opacity: 1;
    animation: none;
    position: static;
}

.tagline-rotator .tl-word {
    letter-spacing: 3.5px;
    text-transform: uppercase;
    opacity: 1;
    animation: none;
    position: static;
}

.tagline-rotator-track > span:nth-child(1) { animation-delay: 0s; }
.tagline-rotator-track > span:nth-child(2) { animation-delay: 15s; }
.tagline-rotator-track > span:nth-child(3) { animation-delay: 30s; }

@keyframes tagline-cycle {
    0%   { opacity: 0; transform: translateY(5px); }
    5%   { opacity: 1; transform: translateY(0);   }
    28%  { opacity: 1; transform: translateY(0);   }
    33%  { opacity: 0; transform: translateY(-5px);}
    100% { opacity: 0; transform: translateY(-5px);}
}

@media (max-width: 1024px) {
    .tagline-rotator { display: none; }
}
