/* ─── PRODUCT UI RECREATIONS ───
   Live HTML/CSS containers recreating actual AirPlay Studio UI
   from dashboard/style.css and broadcaster/style.css */

/* ═══ DIRECTOR'S DASHBOARD DEMO ═══ */
.dash-demo {
    display: flex;
    border-radius: var(--radius-xl);
    border: 1px solid var(--glass-border);
    overflow: hidden;
    background: var(--bg-secondary);
    box-shadow: var(--shadow-xl);
    height: 680px;
    max-width: 1100px;
    margin: 0 auto;
}

/* Sidebar recreation */
.dash-sidebar {
    width: 200px;
    background: rgba(10, 15, 28, 0.97);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    padding: 0;
    overflow: hidden;
}

.dash-sidebar-brand {
    padding: 18px 16px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 16px;
    font-weight: 900;
    letter-spacing: -0.5px;
    font-family: var(--font-display);
}

.dash-sidebar-brand .accent {
    color: var(--accent-red);
}

.dash-sidebar-section-label {
    padding: 14px 16px 6px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.25);
    text-transform: uppercase;
}

.dash-sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    margin: 1px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.45);
    transition: all 0.2s ease;
    cursor: default;
}

.dash-sidebar-item.active {
    color: #fff;
    background: var(--accent-red);
    box-shadow: 0 4px 12px rgba(255, 62, 62, 0.25);
    font-weight: 700;
}

.dash-sidebar-item .icon {
    font-size: 14px;
    width: 18px;
    text-align: center;
}

.dash-sidebar-spacer {
    flex: 1;
}

.dash-sidebar-footer {
    padding: 12px 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.dash-sidebar-user {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
}

.dash-sidebar-plan {
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: var(--indigo);
}

/* Multi-view grid */
.dash-grid-area {
    flex: 1;
    padding: 12px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 10px;
    background: rgba(15, 23, 42, 0.4);
    overflow: hidden;
}

/* Slot styles are now in the interactive section below */

/* Simulated video placeholder with gradient */
.slot-video-sim {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
            rgba(15, 23, 42, 0.9) 0%,
            rgba(30, 41, 59, 0.6) 50%,
            rgba(15, 23, 42, 0.9) 100%);
}

/* Real video feed */
.slot-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

/* VU meter bars */
.slot-vu {
    position: absolute;
    bottom: 8px;
    left: 8px;
    display: flex;
    gap: 2px;
    align-items: flex-end;
    height: 24px;
    z-index: 2;
}

.slot-vu .vu-bar {
    width: 3px;
    border-radius: 1px;
    background: var(--tally-green);
    min-height: 3px;
    transition: height 0.1s;
}

.slot-vu.active .vu-bar {
    animation: vu-bounce 1.2s ease-in-out infinite;
}

.slot-vu.active .vu-bar:nth-child(1) {
    animation-delay: 0s;
}

.slot-vu.active .vu-bar:nth-child(2) {
    animation-delay: 0.15s;
}

.slot-vu.active .vu-bar:nth-child(3) {
    animation-delay: 0.3s;
}

.slot-vu.active .vu-bar:nth-child(4) {
    animation-delay: 0.45s;
}

.slot-vu.active .vu-bar:nth-child(5) {
    animation-delay: 0.6s;
}

/* Slot name label */
.slot-name {
    position: absolute;
    bottom: 8px;
    left: 40px;
    font-size: 11px;
    font-weight: 700;
    color: white;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
    z-index: 2;
}

/* Role tag */
.slot-role {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 3px 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.5);
    z-index: 2;
    pointer-events: none;
}

/* Tally badge */
.slot-tally {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.08em;
    z-index: 2;
    display: block;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.4);
}

.slot-tally.on-air {
    background: var(--tally-green);
    color: #000;
}

.slot-tally.preview {
    background: #f59e0b;
    color: #000;
}

/* Interactive slot — clickable */
.dash-grid-slot {
    background: rgba(10, 14, 26, 0.85);
    border: 2px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.15s ease;
    aspect-ratio: 16/9;
}

.dash-grid-slot:hover {
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 0 16px rgba(99, 102, 241, 0.08);
    transform: scale(1.01);
    filter: brightness(1);
    opacity: 1;
}

.dash-grid-slot.live {
    border-color: var(--tally-green);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.15);
    filter: brightness(1);
    opacity: 1;
}

/* Dim non-live slots so the live source pops */
.dash-grid-slot:not(.live) {
    filter: brightness(0.55);
    opacity: 0.8;
}

.dash-grid-slot.preview-selected {
    border-color: #f59e0b;
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.12);
    filter: brightness(0.75);
    opacity: 0.9;
}

/* Hint */
.dash-grid-hint {
    grid-column: 1 / -1;
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: rgba(99, 102, 241, 0.35);
    padding: 4px 0 0;
    animation: pulse 3s ease-in-out infinite;
}

