/* ========== 顶部用户区 + 视频上传按钮 ========== */
.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.topbar-user {
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  font-size: 0.85rem;
  transition: all 0.2s;
}
.topbar-user:hover {
  background: rgba(255,255,255,0.2);
}
.topbar-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg,#C9A227,#FDD835);
  color: #0D3A14;
  font-weight: 700;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.topbar-user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
  min-width: 180px;
  overflow: hidden;
  display: none;
  z-index: 9999;
}
.topbar-user-dropdown.show { display: block; }
.dropdown-header {
  padding: 12px 16px;
  border-bottom: 1px solid #eee;
  color: #222;
  font-size: 0.9rem;
}
.dropdown-header strong { display: block; font-size: 1rem; margin-bottom: 2px; }
.dropdown-header span { color: #666; font-size: 0.8rem; }
.dropdown-item {
  display: block;
  padding: 12px 16px;
  color: #333;
  text-decoration: none;
  font-size: 0.9rem;
  transition: background 0.15s;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}
.dropdown-item:hover { background: #f5f7f4; color: #1B5E20; }
.dropdown-item.danger { color: #E53935; }
.dropdown-divider { height: 1px; background: #eee; }

/* 视频上传按钮 */
.topbar-upload-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: 20px;
  background: linear-gradient(135deg,#C9A227,#FDD835);
  color: #0D3A14;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}
.topbar-upload-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(201,162,39,0.4);
}

/* 移动端用户入口 */
.mobile-user-section {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 8px;
}

/* ========== 模态窗口通用 ========== */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  z-index: 99999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.show { display: flex; }
.modal-box {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  position: relative;
  animation: modalIn 0.25s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.92) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 0;
}
.modal-header h3 {
  font-family: 'Noto Serif SC', serif;
  font-size: 1.3rem;
  color: #1B5E20;
}
.modal-close {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: #f0f0f0;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.modal-close:hover { background: #e0e0e0; }
.modal-tabs {
  display: flex;
  border-bottom: 2px solid #e8f5e9;
  margin: 16px 24px 0;
}
.modal-tab {
  flex: 1;
  padding: 10px;
  text-align: center;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  color: #888;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}
.modal-tab.active { color: #1B5E20; border-bottom-color: #1B5E20; }
.modal-body { padding: 20px 24px 24px; }

/* ========== 表单 ========== */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #444;
  margin-bottom: 6px;
}
.form-control {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #ddd;
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: 'Noto Sans SC', sans-serif;
  background: #fafafa;
  color: #222;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
.form-control:focus {
  outline: none;
  border-color: #1B5E20;
  background: #fff;
}
.form-error {
  color: #E53935;
  font-size: 0.8rem;
  margin-top: 4px;
  display: none;
}
.form-error.show { display: block; }

/* ========== 按钮 ========== */
.btn-primary {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg,#1B5E20,#2E7D32);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Noto Sans SC', sans-serif;
  transition: all 0.2s;
}
.btn-primary:hover { background: linear-gradient(135deg,#2E7D32,#388E3C); transform: translateY(-1px); }
.btn-gold {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg,#C9A227,#FDD835);
  color: #0D3A14;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Noto Sans SC', sans-serif;
  transition: all 0.2s;
}
.btn-gold:hover { background: linear-gradient(135deg,#FDD835,#FFEB3B); transform: translateY(-1px); }
.btn-outline {
  width: 100%;
  padding: 12px;
  background: #fff;
  color: #1B5E20;
  border: 1.5px solid #1B5E20;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Noto Sans SC', sans-serif;
  transition: all 0.2s;
}
.btn-outline:hover { background: #E8F5E9; }

.btn-sm { padding: 8px 16px; font-size: 0.85rem; border-radius: 8px; }
.btn-xs { padding: 5px 12px; font-size: 0.8rem; border-radius: 6px; }

/* ========== 视频上传 ========== */
.video-upload-area {
  border: 2px dashed #c8e6c9;
  border-radius: 12px;
  padding: 32px;
  text-align: center;
  background: #fafdf7;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 16px;
}
.video-upload-area:hover, .video-upload-area.drag-over {
  border-color: #1B5E20;
  background: #f1f8e9;
}
.video-upload-icon { font-size: 2.5rem; margin-bottom: 12px; }
.video-upload-text { font-size: 0.9rem; color: #666; line-height: 1.6; }
.video-upload-text strong { color: #1B5E20; }
.video-upload-hint { font-size: 0.78rem; color: #999; margin-top: 8px; }

/* 视频预览 */
.video-preview {
  background: #f5f5f5;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 16px;
  display: none;
  align-items: flex-start;
  gap: 12px;
}
.video-preview.show { display: flex; }
.video-thumb {
  width: 80px;
  height: 60px;
  background: #1B5E20;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.5rem;
  flex-shrink: 0;
}
.video-info { flex: 1; min-width: 0; }
.video-name { font-size: 0.88rem; font-weight: 600; color: #333; margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.video-size { font-size: 0.78rem; color: #999; }
.video-remove {
  background: none;
  border: none;
  color: #E53935;
  cursor: pointer;
  font-size: 1.2rem;
  padding: 4px;
  flex-shrink: 0;
}

/* 视频列表 */
.video-list { max-height: 400px; overflow-y: auto; }
.video-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.15s;
}
.video-item:last-child { border-bottom: none; }
.video-item:hover { background: #fafdf7; }
.video-item-thumb {
  width: 64px;
  height: 48px;
  background: linear-gradient(135deg,#1B5E20,#2E7D32);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.video-item-info { flex: 1; min-width: 0; }
.video-item-title { font-size: 0.88rem; font-weight: 600; color: #333; margin-bottom: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.video-item-meta { font-size: 0.78rem; color: #999; }
.video-item-actions { display: flex; gap: 6px; flex-shrink: 0; }
.video-empty {
  text-align: center;
  padding: 48px 20px;
  color: #999;
  font-size: 0.9rem;
}
.video-empty-icon { font-size: 3rem; margin-bottom: 12px; }

/* ========== 进度条 ========== */
.upload-progress {
  background: #f0f0f0;
  border-radius: 10px;
  height: 8px;
  overflow: hidden;
  margin-bottom: 16px;
  display: none;
}
.upload-progress.show { display: block; }
.upload-progress-bar {
  height: 100%;
  background: linear-gradient(90deg,#1B5E20,#43A047);
  border-radius: 10px;
  width: 0%;
  transition: width 0.3s;
}

/* ========== 视频详情弹窗 ========== */
.video-detail-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.85);
  z-index: 999999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.video-detail-overlay.show { display: flex; }
.video-detail-box {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 600px;
  overflow: hidden;
  animation: modalIn 0.25s ease;
}
.video-detail-player {
  background: #000;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 3rem;
  position: relative;
}
.video-detail-body { padding: 20px; }
.video-detail-title { font-size: 1.1rem; font-weight: 700; color: #1B5E20; margin-bottom: 8px; }
.video-detail-meta { font-size: 0.82rem; color: #999; margin-bottom: 16px; }
.video-detail-desc { font-size: 0.9rem; color: #555; line-height: 1.7; background: #f9f9f9; padding: 12px; border-radius: 8px; }

/* ========== 提示消息 ========== */
.toast-msg {
  position: fixed;
  top: 70px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: #1B5E20;
  color: #fff;
  padding: 12px 24px;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 600;
  z-index: 999999;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  white-space: nowrap;
}
.toast-msg.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast-msg.error { background: #E53935; }
.toast-msg.gold { background: linear-gradient(135deg,#C9A227,#FDD835); color: #0D3A14; }

/* ========== 视频管理页面样式 ========== */
.page-video-section { padding: 40px 24px; max-width: 900px; margin: 0 auto; }
.video-manage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 24px;
}
.video-manage-card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  transition: all 0.3s;
}
.video-manage-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.12); }
.video-manage-thumb {
  height: 160px;
  background: linear-gradient(135deg,#1B5E20,#2E7D32);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: #fff;
  position: relative;
}
.video-manage-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0,0,0,0.5);
  color: #fff;
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 10px;
}
.video-manage-body { padding: 16px; }
.video-manage-title { font-size: 0.95rem; font-weight: 700; color: #333; margin-bottom: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.video-manage-meta { font-size: 0.78rem; color: #999; margin-bottom: 12px; }
.video-manage-actions { display: flex; gap: 8px; }

/* ========== 移动端响应式 ========== */
@media (max-width: 768px) {
  .modal-box { max-width: 100%; border-radius: 16px 16px 0 0; position: fixed; bottom: 0; left: 0; right: 0; max-height: 85vh; }
  .modal-overlay { align-items: flex-end; }
}
