/* ============ 全局 ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, 'Microsoft YaHei', sans-serif; font-size: 14px; color: #1f2329; background: #f5f6f7; height: 100vh; overflow: hidden; }

/* ============ 登录页 ============ */
.login-page { display: flex; align-items: center; justify-content: center; height: 100vh; background: linear-gradient(135deg, #3370ff 0%, #4e83fd 100%); }
.login-card { background: #fff; border-radius: 12px; padding: 40px; width: 360px; text-align: center; box-shadow: 0 8px 30px rgba(0,0,0,0.12); }
.login-logo { width: 56px; height: 56px; background: #3370ff; color: #fff; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-size: 22px; font-weight: bold; margin-bottom: 12px; }
.login-card h2 { font-size: 20px; margin-bottom: 4px; }
.login-subtitle { color: #8f959e; font-size: 13px; margin-bottom: 20px; }
.login-tabs { display: flex; margin-bottom: 20px; border-bottom: 1px solid #dee0e3; }
.tab-btn { flex: 1; padding: 8px; border: none; background: none; cursor: pointer; font-size: 14px; color: #8f959e; border-bottom: 2px solid transparent; transition: all 0.2s; }
.tab-btn.active { color: #3370ff; border-bottom-color: #3370ff; }
.login-card input { width: 100%; padding: 10px 12px; border: 1px solid #dee0e3; border-radius: 6px; margin-bottom: 12px; font-size: 14px; outline: none; transition: border-color 0.2s; }
.login-card input:focus { border-color: #3370ff; }
.btn-primary { padding: 10px; background: #3370ff; color: #fff; border: none; border-radius: 6px; cursor: pointer; font-size: 14px; transition: background 0.2s; }
.btn-primary:hover { background: #2860e0; }
.error-msg { color: #f54a45; font-size: 12px; margin-top: 8px; min-height: 18px; }

/* ============ 主布局 ============ */
#app { display: flex; height: 100vh; }

/* ============ 左侧导航 ============ */
.sidebar { width: 64px; background: #1f2329; display: flex; flex-direction: column; align-items: center; padding: 12px 0; flex-shrink: 0; }
.sidebar-header { display: flex; flex-direction: column; align-items: center; margin-bottom: 24px; cursor: pointer; }
.avatar-small { width: 36px; height: 36px; background: #3370ff; color: #fff; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: bold; overflow: hidden; }
.avatar-small img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.avatar-online { position: relative; }
.avatar-online::after { content: ''; position: absolute; bottom: 0; right: 0; width: 10px; height: 10px; background: #34c759; border-radius: 50%; border: 2px solid #1f2329; }
.my-name { color: #fff; font-size: 10px; margin-top: 4px; max-width: 56px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-nav { flex: 1; display: flex; flex-direction: column; gap: 4px; width: 100%; }
.nav-item { display: flex; flex-direction: column; align-items: center; padding: 8px 0; cursor: pointer; color: #8f959e; font-size: 10px; transition: all 0.2s; position: relative; }
.nav-item:hover { color: #c9cdd4; background: rgba(255,255,255,0.05); }
.nav-item.active { color: #fff; background: rgba(51,112,255,0.15); }
.nav-item.active::before { content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 3px; height: 20px; background: #3370ff; border-radius: 0 2px 2px 0; }
.nav-icon { font-size: 20px; margin-bottom: 2px; }
.nav-badge { background: #f54a45; color: #fff; border-radius: 8px; font-size: 10px; padding: 1px 5px; margin-top: 2px; min-width: 16px; }
.sidebar-footer { margin-top: auto; }
.btn-text { background: none; border: none; color: #8f959e; cursor: pointer; font-size: 12px; padding: 8px; }
.btn-text:hover { color: #fff; }

/* ============ 聊天视图 ============ */
.main-content { flex: 1; display: flex; }
.room-list { width: 220px; background: #fff; border-right: 1px solid #dee0e3; display: flex; flex-direction: column; overflow-y: auto; }
.room-list-header { padding: 16px; font-size: 15px; font-weight: 600; border-bottom: 1px solid #dee0e3; display: flex; justify-content: space-between; align-items: center; }
.room-section-title { padding: 8px 16px; font-size: 11px; color: #8f959e; text-transform: uppercase; display: flex; justify-content: space-between; align-items: center; }
.room-item { padding: 10px 16px; cursor: pointer; display: flex; align-items: center; gap: 8px; transition: background 0.15s; position: relative; user-select: none; }
.room-item:hover { background: #f5f6f7; }
.room-item.active { background: #e8f0ff; color: #3370ff; }
.room-item .room-icon { font-size: 16px; flex-shrink: 0; }
.room-item .room-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room-item .room-unread { background: #f54a45; color: #fff; border-radius: 10px; font-size: 11px; padding: 1px 6px; min-width: 18px; text-align: center; }
.btn-icon-sm { background: none; border: none; cursor: pointer; font-size: 16px; color: #8f959e; padding: 2px 6px; border-radius: 4px; }
.btn-icon-sm:hover { background: #f5f6f7; color: #3370ff; }

.chat-area { flex: 1; display: flex; flex-direction: column; background: #f5f6f7; min-width: 0; position: relative; }
.chat-header { padding: 14px 20px; background: #fff; border-bottom: 1px solid #dee0e3; display: flex; align-items: center; gap: 8px; }
.chat-header .room-id-hint { color: #8f959e; font-size: 12px; margin-left: 8px; }
.online-badge { color: #8f959e; font-size: 12px; margin-left: auto; }
.messages { flex: 1; overflow-y: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 4px; }
.msg-item { display: flex; gap: 10px; max-width: 70%; position: relative; }
.msg-item.self { align-self: flex-end; flex-direction: row-reverse; }
.msg-avatar { width: 32px; height: 32px; background: #3370ff; color: #fff; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 12px; flex-shrink: 0; overflow: hidden; }
.msg-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }
.msg-body { display: flex; flex-direction: column; }
.msg-name { font-size: 12px; color: #8f959e; margin-bottom: 2px; }
.msg-bubble { background: #fff; padding: 8px 12px; border-radius: 8px; line-height: 1.5; word-break: break-all; box-shadow: 0 1px 2px rgba(0,0,0,0.04); cursor: default; }
.msg-item.self .msg-bubble { background: #3370ff; color: #fff; }
.msg-time { font-size: 11px; color: #c0c4cc; margin-top: 2px; }
.msg-edited { font-size: 11px; color: #c0c4cc; margin-left: 4px; }
.msg-deleted { color: #8f959e; font-style: italic; font-size: 13px; padding: 8px 12px; }
.msg-file { display: flex; align-items: center; gap: 8px; padding: 8px; background: #f5f6f7; border-radius: 6px; cursor: pointer; }
.msg-file:hover { background: #e8e8e8; }
.msg-file-icon { font-size: 24px; }
.msg-file-info { font-size: 12px; }
.msg-file-size { color: #8f959e; }
.msg-image { max-width: 300px; max-height: 200px; border-radius: 8px; cursor: pointer; transition: transform 0.15s; }
.msg-image:hover { transform: scale(1.02); }
.msg-reply-ref { font-size: 12px; color: #8f959e; padding: 2px 8px; border-left: 3px solid #3370ff; margin-bottom: 4px; cursor: pointer; background: #f0f5ff; border-radius: 0 4px 4px 0; }
.msg-item.self .msg-reply-ref { background: rgba(255,255,255,0.15); border-left-color: rgba(255,255,255,0.5); }
.msg-mention { color: #3370ff; font-weight: 500; cursor: pointer; }
.msg-actions { position: absolute; top: -8px; right: -4px; display: none; gap: 2px; background: #fff; border-radius: 4px; box-shadow: 0 2px 8px rgba(0,0,0,0.12); padding: 2px; z-index: 10; }
.msg-item:hover .msg-actions { display: flex; }
.msg-item.self .msg-actions { right: auto; left: -4px; }
.msg-action-btn { background: none; border: none; cursor: pointer; font-size: 12px; padding: 4px 6px; border-radius: 3px; color: #8f959e; white-space: nowrap; }
.msg-action-btn:hover { background: #f5f6f7; color: #3370ff; }
.msg-action-btn.danger:hover { color: #f54a45; }
.typing-indicator { font-size: 12px; color: #8f959e; padding: 4px 20px; font-style: italic; min-height: 20px; }

/* 消息编辑 */
.msg-edit-input { width: 100%; padding: 6px 8px; border: 1px solid #3370ff; border-radius: 4px; font-size: 14px; font-family: inherit; outline: none; background: #fff; color: #1f2329; resize: none; }

/* 回复栏 */
.reply-bar { padding: 8px 20px; background: #f0f5ff; border-top: 1px solid #dee0e3; display: flex; align-items: center; gap: 8px; font-size: 13px; }
.reply-bar-text { flex: 1; color: #3370ff; }

/* @提及弹窗 */
.mention-popup { position: absolute; bottom: 70px; left: 80px; background: #fff; border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,0.15); max-height: 200px; overflow-y: auto; z-index: 100; min-width: 200px; }
.mention-item { padding: 8px 12px; cursor: pointer; display: flex; align-items: center; gap: 8px; }
.mention-item:hover, .mention-item.selected { background: #f0f5ff; }

.chat-input-area { padding: 12px 20px; background: #fff; border-top: 1px solid #dee0e3; display: flex; align-items: center; gap: 8px; }
.btn-icon { background: none; border: none; font-size: 20px; cursor: pointer; padding: 4px; border-radius: 4px; }
.btn-icon:hover { background: #f5f6f7; }
.msg-input-wrap { flex: 1; display: flex; gap: 8px; }
#msg-input { flex: 1; padding: 8px 12px; border: 1px solid #dee0e3; border-radius: 6px; font-size: 14px; outline: none; }
#msg-input:focus { border-color: #3370ff; }
.btn-send { width: auto; padding: 8px 20px; }

/* ============ 文件拖拽 ============ */
.chat-area.drag-over::after { content: '释放文件发送'; position: absolute; inset: 0; background: rgba(51,112,255,0.08); border: 3px dashed #3370ff; border-radius: 8px; z-index: 50; display: flex; align-items: center; justify-content: center; font-size: 18px; color: #3370ff; font-weight: 500; pointer-events: none; }

/* ============ 图片预览增强 ============ */
.img-preview-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.9); z-index: 1000; display: flex; align-items: center; justify-content: center; user-select: none; }
.img-preview-content { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.img-preview-content img { max-width: 90vw; max-height: 90vh; object-fit: contain; border-radius: 4px; transition: transform 0.15s ease; cursor: grab; }
.img-preview-content img:active { cursor: grabbing; }
.img-preview-close { position: absolute; top: 16px; right: 16px; background: rgba(0,0,0,0.5); border: none; color: #fff; font-size: 24px; cursor: pointer; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; z-index: 10; }
.img-preview-close:hover { background: rgba(0,0,0,0.8); }
.img-preview-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,0.5); border: none; color: #fff; font-size: 28px; cursor: pointer; width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; z-index: 10; }
.img-preview-nav:hover { background: rgba(0,0,0,0.8); }
.img-preview-prev { left: 16px; }
.img-preview-next { right: 16px; }
.img-preview-counter { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,0.7); font-size: 13px; z-index: 10; }

/* ============ 头像设置弹窗 ============ */
.avatar-modal { position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 500; display: flex; align-items: center; justify-content: center; }
.avatar-modal-card { background: #fff; border-radius: 12px; padding: 24px; width: 340px; text-align: center; }
.avatar-modal-card h3 { font-size: 16px; margin-bottom: 16px; }
.avatar-preview { width: 80px; height: 80px; border-radius: 16px; margin: 0 auto 16px; overflow: hidden; background: #3370ff; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 32px; font-weight: bold; }
.avatar-preview img { width: 100%; height: 100%; object-fit: cover; }
.avatar-modal-card .btn-primary { width: 100%; margin-top: 12px; }
.avatar-modal-card .btn-text { display: block; margin-top: 8px; color: #8f959e; }
.avatar-modal-card input[type="file"] { display: none; }

/* ============ 房间右键菜单 ============ */
.context-menu { position: fixed; background: #fff; border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,0.15); padding: 4px 0; z-index: 200; min-width: 140px; }
.context-menu-item { padding: 8px 16px; cursor: pointer; font-size: 13px; display: flex; align-items: center; gap: 8px; transition: background 0.15s; }
.context-menu-item:hover { background: #f0f5ff; color: #3370ff; }
.context-menu-item.danger:hover { background: #fff0f0; color: #f54a45; }
.context-menu-divider { height: 1px; background: #dee0e3; margin: 4px 0; }

/* ============ 通知面板 ============ */
.notification-panel { position: fixed; top: 0; right: -360px; width: 360px; height: 100vh; background: #fff; box-shadow: -4px 0 16px rgba(0,0,0,0.1); z-index: 300; transition: right 0.3s ease; display: flex; flex-direction: column; }
.notification-panel.open { right: 0; }
.notification-panel-header { padding: 16px 20px; border-bottom: 1px solid #dee0e3; display: flex; align-items: center; justify-content: space-between; font-size: 16px; font-weight: 600; }
.notification-panel-body { flex: 1; overflow-y: auto; }
.notification-item { padding: 12px 20px; border-bottom: 1px solid #f5f6f7; cursor: pointer; transition: background 0.15s; }
.notification-item:hover { background: #f5f6f7; }
.notification-item .notif-from { font-weight: 500; font-size: 13px; }
.notification-item .notif-content { font-size: 13px; color: #8f959e; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notification-item .notif-time { font-size: 11px; color: #c0c4cc; margin-top: 4px; }
.notification-item.unread { background: #f0f5ff; }
.nav-notification-btn { position: relative; }
.nav-notification-dot { position: absolute; top: 4px; right: 12px; width: 8px; height: 8px; background: #f54a45; border-radius: 50%; }

/* ============ 新建房间弹窗增强 ============ */
.create-room-modal { position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 500; display: flex; align-items: center; justify-content: center; }
.create-room-card { background: #fff; border-radius: 12px; padding: 24px; width: 400px; }
.create-room-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 16px; }
.create-room-card input, .create-room-card textarea { width: 100%; padding: 10px 12px; border: 1px solid #dee0e3; border-radius: 6px; font-size: 14px; outline: none; margin-bottom: 12px; font-family: inherit; resize: vertical; }
.create-room-card input:focus, .create-room-card textarea:focus { border-color: #3370ff; }
.create-room-card textarea { min-height: 60px; }
.create-room-card .btn-row { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.create-room-card .btn-cancel { padding: 8px 16px; background: #f5f6f7; border: none; border-radius: 6px; cursor: pointer; font-size: 14px; color: #1f2329; }
.create-room-card .btn-cancel:hover { background: #e8e8e8; }

/* ============ 文件视图 ============ */
.files-sidebar { width: 200px; background: #fff; border-right: 1px solid #dee0e3; display: flex; flex-direction: column; }
.folder-list-header { padding: 16px; font-size: 15px; font-weight: 600; border-bottom: 1px solid #dee0e3; }
.folder-item { padding: 10px 16px; cursor: pointer; display: flex; align-items: center; gap: 6px; transition: background 0.15s; }
.folder-item:hover { background: #f5f6f7; }
.folder-item.active { background: #e8f0ff; color: #3370ff; }
.add-folder { padding: 12px 16px; text-align: left; color: #8f959e; }
.files-area { flex: 1; display: flex; flex-direction: column; }
.files-header { padding: 14px 20px; background: #fff; border-bottom: 1px solid #dee0e3; display: flex; align-items: center; gap: 12px; }
.files-header .btn-primary { width: auto; padding: 6px 16px; font-size: 13px; }
.file-list { flex: 1; overflow-y: auto; padding: 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.file-card { background: #fff; border-radius: 8px; padding: 16px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); cursor: pointer; transition: box-shadow 0.2s; position: relative; }
.file-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.file-card-icon { font-size: 36px; margin-bottom: 8px; }
.file-card-name { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-card-meta { font-size: 11px; color: #8f959e; margin-top: 4px; }
.file-card-del { position: absolute; top: 8px; right: 8px; background: none; border: none; color: #c0c4cc; cursor: pointer; font-size: 14px; }
.file-card-del:hover { color: #f54a45; }
.empty-hint { color: #8f959e; text-align: center; padding: 40px; grid-column: 1/-1; }

/* ============ 成员视图 ============ */
.members-area { flex: 1; padding: 20px; }
.members-header { font-size: 18px; font-weight: 600; margin-bottom: 16px; display: flex; align-items: center; gap: 12px; }
#member-list { display: flex; flex-wrap: wrap; gap: 12px; }
.member-card { background: #fff; border-radius: 8px; padding: 16px; width: 200px; display: flex; align-items: center; gap: 10px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); cursor: pointer; transition: box-shadow 0.2s; }
.member-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.member-card .avatar-small { width: 40px; height: 40px; font-size: 16px; }
.member-card .avatar-wrap { position: relative; }
.member-card .avatar-wrap .status-dot { position: absolute; bottom: 0; right: 0; width: 10px; height: 10px; border-radius: 50%; border: 2px solid #fff; }
.status-dot.online { background: #34c759; }
.status-dot.away { background: #ff9500; }
.status-dot.offline { background: #c0c4cc; }
.member-info { font-size: 13px; }
.member-role { font-size: 11px; color: #8f959e; }

/* ============ 弹窗 ============ */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 500; display: flex; align-items: center; justify-content: center; }
.modal-card { background: #fff; border-radius: 12px; padding: 24px; width: 400px; max-height: 60vh; display: flex; flex-direction: column; }
.modal-header { font-size: 16px; font-weight: 600; margin-bottom: 16px; }
.modal-body { flex: 1; overflow-y: auto; }

/* ============ 通知提示 ============ */
.toast-container { position: fixed; top: 20px; right: 20px; z-index: 2000; display: flex; flex-direction: column; gap: 8px; }
.toast { background: #fff; border-radius: 8px; padding: 12px 16px; box-shadow: 0 4px 16px rgba(0,0,0,0.15); font-size: 13px; animation: slideIn 0.3s ease; max-width: 320px; border-left: 3px solid #3370ff; }
.toast.mention { border-left-color: #ff9500; }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ============ 滚动条 ============ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #dee0e3; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #c0c4cc; }

/* ============ 手机端适配 ============ */
@media (max-width: 768px) {
  /* 侧边栏变底部Tab栏 */
  .sidebar {
    width: 100%; height: 56px; flex-direction: row; padding: 0 8px; order: 2;
    justify-content: space-around; align-items: center;
  }
  .sidebar-header { flex-direction: row; margin-bottom: 0; gap: 0; }
  .my-name { display: none; }
  .sidebar-nav { flex-direction: row; gap: 0; width: auto; }
  .nav-item { flex-direction: column; padding: 6px 12px; font-size: 10px; }
  .nav-item.active::before { display: none; }
  .nav-badge { position: absolute; top: 2px; right: 4px; font-size: 9px; padding: 0 4px; }
  .sidebar-footer { margin-top: 0; }

  #app { flex-direction: column; }

  /* 房间列表折叠 */
  .room-list { width: 100%; max-height: 40vh; border-right: none; border-bottom: 1px solid #dee0e3; }
  .room-list.collapsed { max-height: 0; overflow: hidden; border-bottom: none; }
  .room-list-toggle { display: flex; }

  /* 聊天区域全屏 */
  .chat-area { flex: 1; min-height: 0; }
  .msg-item { max-width: 85%; }
  .chat-header { padding: 10px 12px; }

  /* 聊天输入区适配 */
  .chat-input-area { padding: 8px 12px; }
  .btn-icon { font-size: 18px; }
  #msg-input { font-size: 16px; padding: 8px 10px; }
  .btn-send { padding: 8px 14px; }

  /* 消息间距 */
  .messages { padding: 12px; }

  /* 文件视图 */
  .files-sidebar { width: 100%; max-height: 120px; border-right: none; border-bottom: 1px solid #dee0e3; }
  .file-list { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }

  /* 成员视图 */
  .member-card { width: 100%; }

  /* 图片预览 */
  .img-preview-nav { width: 36px; height: 36px; font-size: 20px; }
  .img-preview-prev { left: 8px; }
  .img-preview-next { right: 8px; }

  /* 通知面板 */
  .notification-panel { width: 100%; right: -100%; }

  /* @提及弹窗 */
  .mention-popup { left: 12px; right: 12px; bottom: 60px; min-width: unset; }
}

/* 桌面端隐藏手机特有元素 */
.room-list-toggle { display: none; padding: 8px 16px; background: #fff; border-bottom: 1px solid #dee0e3; cursor: pointer; font-size: 13px; color: #8f959e; align-items: center; justify-content: center; gap: 4px; }

/* ============ 表情选择器 ============ */
.emoji-picker { position: absolute; bottom: 70px; left: 60px; background: #fff; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,0.15); padding: 12px; z-index: 200; width: 340px; max-height: 260px; overflow-y: auto; }
.emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; }
.emoji-item { font-size: 22px; padding: 6px; cursor: pointer; border-radius: 6px; text-align: center; transition: background 0.15s; }
.emoji-item:hover { background: #f0f5ff; }

/* ============ 语音消息 ============ */
.msg-audio { display: flex; align-items: center; gap: 8px; background: #fff; padding: 8px 12px; border-radius: 8px; }
.msg-item.self .msg-audio { background: #2b5fce; }
.msg-audio-icon { font-size: 20px; }
.msg-audio audio { height: 32px; max-width: 200px; }
.msg-audio-dur { font-size: 12px; color: #8f959e; }

/* 录音指示器 */
.recording-indicator { display: flex; align-items: center; gap: 8px; background: #fff3f3; border-radius: 6px; padding: 4px 10px; font-size: 13px; color: #f54a45; }
.rec-dot { width: 8px; height: 8px; background: #f54a45; border-radius: 50%; animation: rec-blink 1s infinite; }
@keyframes rec-blink { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }
.btn-icon.recording { color: #f54a45; animation: rec-pulse 1s infinite; }
@keyframes rec-pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.15); } }

/* 文件卡片重命名按钮 */
.file-card-rename { position: absolute; top: 4px; right: 28px; background: none; border: none; cursor: pointer; font-size: 14px; opacity: 0; transition: opacity 0.2s; padding: 2px 4px; }
.file-card:hover .file-card-rename { opacity: 0.6; }
.file-card-rename:hover { opacity: 1 !important; }
.rename-input { width: 100%; border: 1px solid #3370ff; border-radius: 4px; padding: 2px 6px; font-size: 13px; outline: none; }
