/* Marketers Brain — immersive loading theater */

#marketers-brain-theater {
    z-index: 13000;
}

#marketers-brain-theater.mb-theater-open {
    display: flex !important;
}

.mb-theater-backdrop {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 120% 80% at 50% 20%, rgba(88, 28, 135, 0.45), rgba(15, 23, 42, 0.97) 55%, #020617);
    overflow: hidden;
}

.mb-theater-grid {
    position: absolute;
    inset: -50%;
    background-image:
        linear-gradient(rgba(139, 92, 246, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(139, 92, 246, 0.08) 1px, transparent 1px);
    background-size: 48px 48px;
    animation: mb-theater-grid-drift 24s linear infinite;
    opacity: 0.6;
}

@keyframes mb-theater-grid-drift {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(48px, 48px) rotate(0.5deg); }
}

.mb-theater-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.mb-theater-particle {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: rgba(167, 139, 250, 0.7);
    animation: mb-theater-float 8s ease-in-out infinite;
}

@keyframes mb-theater-float {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.2; }
    50% { transform: translateY(-24px) scale(1.4); opacity: 0.9; }
}

.mb-theater-card {
    position: relative;
    width: min(92vw, 520px);
    max-height: min(88vh, 640px);
    overflow: hidden;
    border-radius: 1.25rem;
    border: 1px solid rgba(167, 139, 250, 0.35);
    background: linear-gradient(145deg, rgba(30, 27, 75, 0.92), rgba(15, 23, 42, 0.95));
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.05) inset,
        0 25px 80px rgba(0, 0, 0, 0.55),
        0 0 60px rgba(139, 92, 246, 0.15);
}

.mb-theater-icon-wrap {
    width: 4rem;
    height: 4rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #a855f7, #6366f1);
    box-shadow: 0 0 30px rgba(168, 85, 247, 0.45);
    animation: mb-theater-pulse 2.2s ease-in-out infinite;
}

@keyframes mb-theater-pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 30px rgba(168, 85, 247, 0.45); }
    50% { transform: scale(1.05); box-shadow: 0 0 45px rgba(168, 85, 247, 0.65); }
}

.mb-theater-stage-label {
    font-size: 1.05rem;
    font-weight: 700;
    color: #f5f3ff;
    line-height: 1.45;
    min-height: 2.9rem;
}

.mb-theater-counter {
    font-variant-numeric: tabular-nums;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.8rem;
    color: #c4b5fd;
    letter-spacing: 0.02em;
}

.mb-theater-progress-track {
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.mb-theater-progress-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #a855f7, #22d3ee, #a855f7);
    background-size: 200% 100%;
    animation: mb-theater-progress-shine 2s linear infinite;
    transition: width 0.65s ease-out;
    max-width: 92%;
}

@keyframes mb-theater-progress-shine {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

.mb-theater-terminal {
    height: 9.5rem;
    overflow-y: auto;
    border-radius: 0.65rem;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.65rem 0.75rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.68rem;
    line-height: 1.55;
    color: #86efac;
    scroll-behavior: smooth;
}

.mb-theater-terminal .mb-log-dim {
    color: #94a3b8;
}

.mb-theater-terminal .mb-log-accent {
    color: #c4b5fd;
}

.mb-theater-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.mb-theater-mute-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #e9d5ff;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0.5rem;
    padding: 0.4rem 0.75rem;
    cursor: pointer;
    transition: background 0.15s;
}

.mb-theater-mute-btn:hover {
    background: rgba(255, 255, 255, 0.14);
}

.mb-theater-hint {
    font-size: 0.68rem;
    color: rgba(226, 232, 240, 0.55);
    text-align: right;
    flex: 1;
}

@media (max-width: 480px) {
    .mb-theater-card {
        width: 94vw;
        border-radius: 1rem;
    }
    .mb-theater-terminal {
        height: 7.5rem;
        font-size: 0.62rem;
    }
    .mb-theater-stage-label {
        font-size: 0.95rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mb-theater-grid,
    .mb-theater-particle,
    .mb-theater-icon-wrap,
    .mb-theater-progress-fill {
        animation: none !important;
    }
    .mb-theater-progress-fill {
        transition: none;
    }
}
