 
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: #eee;
  min-height: 100vh;
}
.container { max-width: 1200px; margin: 0 auto; padding-bottom: 80px; }
h1 { text-align: center; margin-bottom: 30px; color: #00d4ff; }

.tabs {
  height: 73px;
  display: flex; gap: 10px;
  align-items: center;
  justify-content: center; flex-wrap: nowrap;
  position: fixed; bottom: 0px; left: 0; right: 0; z-index: 100;
  background: rgb(252 252 252 / 95%);
  backdrop-filter: blur(8px);
  padding:  0;
  border-radius: 12px 12px 0 0;
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-bottom: 10px;
}
.tab {
  height: 40px;
  padding: 12px 12px; background: #2a2a4a; border: none;
  color: #aaa; cursor: pointer; border-radius: 8px;
  transition: all 0.3s; white-space: nowrap;
}
.tab:hover { background: #3a3a6a; color: #fff; }
.tab.active { background: #00d4ff; color: #1a1a2e; }

.panel { display: none; background: #2a2a4a; border-radius: 12px; padding: 6px; }
.panel.active { display: block; }

.section { margin-bottom: 20px; }
.section h3 { margin-bottom: 10px; color: #00d4ff; }

input, textarea, select {
  width: 100%; padding: 12px; margin-bottom: 10px;
  background: #1a1a2e; border: 1px solid #3a3a6a;
  color: #fff; border-radius: 8px;
}
input:focus, textarea:focus { outline: none; border-color: #00d4ff; }

button {
  padding: 12px 24px; background: #00d4ff; color: #1a1a2e;
  border: none; border-radius: 8px; cursor: pointer;
  font-weight: bold; transition: all 0.3s;
}
button:hover { background: #00a8cc; }
button:disabled { background: #555; cursor: not-allowed; }
button.secondary { background: #4a4a7a; color: #fff; }
button.secondary:hover { background: #5a5a9a; }
button.danger { background: #ff4444; color: #fff; }
button.danger:hover { background: #cc3333; }
button.watch { background: #00c853; color: #fff; }
button.watch:hover { background: #00a844; }

.progress {
  height: 8px; background: #1a1a2e; border-radius: 4px;
  overflow: hidden; margin: 10px 0;
}
.progress-bar {
  height: 100%; background: linear-gradient(90deg, #00d4ff, #00ff88);
  transition: width 0.3s;
}

.status {
  padding: 10px; border-radius: 8px; margin: 10px 0;
  background: #1a1a2e;
}
.status.success { border-left: 4px solid #00ff88; }
.status.error { border-left: 4px solid #ff4444; }
.status.info { border-left: 4px solid #00d4ff; }

/* 文件列表 */
.file-list { list-style: none; }
.file-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; margin-bottom: 8px;
  background: #1a1a2e; border-radius: 8px;
  transition: background 0.2s;
}
.file-item:hover { background: #252545; }
.file-info { flex: 1; min-width: 0; }
.file-name {
  font-weight: bold; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.file-meta { color: #888; font-size: 13px; margin-top: 2px; }
.file-actions { display: flex; gap: 8px; flex-shrink: 0; margin-left: 12px; }
.file-actions button { padding: 6px 14px; font-size: 13px; }

.empty-hint { text-align: center; color: #666; padding: 40px; }

/* 密钥管理 */
.key-status {
  display: flex; align-items: center; gap: 10px;
  padding: 16px; background: #1a1a2e; border-radius: 8px;
  margin-bottom: 16px;
}
.key-dot {
  width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0;
}
.key-dot.active { background: #00ff88; }
.key-dot.inactive { background: #ff4444; }
.key-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.key-actions button { flex: 1; min-width: 140px; }
.key-display {
  padding: 12px; background: #1a1a2e; border-radius: 8px;
  font-family: monospace; font-size: 13px; word-break: break-all;
  color: #888; max-height: 120px; overflow-y: auto; margin-top: 10px;
}
textarea.key-paste {
  min-height: 80px; font-family: monospace; font-size: 13px;
}
.warn-box {
  padding: 12px; background: rgba(255,68,68,0.1); border: 1px solid #ff4444;
  border-radius: 8px; margin: 12px 0; color: #ff8888; font-size: 14px;
}

.video-container {
  position: sticky; top: 0; background: #000; border-radius: 12px;
  overflow: hidden; aspect-ratio: 16/9;
  z-index: 90;
}
video { width: 100%; height: 100%; }
.video-controls {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 10px; background: linear-gradient(transparent, rgba(0,0,0,0.8));
}

.chat {
  height: 300px; overflow-y: auto; background: #1a1a2e;
  border-radius: 8px; padding: 10px; margin: 10px 0;
}
.chat-message {
  margin-bottom: 8px; padding: 8px; background: #2a2a4a;
  border-radius: 8px;
}
.chat-message .user { color: #00d4ff; font-weight: bold; }
.chat-message .time { color: #888; font-size: 12px; float: right; }

.user-list {
  display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0;
}
.user-badge {
  padding: 4px 12px; background: #3a3a6a; border-radius: 20px;
  font-size: 14px;
}

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
.sync-indicator {
  display: inline-block; width: 10px; height: 10px;
  background: #00ff88; border-radius: 50%; margin-right: 8px;
  animation: pulse 2s infinite;
}
.sync-indicator.offline { background: #ff4444; animation: none; }

/* 语音通话 */
.chat-input-area {
  display: flex;
  gap: 8px;
}
.chat-input-area input { flex: 1; margin-bottom: 0; }
.chat-input-area button { padding: 10px 18px; }
.btn-mic {
  width: 44px; min-width: 44px; height: 44px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; background: #4a4a7a;
}
.btn-mic:hover { background: #5a5a9a; }
.btn-mic.mic-active {
  background: #00c853;
  animation: mic-pulse 1.5s infinite;
}
@keyframes mic-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0,200,83,0.4); }
  50% { box-shadow: 0 0 0 8px rgba(0,200,83,0); }
}
.user-badge.mic-on { border: 1px solid #00c853; }

/* mic loading */
.btn-mic:disabled { cursor: not-allowed; opacity: 0.7; }
.btn-mic.loading::after {
  content: '';
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* toast */
#toastContainer {
  position: fixed; top: 20px; left: 50%;
  transform: translateX(-50%); z-index: 9999;
  display: flex; flex-direction: column; gap: 8px;
  pointer-events: none;
}
.toast {
  background: #fff;
  color: #000; padding: 10px 20px; border-radius: 8px;
  font-size: 14px; box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  border: 1px solid rgba(0,0,0,0.1);
  opacity: 0; transform: translateY(-10px);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: auto; white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateY(0); }
 