/* ===== ROOM HEADER ===== */
.room-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px 32px; border-bottom: 1px solid var(--border);
    background: var(--bg-secondary);
}
.room-header-left { display: flex; align-items: center; gap: 16px; }
.room-info h2 { font-size: 18px; font-weight: 700; }
.room-timer { font-size: 13px; color: var(--green); font-weight: 600; font-variant-numeric: tabular-nums; }
.room-header-right { display: flex; gap: 10px; }
.room-body { display: flex; height: calc(100vh - 130px); overflow: hidden; }

/* ===== MEMBERS GRID ===== */
.members-grid {
    flex: 1; padding: 24px;
    display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px; align-content: start; overflow-y: auto;
}
.member-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden; transition: var(--transition);
}
.member-card:hover { border-color: var(--border-hover); }
.member-card.is-you { border-color: var(--accent); box-shadow: 0 0 20px var(--accent-glow); }
.member-camera {
    height: 160px; background: var(--bg-secondary);
    display: flex; align-items: center; justify-content: center;
    position: relative;
}
.member-camera.active { background: linear-gradient(135deg, #1a1a3e 0%, #0d1b2a 100%); }
.camera-placeholder {
    display: flex; flex-direction: column; align-items: center;
    gap: 8px; color: var(--text-muted); font-size: 13px;
}
.camera-emoji { font-size: 48px; }
.camera-active-view { display: flex; align-items: center; justify-content: center; }
.big-emoji { font-size: 64px; }
.camera-badge {
    position: absolute; top: 8px; right: 8px;
    background: rgba(0,184,148,0.2); color: var(--green);
    padding: 3px 8px; border-radius: 50px;
    font-size: 11px; font-weight: 600;
}

/* WebRTC-ready: Video element in member cards */
.member-video {
    width: 100%; height: 100%; object-fit: cover;
    border-radius: 0; position: absolute; top: 0; left: 0;
    z-index: 1;
}

/* Connection status banner (Phase 2) */
.connection-banner {
    position: fixed; top: 0; left: 0; right: 0;
    z-index: 9999; padding: 8px 16px;
    text-align: center; font-size: 13px; font-weight: 600;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform: translateY(-100%); opacity: 0;
}
.connection-banner.show { transform: translateY(0); opacity: 1; }
.connection-banner.offline {
    background: linear-gradient(90deg, var(--red), #e55039);
    color: white;
}
.connection-banner.reconnecting {
    background: linear-gradient(90deg, var(--yellow), #f6b93b);
    color: #1a1a2e;
}
.connection-banner.online {
    background: linear-gradient(90deg, var(--green), #55efc4);
    color: #1a1a2e;
}

/* Mic status and glow (Task 11) */
.member-card.speaking-glow {
    border-color: var(--green);
    box-shadow: 0 0 15px rgba(0, 184, 148, 0.4);
}
.member-mic-status {
    position: absolute; bottom: 8px; right: 8px;
    width: 28px; height: 28px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    z-index: 10;
}
.member-mic-status.on { background: var(--green); color: white; }
.member-mic-status.off { background: var(--red); color: white; }

/* Max 6 videos limit card (Task 3) */
.more-members-card {
    display: flex; align-items: center; justify-content: center;
    background: var(--bg-card);
    border: 1px dashed var(--border);
    min-height: 250px;
}
.more-members-content {
    display: flex; flex-direction: column; align-items: center;
    gap: 12px; color: var(--text-secondary);
}
.more-members-icon { font-size: 32px; }

/* Member info */
.member-info { padding: 14px 16px 8px; }
.member-name { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.status-dot.online { background: var(--green); box-shadow: 0 0 6px var(--green-glow); }
.status-dot.away { background: var(--yellow); }
.status-dot.pulse { animation: pulse-dot 1.5s infinite; }
.you-badge { font-size: 10px; background: var(--accent); color: #fff; padding: 2px 6px; border-radius: 4px; }
.member-status { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }
.member-actions { padding: 8px 16px 14px; display: flex; gap: 8px; flex-wrap: wrap; }

/* Focus bar */
.member-focus-bar { padding: 8px 16px 14px; display: flex; align-items: center; gap: 8px; }
.focus-label { font-size: 11px; color: var(--text-muted); white-space: nowrap; }
.focus-track { flex: 1; height: 6px; background: var(--bg-secondary); border-radius: 3px; overflow: hidden; }
.focus-fill {
    height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-light));
    border-radius: 3px; transition: width 1s ease;
}
.focus-fill.high { background: linear-gradient(90deg, var(--green), #55efc4); }
.focus-fill.low { background: linear-gradient(90deg, var(--yellow), #ffeaa7); }
.focus-value { font-size: 12px; font-weight: 700; color: var(--text-secondary); min-width: 32px; text-align: right; }

/* ===== CHAT SIDEBAR ===== */
.chat-sidebar {
    width: 300px; border-left: 1px solid var(--border);
    display: flex; flex-direction: column; background: var(--bg-secondary);
}
.chat-sidebar h3 { padding: 16px; font-size: 15px; border-bottom: 1px solid var(--border); }
.chat-messages { flex: 1; padding: 12px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.chat-msg { font-size: 13px; line-height: 1.5; color: var(--text-secondary); }
.chat-msg.system { text-align: center; color: var(--text-muted); font-size: 12px; padding: 4px; }
.chat-author { font-weight: 600; margin-right: 4px; }
.chat-input-area { padding: 12px; border-top: 1px solid var(--border); display: flex; gap: 8px; }
.chat-input-area input {
    flex: 1; padding: 10px 14px;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-sm); color: var(--text-primary);
    font-family: inherit; font-size: 13px;
}
.chat-input-area input:focus { outline: none; border-color: var(--accent); }

/* ===== ROOM CODE DISPLAY ===== */
.room-code-display {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 14px; background: var(--bg-card);
    border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.room-code-display code {
    font-family: 'Courier New', monospace; font-size: 16px;
    font-weight: 700; color: var(--accent-light); letter-spacing: 2px;
}
.room-code-display .copy-btn {
    background: none; border: none; color: var(--text-muted);
    cursor: pointer; font-size: 16px; transition: var(--transition);
}
.room-code-display .copy-btn:hover { color: var(--text-primary); }
