/* ═══════════════════════════════════════════════════
   AMUM Live Features CSS v4
   Chat overlay, viewer metrics, orientation, creator page
   ═══════════════════════════════════════════════════ */

/* ── Live layout: player + chat side by side ── */
.amum-live-layout {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
@media (min-width: 900px) {
    .amum-live-layout { flex-direction: row; }
    .amum-live-layout .amum-live-video { flex: 1 1 68%; }
    .amum-live-layout #amum-live-chat  { flex: 0 0 300px; }
}

/* ── Chat panel ── */
#amum-live-chat {
    background: #111827;
    border: 1px solid #1e2432;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    height: 380px;
    overflow: hidden;
}
#amum-live-chat .amum-chat-header {
    padding: 10px 14px;
    border-bottom: 1px solid #1e2432;
    font-size: 13px; font-weight: 700; color: #f1f5f9;
    display: flex; justify-content: space-between; align-items: center;
}
#amum-live-viewers {
    font-size: 11px; font-weight: 600; color: #4ade80;
    background: rgba(16,185,129,.1); padding: 2px 8px; border-radius: 12px;
}
#amum-live-chat .amum-chat-msgs {
    flex: 1; overflow-y: auto; padding: 10px 12px;
    display: flex; flex-direction: column; gap: 6px;
}
.amum-chat-msg { font-size: 12px; color: #94a3b8; line-height: 1.4; word-break: break-word; }
.amum-chat-msg b { color: #60a5fa; margin-right: 4px; }
.amum-chat-msg small { color: #475569; font-size: 10px; margin-left: 6px; }
#amum-live-chat .amum-chat-form {
    display: flex; gap: 6px; padding: 10px;
    border-top: 1px solid #1e2432;
}
#amum-live-chat .amum-chat-input {
    flex: 1; background: #0f1117; border: 1px solid #2d3748; border-radius: 8px;
    color: #f1f5f9; padding: 8px 10px; font-size: 12px; outline: none;
}
#amum-live-chat .amum-chat-input:focus { border-color: #3b82f6; }
#amum-live-chat .amum-chat-send {
    background: #3b82f6; color: #fff; border: none; border-radius: 8px;
    padding: 8px 14px; font-size: 12px; font-weight: 700; cursor: pointer;
}

/* Chat overlay mode (on top of fullscreen video, mobile) */
@media (max-width: 640px) {
    .amum-live-layout.amum-chat-overlay #amum-live-chat {
        position: absolute; bottom: 0; left: 0; right: 0;
        height: 40%;
        background: linear-gradient(transparent, rgba(10,13,20,.92));
        border: none; border-radius: 0;
        z-index: 5;
    }
    .amum-live-layout.amum-chat-overlay .amum-chat-header { border: none; }
}

/* ── HLS players: orientation handling ── */
.amum-hls-player video { object-fit: contain; background: #000; }
.amum-hls-player.portrait { aspect-ratio: auto; max-height: 80vh; }

/* ── Creator page enhancements ── */
.amum-channel-header .amum-channel-live-now {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(239,68,68,.12); border: 1px solid rgba(239,68,68,.35);
    color: #f87171; font-size: 11px; font-weight: 800;
    padding: 4px 12px; border-radius: 16px; text-decoration: none;
    animation: pulse-red 2s infinite;
}
.amum-channel-featured {
    margin: 0 16px 20px;
    border-radius: 12px; overflow: hidden;
    border: 1px solid #1e2432;
}
.amum-channel-shelf { margin-bottom: 28px; }
.amum-channel-shelf h4 {
    font-size: 14px; font-weight: 700; color: #f1f5f9;
    margin: 0 0 12px; padding-bottom: 8px; border-bottom: 1px solid #1e2432;
}

/* ── Engagement timeline card ── */
#amum-engage-chart { max-height: 260px; }