/* REC button */
.slot-rec {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    z-index: 2;
    border: none;
    cursor: default;
}

.slot-rec.recording {
    background: var(--recording-red);
    animation: pulse-glow 1.5s ease-in-out infinite;
}

.slot-rec.idle {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* ═══ BROADCASTER PORTAL DEMO ═══ */
.bcast-demo {
    display: flex;
    gap: var(--space-xl);
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
}

.bcast-phone-frame {
    width: 280px;
    flex-shrink: 0;
    background: #000;
    border-radius: 36px;
    padding: 12px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-xl);
}

.bcast-phone-screen {
    border-radius: 26px;
    overflow: hidden;
    background: var(--bg-secondary);
    aspect-ratio: 9/16;
    position: relative;
    display: flex;
    flex-direction: column;
}

.bcast-stage {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 4px;
    padding: 4px;
    background: radial-gradient(circle at center, #0f172a 0%, #05070a 100%);
}

.bcast-peer {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 4px;
    overflow: hidden;
}

.bcast-peer.self {
    border-color: var(--tally-green);
}

.bcast-peer .peer-label {
    font-size: 8px;
    font-weight: 700;
    color: white;
    background: rgba(0, 0, 0, 0.5);
    padding: 2px 6px;
    border-radius: 4px;
    z-index: 2;
}

.bcast-peer .you-badge {
    position: absolute;
    top: 3px;
    left: 3px;
    font-size: 6px;
    font-weight: 800;
    background: var(--tally-green);
    color: #000;
    padding: 1px 4px;
    border-radius: 3px;
    z-index: 2;
}

/* On-air tally */
.bcast-tally-banner {
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 14px;
    border-radius: 6px;
    background: var(--accent-red);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.1em;
    z-index: 10;
    animation: pulse 1.5s ease-in-out infinite;
}

/* Control bar */
.bcast-ctrl {
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 8px;
    background: rgba(10, 15, 28, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.bcast-ctrl-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    cursor: default;
}

.bcast-ctrl-btn.end {
    background: var(--accent-red);
    border-color: var(--accent-red);
}

/* Callout list */
.bcast-callouts {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.bcast-callout {
    display: flex;
    gap: var(--space-md);
    align-items: flex-start;
}

.bcast-callout-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.bcast-callout-text h4 {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 4px;
}

.bcast-callout-text p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ═══ NLE TIMELINE DEMO ═══ */
.nle-demo {
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    max-width: 1100px;
    margin: 0 auto;
    box-shadow: var(--shadow-xl);
}

.nle-toolbar {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 10px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(10, 15, 28, 0.9);
}

.nle-toolbar-btn {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.6);
    cursor: default;
}

.nle-toolbar-btn.active {
    background: var(--indigo);
    border-color: var(--indigo);
    color: white;
}

.nle-toolbar-spacer {
    flex: 1;
}

.nle-timecode {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 600;
    color: var(--cyan);
    letter-spacing: 0.05em;
}

/* Timeline area */
.nle-timeline {
    position: relative;
    height: 200px;
    padding: 0;
    overflow: hidden;
}

/* Ruler */
.nle-ruler {
    height: 24px;
    background: rgba(15, 23, 42, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: flex-end;
    padding: 0 8px;
    position: relative;
}

.nle-ruler-mark {
    position: absolute;
    bottom: 0;
    font-size: 9px;
    font-family: var(--font-mono);
    color: rgba(255, 255, 255, 0.3);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    padding-left: 4px;
    padding-bottom: 2px;
    height: 100%;
    display: flex;
    align-items: flex-end;
}

/* Waveform track */
.nle-track {
    height: 60px;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    display: flex;
    align-items: center;
}

.nle-track-label {
    width: 80px;
    padding: 0 8px;
    font-size: 10px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.35);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    height: 100%;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    background: rgba(10, 15, 28, 0.7);
}

.nle-track-content {
    flex: 1;
    height: 100%;
    position: relative;
    overflow: hidden;
}

/* Waveform bars (CSS simulated) */
.nle-waveform {
    display: flex;
    align-items: center;
    height: 100%;
    gap: 1px;
    padding: 8px 4px;
}

.nle-waveform .wave-bar {
    width: 2px;
    background: var(--indigo);
    opacity: 0.6;
    border-radius: 1px;
    min-height: 4px;
    flex-shrink: 0;
}

/* Block overlays */
.nle-block {
    position: absolute;
    height: calc(100% - 12px);
    top: 6px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    padding: 0 8px;
    font-size: 10px;
    font-weight: 700;
    overflow: hidden;
    white-space: nowrap;
    cursor: default;
}

.nle-block.text-block {
    background: rgba(99, 102, 241, 0.25);
    border: 1px solid rgba(99, 102, 241, 0.4);
    color: rgba(165, 180, 252, 0.9);
}

.nle-block.ai-block {
    background: rgba(0, 206, 201, 0.2);
    border: 1px solid rgba(0, 206, 201, 0.4);
    color: var(--cyan);
}

/* Playhead */
.nle-playhead {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--accent-red);
    z-index: 10;
    pointer-events: none;
    box-shadow: 0 0 8px rgba(255, 62, 62, 0.4);
    transition: left 0.05s linear;
}

.nle-playhead::before {
    content: '';
    position: absolute;
    top: 0;
    left: -4px;
    width: 10px;
    height: 10px;
    background: var(--accent-red);
    border-radius: 2px;
    clip-path: polygon(0 0, 100% 0, 50% 100%);
}

/* ═══ AI PIPELINE DEMO ═══ */
.ai-pipeline {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    max-width: 1100px;
    margin: 0 auto;
    flex-wrap: wrap;
    justify-content: center;
}

.ai-stage {
    background: var(--glass-bg);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 24px 20px;
    text-align: center;
    flex: 1;
    min-width: 200px;
    max-width: 260px;
    transition: all 0.3s var(--ease-out-expo);
}

.ai-stage:hover {
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-4px);
}

