/* ── Live Cinema Mode ─────────────────────────────────────────────────────── */
/* Activated by adding .live-mode to .memories-shell */

.memories-shell.live-mode {
    gap: 0;
}

.memories-shell.live-mode .memories-sidebar {
    width: 220px;
    min-width: 180px;
    max-width: 220px;
}

.memories-shell.live-mode .memories-display {
    flex: 1;
}

.memories-shell.live-mode .memories-info-panel {
    display: none;
}

/* Live panel replaces info panel */
.live-panel {
    display: none;
    width: 300px;
    min-width: 280px;
    max-width: 300px;
    height: 100%;
    flex-shrink: 0;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-subtle);
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.memories-shell.live-mode .live-panel {
    display: flex;
}

/* Live panel header */
.live-panel-header {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.live-panel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e53935;
    animation: livePulse 1s infinite;
    flex-shrink: 0;
}

@keyframes livePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: .5; transform: scale(1.3); }
}

.live-panel-title {
    font-size: .8rem;
    font-weight: 700;
    color: var(--text-primary);
    flex: 1;
}

.live-viewer-count {
    font-size: .72rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: .25rem;
}

/* Comments feed */
.live-comments-feed {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.5rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    scroll-behavior: smooth;
}

.live-comments-feed::-webkit-scrollbar { width: 3px; }
.live-comments-feed::-webkit-scrollbar-track { background: transparent; }
.live-comments-feed::-webkit-scrollbar-thumb { background: var(--border-subtle); border-radius: 4px; }

.live-comment {
    display: flex;
    gap: 0.4rem;
    align-items: flex-start;
    animation: commentSlideIn 0.25s ease-out;
}

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

.live-comment-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--gradient-sunset, linear-gradient(135deg,#ff6b35,#e63946));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: .6rem;
    font-weight: 700;
    flex-shrink: 0;
    overflow: hidden;
}

.live-comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.live-comment-body {
    flex: 1;
    min-width: 0;
}

.live-comment-user {
    font-size: .68rem;
    font-weight: 700;
    color: var(--text-primary);
}

.live-comment-text {
    font-size: .75rem;
    color: var(--text-secondary, #aaa);
    word-break: break-word;
    line-height: 1.4;
}

/* System messages (joined, reacted) */
.live-comment.live-system .live-comment-text {
    color: var(--text-muted);
    font-style: italic;
    font-size: .68rem;
}

/* Comment input */
.live-comment-input-wrap {
    padding: 0.5rem 0.75rem;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    gap: 0.4rem;
    align-items: center;
    flex-shrink: 0;
}

.live-comment-input {
    flex: 1;
    background: var(--bg-elevated, #1a1a2e);
    border: 1px solid var(--border-subtle);
    border-radius: 999px;
    padding: 0.4rem 0.75rem;
    font-size: .78rem;
    color: var(--text-primary);
    outline: none;
    transition: border-color .15s;
}

.live-comment-input:focus {
    border-color: #e53935;
}

.live-comment-input::placeholder {
    color: var(--text-muted);
}

.live-comment-send {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e53935;
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
    flex-shrink: 0;
    transition: background .15s, transform .1s;
}

.live-comment-send:hover { background: #c62828; }
.live-comment-send:active { transform: scale(.92); }

/* Reaction bar */
.live-reaction-bar {
    padding: 0.5rem 0.75rem;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    gap: 0.3rem;
    justify-content: space-around;
    flex-shrink: 0;
}

.live-reaction-btn {
    background: var(--bg-elevated, #1a1a2e);
    border: 1px solid var(--border-subtle);
    border-radius: 999px;
    padding: 0.3rem 0.6rem;
    font-size: 1.1rem;
    cursor: pointer;
    transition: transform .15s, background .15s;
    line-height: 1;
}

.live-reaction-btn:hover {
    background: var(--bg-hover, #252540);
    transform: scale(1.2);
}

.live-reaction-btn:active {
    transform: scale(.9);
}

/* Floating reactions that animate up the video */
.live-reaction-floater {
    position: absolute;
    bottom: 60px;
    font-size: 1.8rem;
    pointer-events: none;
    z-index: 30;
    animation: floatUp 2.8s ease-out forwards;
    user-select: none;
}

@keyframes floatUp {
    0%   { opacity: 1;  transform: translateY(0)    rotate(0deg)   scale(1); }
    60%  { opacity: .9; transform: translateY(-180px) rotate(12deg)  scale(1.2); }
    100% { opacity: 0;  transform: translateY(-320px) rotate(-8deg)  scale(.8); }
}

/* Wide video area in live mode */
.memories-shell.live-mode .memories-media-root {
    max-height: 100%;
    height: 100%;
}

.memories-shell.live-mode .memories-screen {
    height: 100%;
}
