/* ============ 基础 ============ */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  color: #222;
  background: #ededed;
  overflow: hidden;
  user-select: none;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea { font-family: inherit; outline: none; border: none; background: none; color: inherit; }
img { display: block; -webkit-user-drag: none; }

/* ============ 主布局 ============ */
.app {
  display: flex;
  width: 100vw; height: 100vh;
  max-width: 1400px;
  margin: 0 auto;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.08);
  background: #fff;
}

/* ============ 左侧窄边栏 ============ */
.sidebar-nav {
  width: 60px;
  background: #2e2e2e;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 0 16px;
  gap: 20px;
  flex-shrink: 0;
}
.sidebar-nav .self-avatar {
  width: 36px; height: 36px;
  border-radius: 4px;
  background: linear-gradient(135deg, #07c160, #10aeff);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 600; font-size: 14px;
  margin-bottom: 12px;
  cursor: pointer;
  overflow: hidden;
  flex-shrink: 0;
  transition: transform 0.15s;
}
.sidebar-nav .self-avatar:hover { transform: scale(1.05); }
.sidebar-nav .self-avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.sidebar-nav button {
  width: 40px; height: 40px;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  color: #9a9a9a;
  font-size: 20px;
  transition: all 0.15s;
}
.sidebar-nav button:hover { background: #3a3a3a; color: #fff; }
.sidebar-nav button.active { color: #07c160; background: #3a3a3a; }

/* ============ 联系人列表 ============ */
.contact-list {
  width: 280px;
  border-right: 1px solid #e7e7e7;
  background: #f7f7f7;
  display: flex; flex-direction: column;
  flex-shrink: 0;
}
.contact-list .search-bar {
  padding: 10px 12px;
  border-bottom: 1px solid #e7e7e7;
  background: #ededed;
}
.contact-list .search-bar input {
  width: 100%;
  padding: 6px 10px;
  background: #fff;
  border-radius: 4px;
  font-size: 13px;
}
.contact-items { flex: 1; overflow-y: auto; }
.contact-section-title {
  font-size: 11px;
  color: #999;
  padding: 12px 14px 6px;
  letter-spacing: 0.5px;
}
.contact-item {
  display: flex;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  border-bottom: 1px solid #eee;
  gap: 10px;
  transition: background 0.1s;
}
.contact-item:hover { background: #ececec; }
.contact-item.active { background: #d9d9d9; }
.contact-item.unopened { opacity: 0.75; }
.contact-item.unopened:hover { opacity: 1; }
.contact-item .avatar {
  width: 40px; height: 40px;
  border-radius: 4px;
  overflow: hidden;
  background: #ccc;
  flex-shrink: 0;
  position: relative;
}
.contact-item .avatar img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.contact-item .meta { flex: 1; min-width: 0; }
.contact-item .name {
  font-size: 14px; color: #000;
  margin-bottom: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.contact-item .preview {
  font-size: 12px; color: #888;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.contact-item .era {
  font-size: 11px;
  color: #aaa;
}
.contact-item.group .avatar {
  background: linear-gradient(135deg, #07c160, #10aeff);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 20px;
}

/* 未读小红点 */
.unread-dot {
  position: absolute;
  top: -3px; right: -3px;
  width: 10px; height: 10px;
  background: #fa5151;
  border: 2px solid #f7f7f7;
  border-radius: 50%;
}

/* ============ 聊天主区 ============ */
.chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #f5f5f5;
  min-width: 0;
}
.chat-header {
  height: 58px;
  padding: 0 20px;
  border-bottom: 1px solid #e7e7e7;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f7f7f7;
  flex-shrink: 0;
}
.chat-header .title {
  font-size: 16px; color: #000;
  font-weight: 500;
}
.chat-header .subtitle {
  font-size: 12px; color: #888; margin-top: 2px;
}
.chat-header .actions {
  display: flex; gap: 8px;
}
.chat-header .actions button {
  width: 34px; height: 34px;
  border-radius: 4px;
  color: #666;
  font-size: 16px;
  transition: all 0.15s;
}
.chat-header .actions button:hover { background: #e0e0e0; color: #07c160; }
.chat-header .actions button:disabled { opacity: 0.3; cursor: not-allowed; }

/* 消息区 */
.messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #f5f5f5;
  user-select: text;
}
.msg-empty {
  margin: auto;
  text-align: center;
  color: #aaa;
  font-size: 13px;
  line-height: 1.8;
}
.msg-empty h3 { color: #666; font-weight: 500; margin-bottom: 10px; }
.msg-empty kbd {
  background: #fff; padding: 2px 6px; border-radius: 3px;
  border: 1px solid #ddd; font-size: 12px;
}

.msg {
  display: flex;
  gap: 10px;
  max-width: 70%;
}
.msg.self {
  align-self: flex-end;
  flex-direction: row-reverse;
}
.msg .avatar.small.user-self {
  background: linear-gradient(135deg, #07c160, #10aeff);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  overflow: hidden;
}
.msg .avatar.small.user-self img {
  width: 100%; height: 100%; object-fit: cover;
}
.msg .avatar {
  width: 36px; height: 36px;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
  background: #ccc;
  cursor: pointer;
}
.msg .avatar img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.msg .body { display: flex; flex-direction: column; min-width: 0; }
.msg .sender {
  font-size: 11px; color: #999; margin-bottom: 3px;
  padding: 0 4px;
}
.msg.self .sender { text-align: right; display: none; }
.msg .bubble {
  padding: 9px 12px;
  border-radius: 4px;
  background: #fff;
  font-size: 14px;
  line-height: 1.55;
  word-break: break-word;
  position: relative;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.03);
}
.msg.self .bubble {
  background: #95ec69;
}
.msg .bubble::before {
  content: '';
  position: absolute;
  top: 12px;
  left: -6px;
  border: 6px solid transparent;
  border-right-color: #fff;
  border-left: 0;
}
.msg.self .bubble::before {
  left: auto; right: -6px;
  border-right: 0;
  border-left: 6px solid #95ec69;
  border-right-color: transparent;
}
.msg .emotion-tag {
  font-size: 10px;
  color: #bbb;
  margin-top: 3px;
  padding: 0 4px;
}

/* @ 高亮 */
.bubble .mention {
  color: #576b95;
  font-weight: 500;
}
.bubble .mention-user {
  color: #1f6f1f;
  background: rgba(31, 111, 31, 0.08);
  padding: 0 3px;
  border-radius: 2px;
  font-weight: 500;
}

.typing-dots { display: inline-flex; gap: 3px; padding: 2px 0; }
.typing-dots span {
  width: 6px; height: 6px; border-radius: 50%;
  background: #bbb;
  animation: typing 1.2s infinite;
}
.typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.typing-dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-3px); opacity: 1; }
}

/* 输入区 */
.input-area {
  border-top: 1px solid #e7e7e7;
  background: #f7f7f7;
  padding: 8px 16px 14px;
  flex-shrink: 0;
}
.input-toolbar {
  display: flex;
  gap: 14px;
  padding: 4px 0 6px;
  color: #777;
  font-size: 18px;
}
.input-toolbar button { padding: 4px 8px; border-radius: 3px; color: #07c160; font-weight: 600; }
.input-toolbar button:hover { background: #e8f7ef; }
.input-box {
  background: #fff;
  border-radius: 4px;
  padding: 8px 10px;
  min-height: 80px;
  display: flex;
  flex-direction: column;
}
.input-box textarea {
  width: 100%;
  flex: 1;
  resize: none;
  font-size: 14px;
  line-height: 1.5;
  min-height: 60px;
}
.input-box .send-row {
  display: flex;
  justify-content: flex-end;
  padding-top: 4px;
}
.send-btn {
  background: #07c160;
  color: #fff;
  padding: 6px 18px;
  border-radius: 3px;
  font-size: 13px;
  transition: opacity 0.15s;
}
.send-btn:hover { opacity: 0.85; }
.send-btn:disabled {
  background: #e5e5e5;
  color: #999;
  cursor: not-allowed;
}

/* @ 提及弹层 */
.mention-panel {
  position: absolute;
  left: 8px;
  bottom: 100%;
  margin-bottom: 6px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  min-width: 200px;
  max-height: 220px;
  overflow-y: auto;
  z-index: 50;
}
.mention-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 13px;
}
.mention-item:hover,
.mention-item.active {
  background: #f0f0f0;
}
.mention-item img {
  width: 24px; height: 24px;
  border-radius: 3px;
  object-fit: cover;
  flex-shrink: 0;
}

/* ============ 模态框 ============ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  animation: fadein 0.15s;
}
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: #fff;
  border-radius: 6px;
  min-width: 380px;
  max-width: 600px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}
.modal h3 {
  padding: 18px 22px;
  font-size: 15px;
  font-weight: 500;
  border-bottom: 1px solid #eee;
}
.modal-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}
.modal-list label {
  display: flex;
  align-items: center;
  padding: 8px 22px;
  cursor: pointer;
  gap: 10px;
}
.modal-list label:hover { background: #f7f7f7; }
.modal-list input[type=checkbox] {
  appearance: none;
  width: 16px; height: 16px;
  border: 1px solid #ccc;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.modal-list input[type=checkbox]:checked {
  background: #07c160;
  border-color: #07c160;
}
.modal-list input[type=checkbox]:checked::after {
  content: '✓';
  color: #fff;
  font-size: 12px;
}
.modal-list .avatar {
  width: 32px; height: 32px;
  border-radius: 4px;
  overflow: hidden;
  background: #ccc;
  flex-shrink: 0;
}
.modal-list .avatar img { width: 100%; height: 100%; object-fit: cover; }
.modal-list .name { flex: 1; font-size: 14px; }
.modal-list .hint { color: #999; font-size: 12px; }
.modal-footer {
  padding: 14px 22px;
  border-top: 1px solid #eee;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.modal-footer button {
  padding: 6px 18px;
  border-radius: 3px;
  font-size: 13px;
}
.modal-footer .cancel {
  color: #666;
  background: #f0f0f0;
}
.modal-footer .cancel:hover { background: #e5e5e5; }
.modal-footer .confirm {
  background: #07c160;
  color: #fff;
}
.modal-footer .confirm:hover { opacity: 0.9; }
.modal-footer .confirm:disabled {
  background: #c0e8cf;
  cursor: not-allowed;
}

/* 个人资料 */
.profile-edit {
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.profile-avatar-preview {
  width: 100px; height: 100px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, #07c160, #10aeff);
  display: flex;
  align-items: center;
  justify-content: center;
}
.profile-avatar-preview img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.profile-avatar-preview .placeholder {
  font-size: 40px;
  color: #fff;
  font-weight: 500;
}
.profile-actions {
  display: flex;
  gap: 8px;
}
.profile-actions .btn-upload,
.profile-actions .btn-remove-avatar {
  padding: 6px 14px;
  background: #f0f0f0;
  color: #333;
  font-size: 13px;
  border-radius: 3px;
  cursor: pointer;
  border: none;
}
.profile-actions .btn-upload:hover {
  background: #07c160;
  color: #fff;
}
.profile-actions .btn-remove-avatar:hover {
  background: #e74c3c;
  color: #fff;
}
.profile-field {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.profile-field label {
  font-size: 12px;
  color: #888;
}
.profile-field input {
  padding: 8px 10px;
  background: #f7f7f7;
  border-radius: 4px;
  font-size: 14px;
}
.profile-divider {
  width: 100%;
  height: 1px;
  background: #eee;
  margin: 6px 0;
}
.btn-danger {
  padding: 8px 12px;
  background: transparent;
  color: #c0392b;
  font-size: 13px;
  border: 1px solid #c0392b;
  border-radius: 3px;
  width: 100%;
  transition: all 0.15s;
}
.btn-danger:hover {
  background: #c0392b;
  color: #fff;
}

/* ============ 视频通话 ============ */
.video-overlay {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  color: #fff;
  animation: fadein 0.2s;
}
.video-overlay .status-top {
  position: absolute;
  top: 24px; left: 0; right: 0;
  text-align: center;
  z-index: 10;
  pointer-events: none;
}
.video-overlay .master-name {
  font-size: 20px;
  font-weight: 500;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  margin-bottom: 4px;
}
.video-overlay .timer {
  display: inline-block;
  padding: 3px 10px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 12px;
  font-size: 12px;
  color: #ddd;
}

.video-overlay.single .big-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 100px 40px 260px;
  padding-right: 380px;
}
.video-overlay.single .big-stage img {
  max-width: 80%;
  max-height: 80%;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
}
.emo-change { animation: emo 0.4s; }
@keyframes emo {
  0% { transform: scale(0.96); opacity: 0.6; }
  100% { transform: scale(1); opacity: 1; }
}

/* 群视频九宫格 */
.video-overlay.group .big-stage {
  flex: 1;
  display: grid;
  gap: 4px;
  padding: 80px 30px 260px;
  padding-right: 360px;
  align-content: center;
}
.big-stage.grid-2 { grid-template-columns: 1fr 1fr; }
.big-stage.grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.big-stage.grid-4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.big-stage.grid-5, .big-stage.grid-6 { grid-template-columns: 1fr 1fr 1fr; }
.big-stage.grid-7, .big-stage.grid-8 { grid-template-columns: 1fr 1fr 1fr 1fr; }

.video-tile {
  position: relative;
  background: #222;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border-radius: 4px;
  transition: box-shadow 0.3s;
}
.video-tile img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.video-tile .label {
  position: absolute;
  bottom: 8px; left: 8px;
  padding: 2px 8px;
  background: rgba(0, 0, 0, 0.55);
  font-size: 12px;
  border-radius: 3px;
}
.video-tile.speaking {
  box-shadow: inset 0 0 0 3px #07c160, 0 0 15px rgba(7, 193, 96, 0.5);
}
.video-tile.self {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2c3e50, #34495e);
  aspect-ratio: 4 / 3;
}
.video-tile.self video {
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}
.self-placeholder {
  color: #bdc3c7;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  font-size: 13px;
}
.self-icon { font-size: 40px; color: #607d8b; }

/* 1v1 PiP */
.self-pip {
  position: absolute;
  bottom: 200px;
  right: 370px;
  width: 180px;
  height: 135px;
  background: linear-gradient(135deg, #2c3e50, #34495e);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
}
.self-pip video {
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}
.pip-placeholder {
  color: #bdc3c7;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  font-size: 11px;
}
.pip-icon { font-size: 30px; color: #607d8b; }

/* 摄像头按钮 */
.btn-cam-toggle {
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 11px;
  border-radius: 3px;
  margin-top: 4px;
  border: 1px solid rgba(255, 255, 255, 0.25);
}
.btn-cam-toggle:hover { background: rgba(255, 255, 255, 0.25); }
.cam-off-btn {
  position: absolute;
  top: 6px; right: 6px;
  width: 22px; height: 22px;
  background: rgba(231, 76, 60, 0.85);
  color: #fff;
  font-size: 13px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
}
.cam-off-btn:hover { background: #e74c3c; }

/* 视频字幕 */
.video-overlay.single .big-stage::after {
  content: attr(data-caption);
  position: absolute;
  left: 40px; right: 380px;
  bottom: 180px;
  text-align: center;
  color: #fff;
  font-size: 16px;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 6px;
  opacity: 0;
  transition: opacity 0.3s;
}
.video-overlay.single .big-stage.has-caption::after { opacity: 1; }

/* 通话记录侧栏 */
.call-history {
  position: absolute;
  top: 80px;
  right: 30px;
  width: 320px;
  max-height: calc(100vh - 260px);
  background: rgba(20, 20, 20, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  z-index: 6;
  transition: transform 0.25s;
}
.call-history.collapsed {
  transform: translateX(calc(100% - 40px));
  width: 320px;
}
.call-history.collapsed .call-history-list,
.call-history.collapsed .call-history-header span {
  opacity: 0;
  pointer-events: none;
}
.call-history.collapsed .call-history-header {
  justify-content: flex-start;
  padding-left: 10px;
  border-bottom: none;
}
.call-history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #ddd;
  font-size: 13px;
}
.call-history-header .btn-toggle-history {
  color: #ccc;
  font-size: 14px;
  padding: 2px 6px;
  border-radius: 3px;
}
.call-history-header .btn-toggle-history:hover {
  background: rgba(255, 255, 255, 0.1);
}
.call-history-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.call-history-empty {
  color: #888;
  font-size: 12px;
  text-align: center;
  padding: 20px 0;
}
.history-item {
  display: flex;
  gap: 8px;
  max-width: 100%;
}
.history-item.user {
  flex-direction: row-reverse;
}
.history-avatar {
  width: 28px; height: 28px;
  border-radius: 4px;
  overflow: hidden;
  background: #333;
  flex-shrink: 0;
}
.history-avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.history-user-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #07c160, #10aeff);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}
.history-bubble {
  background: rgba(255, 255, 255, 0.1);
  color: #eee;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.5;
  word-break: break-word;
  max-width: 230px;
}
.history-bubble.user {
  background: #07c160;
  color: #fff;
}
.history-bubble .mention {
  color: #a3c1e0;
}
.history-bubble .mention-user {
  color: #a5e8a5;
}
.history-emotion {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  font-size: 10px;
  color: #ddd;
}

/* 视频输入框 + 控制 */
.video-input-panel {
  position: absolute;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  align-items: center;
  background: rgba(0, 0, 0, 0.5);
  padding: 6px 10px 6px 6px;
  border-radius: 28px;
  z-index: 7;
  min-width: 360px;
}
.video-input-panel input {
  flex: 1;
  padding: 8px 12px;
  color: #fff;
  font-size: 14px;
  background: transparent;
}
.video-input-panel input::placeholder { color: #888; }
.video-input-panel .send {
  width: 36px; height: 36px;
  background: #07c160;
  border-radius: 50%;
  color: #fff;
  font-size: 14px;
}
.video-input-panel .send:hover { opacity: 0.9; }
.video-input-panel .send:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-mic {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.btn-mic:hover { background: rgba(255, 255, 255, 0.2); }
.btn-mic.disabled { opacity: 0.4; cursor: not-allowed; }
.btn-mic.recording {
  background: #e74c3c;
  animation: pulse 1s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7); }
  50%      { box-shadow: 0 0 0 8px rgba(231, 76, 60, 0); }
}

.video-controls {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 20px;
}
.video-btn {
  width: 54px; height: 54px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.1s;
}
.video-btn:hover { background: rgba(255, 255, 255, 0.2); transform: scale(1.05); }
.video-btn.disabled { opacity: 0.4; cursor: not-allowed; }
.video-btn.hangup { background: #e74c3c; }
.video-btn.hangup:hover { background: #c0392b; }

/* ============ Toast ============ */
.toast {
  position: fixed;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 18px;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  border-radius: 4px;
  font-size: 13px;
  z-index: 2000;
  animation: toastin 0.25s;
}
@keyframes toastin {
  from { transform: translateX(-50%) translateY(-10px); opacity: 0; }
  to   { transform: translateX(-50%) translateY(0); opacity: 1; }
}

@media (max-width: 900px) {
  .call-history { width: 260px; right: 10px; }
  .video-overlay.single .big-stage,
  .video-overlay.group .big-stage { padding-right: 290px; }
  .self-pip { right: 290px; width: 130px; height: 100px; }
}