.ai-stage-icon {
    font-size: 28px;
    margin-bottom: var(--space-sm);
}

.ai-stage-title {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 4px;
}

.ai-stage-desc {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.ai-arrow {
    font-size: 24px;
    color: var(--text-dim);
    flex-shrink: 0;
}

.ai-score-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 800;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--green);
    margin-top: var(--space-sm);
}

/* ═══ REALTIME GRAPHICS DEMO ═══ */
.graphics-demo {
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    max-width: 1100px;
    margin: 0 auto;
}

.graphics-stage {
    position: relative;
    aspect-ratio: 16/9;
    background:
        radial-gradient(circle at 30% 40%, rgba(99, 102, 241, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 70% 60%, rgba(0, 206, 201, 0.04) 0%, transparent 50%),
        linear-gradient(135deg, #0a0e1a 0%, #0f172a 50%, #0a0e1a 100%);
    overflow: hidden;
}

.graphics-layer {
    position: absolute;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    animation: card-entry 0.6s var(--ease-out-expo);
}

.graphics-label {
    font-size: 10px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.graphics-bar {
    height: 4px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--accent-red), var(--indigo), var(--cyan));
    background-size: 200% 100%;
    animation: gradient-shift 3s ease infinite;
}

.graphics-score {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px;
}

.score-team {
    font-size: 11px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.1em;
}

.score-value {
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 900;
    color: white;
}

.score-divider {
    font-size: 24px;
    color: rgba(255, 255, 255, 0.3);
}

.graphics-ticker {
    overflow: hidden;
    white-space: nowrap;
}

.graphics-ticker span {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    animation: ticker-scroll 12s linear infinite;
}

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

    100% {
        transform: translateX(-100%);
    }
}

/* ═══ Z-DEPTH PARALLAX — DISABLED ═══ */

/* ═══ RESPONSIVE DEMO OVERRIDES ═══ */
@media (max-width: 768px) {
    .dash-demo {
        flex-direction: column;
        height: auto;
        max-width: 100%;
    }

    .dash-sidebar {
        width: 100%;
        flex-direction: row;
        overflow-x: auto;
        padding: 8px;
        gap: 4px;
    }

    .dash-sidebar-brand,
    .dash-sidebar-section-label,
    .dash-sidebar-spacer,
    .dash-sidebar-footer {
        display: none;
    }

    .dash-sidebar-item {
        margin: 0;
        white-space: nowrap;
        padding: 6px 12px;
    }

    .dash-grid-area {
        height: auto;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto;
        padding: 8px;
        gap: 8px;
    }

    .dash-grid-slot {
        aspect-ratio: 16/9;
    }

    .slot-video {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .slot-role {
        font-size: 8px !important;
        padding: 2px 6px !important;
    }

    .slot-tally {
        font-size: 8px !important;
        padding: 2px 6px !important;
    }

    .slot-name {
        font-size: 10px !important;
    }

    .dash-grid-hint {
        font-size: 9px;
    }

    .bcast-demo {
        flex-direction: column;
    }

    .bcast-phone-frame {
        width: 100%;
        max-width: none;
        padding: 0;
        border: none;
        border-radius: var(--radius-xl);
        background: transparent;
        box-shadow: none;
    }

    .bcast-phone-screen {
        aspect-ratio: 16/9;
        border-radius: var(--radius-xl);
        border: 1px solid var(--glass-border);
    }

    .ai-pipeline {
        flex-direction: column;
    }

    .ai-arrow {
        transform: rotate(90deg);
    }
}