/* ===================== base.css ===================== */
/* 深蓝色科技风格 - 与 Home 统一 */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary: #0066ff;
  --primary-dark: #0052cc;
  --primary-light: #3385ff;
  --bg-dark: #0a0e17;
  --bg-card: #111827;
  --bg-card-hover: #1a2234;
  --text-primary: #e8f0ff;
  --text-secondary: #8b9dc3;
  --border: #1e3a5f;
  --glow: rgba(0, 102, 255, 0.3);
}

body {
  font-family: 'Segoe UI', 'PingFang SC', sans-serif;
  background: var(--bg-dark);
  min-height: 100vh;
  color: var(--text-primary);
  overflow-x: hidden;
}

/* 背景效果 */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(ellipse at 20% 20%, rgba(0, 102, 255, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(0, 200, 255, 0.1) 0%, transparent 50%),
    linear-gradient(180deg, var(--bg-dark) 0%, #0d1420 100%);
  pointer-events: none;
  z-index: 0;
}

/* 网格背景 */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(rgba(0, 102, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 102, 255, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: 0;
}

.container { 
  max-width: 1200px; 
  margin: 0 auto; 
  padding: 20px; 
  min-height: 100vh; 
  position: relative;
  z-index: 1;
}

/* 头部 */
.header {
  background: var(--bg-card);
  padding: 16px 20px;
  border-radius: 10px;
  margin-bottom: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--border);
}
.header h1 { color: var(--text-primary); font-size: 20px; font-weight: 600; }
.header h1 i { color: var(--primary); margin-right: 10px; }
.server-info { font-size: 13px; color: var(--text-secondary); background: rgba(0,0,0,0.3); padding: 6px 12px; border-radius: 6px; border: 1px solid var(--border); }

/* 导航栏 */
.app-nav {
  background: var(--bg-card);
  border-radius: 10px;
  margin-bottom: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  padding: 0 8px;
  overflow-x: auto;
  border: 1px solid var(--border);
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
  var(--text-primary)-space: nowrap;
  text-decoration: none;
}
.nav-item:hover { color: var(--primary); background: var(--bg-card-hover); }
.nav-item.active { color: var(--primary); border-bottom-color: var(--primary); background: rgba(0, 102, 255, 0.1); }
.nav-item i { font-size: 15px; }
.nav-divider { width: 1px; height: 28px; background: var(--border); margin: 0 4px; flex-shrink: 0; }

/* 按钮 */
.btn {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.3); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-primary { background: var(--primary); color: var(--text-primary); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-success { background: #10b981; color: var(--text-primary); }
.btn-success:hover { background: #059669; }
.btn-secondary { background: var(--border); color: var(--text-primary); }
.btn-secondary:hover { background: #2d4a6f; }
.btn-danger { background: #ef4444; color: var(--text-primary); }
.btn-danger:hover { background: #dc2626; }
.btn-info { background: #3b82f6; color: var(--text-primary); }
.btn-info:hover { background: var(--primary); }
.btn-warning { background: #f59e0b; color: var(--text-primary); }
.btn-warning:hover { background: #d97706; }
.btn-sm { padding: 4px 10px; font-size: 12px; }

/* 输入框 */
input[type="text"], input[type="search"] {
  width: 100%; padding: 10px; border: 2px solid var(--border); border-radius: 6px;
  font-size: 14px; transition: border-color 0.2s;
  background: var(--bg-card);
  color: var(--text-primary);
}
input[type="text"]:focus, input[type="search"]:focus { outline: none; border-color: var(--primary); }
input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; accent-color: var(--primary); }
select { padding: 8px 10px; border: 2px solid var(--border); border-radius: 6px; font-size: 14px; background: var(--bg-card); color: var(--text-primary); cursor: pointer; }
select:focus { outline: none; border-color: var(--primary); }

/* 模态框 */
.modal {
  display: none; position: fixed; z-index: 1600; inset: 0;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(5px);
}
.modal-content {
  background: var(--bg-card); margin: 10% auto; border-radius: 10px;
  width: 90%; max-width: 500px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  animation: modalSlideIn 0.3s ease;
  transition: all 0.3s ease;
  border: 1px solid var(--border);
}
.modal-content.fullscreen {
  margin: 0; width: 100%; height: 100%; max-width: none; border-radius: 0;
  display: flex; flex-direction: column;
}
.modal-content.fullscreen .modal-body { flex: 1; overflow-y: auto; display: flex; flex-direction: column; }
@keyframes modalSlideIn {
  from { opacity: 0; transform: translateY(-50px); }
  to   { opacity: 1; transform: translateY(0); }
}
.modal-header {
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
}
.modal-header h3 { color: var(--text-primary); font-weight: 600; }
.modal-controls { display: flex; align-items: center; gap: 10px; }
.modal-body { padding: 20px; }
.modal-footer { padding: 12px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }

.close { color: var(--text-secondary); font-size: 24px; font-weight: bold; cursor: pointer; transition: color 0.2s; line-height: 1; }
.close:hover { color: var(--text-primary); }

.fullscreen-btn {
  background: none; border: none; color: var(--text-secondary); font-size: 18px;
  cursor: pointer; padding: 5px; border-radius: 4px; transition: all 0.2s;
  display: flex; align-items: center; justify-content: center;
}
.fullscreen-btn:hover { color: var(--primary); background: var(--bg-card-hover); }

/* Loading */
.loading {
  position: fixed; inset: 0; background: rgba(10, 14, 23, 0.95);
  display: flex; flex-direction: column; justify-content: center; align-items: center; z-index: 2000;
}
.spinner {
  width: 40px; height: 40px; border: 4px solid var(--border);
  border-top: 4px solid var(--primary); border-radius: 50%; animation: spin 1s linear infinite;
}
.spinner-sm {
  display: inline-block; width: 16px; height: 16px; border: 2px solid var(--border);
  border-top: 2px solid var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.loading p { margin-top: 15px; color: var(--text-primary); font-weight: 500; }

/* 消息提示 */
.message {
  position: fixed; top: 20px; right: 20px;
  padding: 12px 20px; border-radius: 6px; color: var(--text-primary); font-weight: 500;
  z-index: 5000; transform: translateX(400px); transition: transform 0.3s ease;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.message.show { transform: translateX(0); }
.message.success { background: #10b981; border-color: #10b981; }
.message.error { background: #ef4444; border-color: #ef4444; }
.message.info { background: #3b82f6; border-color: #3b82f6; }
.message.warning { background: #f59e0b; border-color: #f59e0b; }

/* 侧边/全屏 Panel */
.side-panel {
  position: fixed; inset: 0; z-index: 1500;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(4px);
  display: none; align-items: stretch; justify-content: flex-end;
}
.side-panel-content {
  background: var(--bg-card); width: min(90vw, 960px); height: 100%;
  display: flex; flex-direction: column; box-shadow: -8px 0 30px rgba(0,0,0,0.5);
  animation: slideInRight 0.3s ease;
  border-left: 1px solid var(--border);
}
@keyframes slideInRight {
  from { transform: translateX(100%); }
  to   { transform: translateX(0); }
}
.side-panel-header {
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center; flex-shrink: 0;
}
.side-panel-header h3 { font-size: 16px; font-weight: 600; color: var(--text-primary); display: flex; align-items: center; gap: 8px; }
.side-panel-body { flex: 1; overflow-y: auto; padding: 20px; }

/* 全拖拽蒙层 */
.drag-overlay {
  position: fixed; inset: 0; z-index: 4000;
  background: rgba(0, 102, 255, 0.85); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.2s ease;
}
.drag-overlay.visible { opacity: 1; pointer-events: auto; }
.drag-overlay-content {
  text-align: center; color: var(--text-primary);
  border: 3px dashed rgba(255,255,255,0.8); border-radius: 20px; padding: 60px 80px;
}
.drag-overlay-content i { font-size: 72px; display: block; margin-bottom: 20px; animation: bounce 0.8s ease infinite alternate; }
.drag-overlay-content p { font-size: 22px; font-weight: 600; }
@keyframes bounce { from { transform: translateY(0); } to { transform: translateY(-12px); } }

/* 上传进度覆盖层 */
.upload-progress-overlay {
  position: fixed; inset: 0; z-index: 4000;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.25s ease;
}
.upload-progress-overlay.visible { opacity: 1; pointer-events: auto; }
.upload-progress-box {
  background: var(--bg-card); border-radius: 16px; padding: 40px 50px;
  text-align: center; min-width: 320px; box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  border: 1px solid var(--border);
}
.upload-progress-box i { font-size: 48px; color: var(--primary); display: block; margin-bottom: 16px; }
.upload-progress-box p { color: var(--text-primary); font-size: 16px; margin-bottom: 20px; font-weight: 500; }
.overlay-progress-bar { width: 100%; height: 10px; background: var(--border); border-radius: 5px; overflow: hidden; margin-bottom: 10px; }
.overlay-progress-fill { height: 100%; background: linear-gradient(90deg, #10b981, var(--primary)); border-radius: 5px; transition: width 0.3s ease; width: 0%; }
#overlayProgressText { font-size: 18px; font-weight: 600; color: var(--primary); }

/* 响应式 */
@media (max-width: 768px) {
  .container { padding: 10px; }
  .modal-content { margin: 5% auto; width: 95%; }
  .side-panel-content { width: 100%; }
}
