/* Live embed */
.live-panel {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
}

.live-orb {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, var(--entropy), var(--entropy-dim));
    animation: livePulse 2s infinite;
    flex-shrink: 0;
}

@keyframes livePulse {
    0%, 100% { opacity: 0.85; transform: scale(1); box-shadow: 0 0 12px rgba(255, 152, 0, 0.3); }
    50% { opacity: 1; transform: scale(1.06); box-shadow: 0 0 24px rgba(255, 152, 0, 0.55); }
}

.live-info h3 {
    margin: 0;
    color: var(--accent);
}

.live-info p {
    margin: 0.25rem 0 0;
    color: var(--text);
}

.phase-badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    background: var(--bg);
    border-radius: 4px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    margin-top: 0.5rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .mission-layout {
        grid-template-columns: 220px 1fr;
        grid-template-rows: 1fr auto;
        height: auto;
        min-height: calc(100vh - 53px);
    }

    .right-panel {
        grid-column: 1 / -1;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .right-panel > * {
        flex: 1;
        min-width: 220px;
    }
}

@media (max-width: 768px) {
    .mission-layout {
        grid-template-columns: 1fr;
    }

    .sidebar, .right-panel {
        order: 2;
    }

    .workspace {
        order: 1;
    }

    .cards,
    .status-bar,
    .score-board,
    .field-grid {
        grid-template-columns: 1fr;
    }

    .learn ul {
        columns: 1;
    }

    .hero h1 {
        font-size: 2.25rem;
    }
}

/* FX layer */
#fx-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 999;
}

.fx-packet {
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.5s ease;
    z-index: 1000;
}

/* Media buzz feed */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.media-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.media-card:hover,
.media-card:focus {
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    outline: none;
}

.media-thumb {
    position: relative;
    height: 150px;
    background: linear-gradient(135deg, #141825, #0b0d12);
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border);
}

.media-play {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(0, 212, 240, 0.9);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    padding-left: 4px;
    box-shadow: 0 0 20px rgba(0, 212, 240, 0.4);
}

.media-duration {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    background: rgba(0, 0, 0, 0.7);
    color: var(--text);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.media-doc {
    font-size: 3rem;
    opacity: 0.7;
}

.media-meta {
    padding: 1rem;
}

.media-source {
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.media-date {
    color: var(--muted);
    font-weight: 400;
    text-transform: none;
    margin-left: 0.5rem;
}

.media-headline {
    margin: 0.35rem 0 0.5rem;
    font-size: 1.05rem;
    color: var(--text);
}

.media-summary {
    font-size: 0.9rem;
    color: var(--muted);
    margin: 0;
    line-height: 1.4;
}

.media-views {
    margin-top: 0.75rem;
    font-size: 0.8rem;
    color: var(--muted);
}

/* Media modal */
#media-modal-root {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.media-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
}

.media-modal {
    position: relative;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    width: 100%;
    max-width: 720px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow);
    padding: 1.5rem;
    animation: modalIn 0.25s ease-out;
}

@keyframes modalIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.media-modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--panel-hover);
    color: var(--text);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.media-modal-close:hover {
    background: var(--error);
    border-color: var(--error);
}

.media-modal-header {
    margin-bottom: 1rem;
}

.media-modal-header h2 {
    margin: 0.25rem 0 0;
    color: var(--text);
}

.media-modal-body p {
    color: var(--muted);
    margin: 0.75rem 0;
}

.media-lead {
    font-size: 1.05rem;
    color: var(--text) !important;
    border-left: 3px solid var(--accent);
    padding-left: 1rem;
}

.media-video-player {
    background: #05060a;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 1.25rem;
    border: 1px solid var(--border);
}

.media-video-screen {
    position: relative;
    height: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 50% 50%, #1a2332 0%, #05060a 70%);
}

.media-video-pulse {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.3;
    animation: pulseRing 2s ease-in-out infinite;
    box-shadow: 0 0 30px var(--accent);
}

@keyframes pulseRing {
    0%, 100% { transform: scale(0.8); opacity: 0.3; }
    50% { transform: scale(1.2); opacity: 0.6; }
}

.media-video-title {
    position: absolute;
    top: 1rem;
    left: 1rem;
    right: 1rem;
    font-weight: 600;
    color: var(--text);
    text-align: center;
}

.media-video-watermark {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    font-size: 0.7rem;
    color: var(--muted);
    letter-spacing: 0.1em;
    opacity: 0.6;
}

.media-video-controls {
    padding: 0.75rem 1rem;
    background: #0b0d12;
}

.media-progress {
    height: 6px;
    background: #2a3140;
    border-radius: 3px;
    margin-bottom: 0.75rem;
    overflow: hidden;
}

.media-progress-bar {
    height: 100%;
    width: 0%;
    background: var(--accent);
    transition: width 0.3s ease;
}

.media-controls-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.media-control-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--accent);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.media-control-btn:hover {
    background: var(--accent);
    color: #000;
}

.media-time {
    flex: 1;
}

.media-transcript {
    max-height: 220px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.25);
    border-radius: var(--radius);
    padding: 1rem;
    border: 1px solid var(--border);
}

.media-transcript-line {
    color: var(--muted);
    padding: 0.35rem 0;
    border-left: 2px solid transparent;
    padding-left: 0.75rem;
    transition: color 0.2s, border-color 0.2s;
}

.media-transcript-line.active {
    color: var(--text);
    border-left-color: var(--accent);
}

