/* 
 * kerkerker-config-manager 样式
 * 现代化暗色主题，专业级 UI 设计
 */

:root {
  /* 颜色系统 */
  --bg-primary: #0a0f1a;
  --bg-secondary: #111827;
  --bg-tertiary: #1f2937;
  --bg-elevated: #252f3f;
  --bg-hover: #374151;

  --text-primary: #f9fafb;
  --text-secondary: #d1d5db;
  --text-muted: #9ca3af;
  --text-disabled: #6b7280;

  --border-color: #374151;
  --border-light: #4b5563;

  --accent-primary: #6366f1;
  --accent-primary-hover: #4f46e5;
  --accent-primary-light: rgba(99, 102, 241, 0.1);

  --accent-success: #10b981;
  --accent-success-hover: #059669;
  --accent-success-light: rgba(16, 185, 129, 0.1);

  --accent-warning: #f59e0b;
  --accent-warning-light: rgba(245, 158, 11, 0.1);

  --accent-danger: #ef4444;
  --accent-danger-hover: #dc2626;
  --accent-danger-light: rgba(239, 68, 68, 0.1);

  --accent-info: #3b82f6;
  --accent-info-light: rgba(59, 130, 246, 0.1);

  /* 渐变 */
  --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --gradient-success: linear-gradient(135deg, #10b981 0%, #34d399 100%);
  --gradient-dark: linear-gradient(180deg, #111827 0%, #0a0f1a 100%);

  /* 阴影 */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4),
    0 2px 4px -1px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5),
    0 4px 6px -2px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5),
    0 10px 10px -5px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);

  /* 圆角 */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  /* 动画 */
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow: 350ms ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  background: var(--gradient-dark);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 头部 */
.header {
  background: rgba(17, 24, 39, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--gradient-primary);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-glow);
}

.logo-icon svg {
  width: 24px;
  height: 24px;
  stroke: white;
}

.logo h1 {
  font-size: 1.35rem;
  font-weight: 700;
  background: linear-gradient(135deg, #f9fafb 0%, #d1d5db 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-badge {
  background: var(--gradient-primary);
  color: white;
  font-size: 0.7rem;
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: var(--shadow-sm);
}

/* 主容器 */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}

/* 标签页 */
.tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  background: var(--bg-secondary);
  padding: 0.5rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
}

.tab-btn {
  flex: 1;
  padding: 0.875rem 1.5rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-normal);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  position: relative;
}

.tab-btn svg {
  width: 20px;
  height: 20px;
}

.tab-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.tab-btn.active {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-md), var(--shadow-glow);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
  animation: slideUp 0.4s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 编辑器区域 */
.editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.editor-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.editor-header h2::before {
  content: "";
  width: 4px;
  height: 1.5rem;
  background: var(--gradient-primary);
  border-radius: 2px;
}

.header-actions {
  display: flex;
  gap: 0.75rem;
}

/* 按钮系统 */
.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-normal);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
}

.btn svg,
.btn i {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn-sm svg,
.btn-sm i {
  width: 16px;
  height: 16px;
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.1) 0%,
    transparent 100%
  );
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.btn:hover::before {
  opacity: 1;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  box-shadow: var(--shadow-md), var(--shadow-glow);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--bg-hover);
  border-color: var(--border-light);
}

.btn-success {
  background: var(--gradient-success);
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-success:hover {
  box-shadow: var(--shadow-md), 0 0 20px rgba(16, 185, 129, 0.3);
  transform: translateY(-1px);
}

.btn-danger {
  background: var(--accent-danger);
  color: white;
}

.btn-danger:hover {
  background: var(--accent-danger-hover);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.btn-icon svg {
  width: 18px;
  height: 18px;
}

.btn-icon:hover {
  background: var(--bg-hover);
  color: var(--accent-primary);
  transform: scale(1.05);
}

.btn-icon.danger:hover {
  background: var(--accent-danger-light);
  color: var(--accent-danger);
}

/* 卡片式源列表 */
.source-list {
  display: grid;
  gap: 1rem;
}

.source-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.source-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.source-item:hover {
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-md);
  transform: translateX(4px);
}

.source-item:hover::before {
  opacity: 1;
}

.source-item.disabled {
  opacity: 0.5;
}

.source-info {
  flex: 1;
  min-width: 0;
}

.source-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.source-header h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.priority-badge {
  background: var(--accent-info-light);
  color: var(--accent-info);
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  font-family: "Monaco", "Menlo", monospace;
  font-weight: 600;
}

.key-badge {
  background: var(--bg-tertiary);
  color: var(--text-muted);
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  font-family: monospace;
}

.status-badge {
  font-size: 0.7rem;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.status-badge.inactive {
  background: var(--accent-danger-light);
  color: var(--accent-danger);
}

.source-details {
  margin-top: 0.5rem;
}

.source-details p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
  word-break: break-all;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.source-details .label {
  color: var(--text-disabled);
  flex-shrink: 0;
  min-width: 3rem;
}

.source-details .warning {
  color: var(--accent-warning);
  margin-left: 0.5rem;
}

.source-actions {
  display: flex;
  gap: 0.25rem;
  margin-left: 1rem;
  flex-shrink: 0;
}

/* 头像 */
.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-weight: 700;
  font-size: 1.2rem;
  color: white;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.username {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--bg-secondary);
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-xl);
  color: var(--text-muted);
}

.empty-state .empty-icon,
.empty-state > svg {
  width: 64px;
  height: 64px;
  stroke: var(--text-disabled);
  margin-bottom: 1.5rem;
  opacity: 0.6;
}

.empty-state p:first-of-type {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.empty-state .hint {
  font-size: 0.9rem;
  color: var(--text-disabled);
}

/* 模态框 */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.modal.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 650px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  transform: scale(0.9) translateY(20px);
  transition: transform var(--transition-normal);
}

.modal.active .modal-content {
  transform: scale(1) translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
}

.modal-close {
  width: 36px;
  height: 36px;
  border: none;
  background: var(--bg-tertiary);
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background: var(--accent-danger-light);
  color: var(--accent-danger);
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border-color);
  background: var(--bg-tertiary);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

/* 表单 */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

.form-group .required {
  color: var(--accent-danger);
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="password"],
.form-group textarea,
.form-group select {
  padding: 0.75rem 1rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-primary-light);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-disabled);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  user-select: none;
  padding: 0.5rem 0;
}

.checkbox-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--accent-primary);
  cursor: pointer;
}

/* 导出面板 */
.export-panel {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-md);
}

.export-section {
  margin-bottom: 2rem;
}

.export-section:last-child {
  margin-bottom: 0;
}

.export-section h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-primary);
}

.export-section h3 svg {
  width: 22px;
  height: 22px;
  stroke: var(--accent-primary);
}

.password-input-wrapper {
  position: relative;
}

.password-input-wrapper input {
  width: 100%;
  padding: 0.875rem 1rem;
  font-size: 1rem;
}

.password-strength {
  margin-top: 0.75rem;
}

.strength-bar-wrapper {
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.strength-bar {
  height: 100%;
  width: 0;
  transition: all var(--transition-normal);
  border-radius: 3px;
}

.strength-text {
  font-size: 0.8rem;
  font-weight: 600;
}

.export-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.export-actions .btn {
  flex: 1;
  min-width: 180px;
}

.config-preview {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  font-family: "Monaco", "Menlo", "Fira Code", monospace;
  font-size: 0.8rem;
  max-height: 200px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
  color: var(--text-muted);
  line-height: 1.5;
}

/* 加密输出 */
#encrypted-output {
  display: none;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  animation: slideUp 0.4s ease;
}

#encrypted-output.active {
  display: block;
}

.output-section {
  margin-bottom: 1.5rem;
}

.output-section:last-child {
  margin-bottom: 0;
}

.output-section h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.encrypted-text {
  width: 100%;
  height: 120px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  font-family: monospace;
  font-size: 0.8rem;
  color: var(--text-secondary);
  resize: vertical;
  transition: border-color var(--transition-fast);
}

.encrypted-text:focus {
  outline: none;
  border-color: var(--accent-primary);
}

.url-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-family: monospace;
}

.hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0.5rem 0;
  line-height: 1.5;
}

.hint-small {
  font-size: 0.8rem;
  color: var(--text-disabled);
  margin: 0.25rem 0 0.75rem 0;
}

/* 订阅 URL 选项 */
.url-option {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1rem;
  transition: all var(--transition-fast);
}

.url-option:hover {
  border-color: var(--border-light);
}

.url-option:last-child {
  margin-bottom: 0;
}

.url-option > label {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  display: block;
  margin-bottom: 0.25rem;
}

.url-row {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.url-row .url-input {
  flex: 1;
}

.url-row .btn {
  flex-shrink: 0;
}

/* Toast 通知 */
#toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 2000;
}

.toast {
  padding: 1rem 1.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0;
  transform: translateX(100%);
  transition: all var(--transition-normal);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.toast.show {
  opacity: 1;
  transform: translateX(0);
}

.toast.success {
  border-color: var(--accent-success);
  background: var(--accent-success-light);
}

.toast.success::before {
  content: "✓";
  color: var(--accent-success);
  font-weight: bold;
}

.toast.error {
  border-color: var(--accent-danger);
  background: var(--accent-danger-light);
}

.toast.error::before {
  content: "✕";
  color: var(--accent-danger);
  font-weight: bold;
}

.toast.info {
  border-color: var(--accent-info);
  background: var(--accent-info-light);
}

.toast.info::before {
  content: "ℹ";
  color: var(--accent-info);
  font-weight: bold;
}

/* GitHub 设置 */
.github-section {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  background: var(--bg-tertiary);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.github-settings-toggle {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.github-status {
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.github-status.connected {
  color: var(--accent-success);
}

.github-status.connected::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--accent-success);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.github-status.disconnected {
  color: var(--text-muted);
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.github-settings-form {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  animation: slideUp 0.3s ease;
}

.github-settings-form .form-grid {
  margin-bottom: 1.25rem;
}

.github-settings-form .hint-small a {
  color: var(--accent-primary);
  text-decoration: none;
}

.github-settings-form .hint-small a:hover {
  text-decoration: underline;
}

.github-settings-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* GitHub 按钮 */
.btn-github {
  background: linear-gradient(135deg, #24292f 0%, #0d1117 100%);
  color: white;
  border: 1px solid #30363d;
  box-shadow: var(--shadow-sm);
}

.btn-github:hover:not(:disabled) {
  background: linear-gradient(135deg, #30363d 0%, #161b22 100%);
  border-color: #484f58;
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-github:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-github i,
.btn-github svg {
  width: 18px;
  height: 18px;
}

/* 滚动条 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border-light);
}

/* 选择高亮 */
::selection {
  background: var(--accent-primary);
  color: white;
}

/* 响应式 */
@media (max-width: 768px) {
  .container {
    padding: 1rem;
  }

  .header {
    padding: 1rem;
  }

  .logo h1 {
    font-size: 1.1rem;
  }

  .tabs {
    flex-direction: column;
    border-radius: var(--radius-lg);
  }

  .tab-btn {
    border-radius: var(--radius-md);
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .editor-header {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }

  .header-actions {
    justify-content: stretch;
  }

  .header-actions .btn {
    flex: 1;
    justify-content: center;
  }

  .source-item {
    flex-direction: column;
  }

  .source-actions {
    margin-left: 0;
    margin-top: 1rem;
    justify-content: flex-end;
  }

  .export-actions {
    flex-direction: column;
  }

  .export-actions .btn {
    width: 100%;
  }

  .url-row {
    flex-direction: column;
  }

  .export-panel {
    padding: 1.5rem;
  }

  .modal-content {
    margin: 0.5rem;
    max-height: calc(100vh - 1rem);
  }
}

/* 打印样式 */
@media print {
  .header,
  .tabs,
  .btn,
  .modal {
    display: none !important;
  }
}

/* 认证界面样式 */
.auth-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.auth-overlay.hidden {
  display: none;
}

.auth-modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 3rem;
  max-width: 480px;
  width: 100%;
  box-shadow: var(--shadow-xl);
  text-align: center;
}

.auth-logo {
  margin-bottom: 2rem;
}

.auth-logo .logo-icon {
  margin: 0 auto 1rem;
  width: 64px;
  height: 64px;
}

.auth-logo .logo-icon svg {
  width: 36px;
  height: 36px;
}

.auth-logo h2 {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #f9fafb 0%, #d1d5db 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-hint {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.auth-input-wrapper {
  display: flex;
  gap: 0.75rem;
}

.auth-input-wrapper input {
  flex: 1;
  padding: 0.875rem 1rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 1rem;
  transition: all var(--transition-fast);
}

.auth-input-wrapper input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-primary-light);
}

.auth-input-wrapper input::placeholder {
  color: var(--text-disabled);
}

.auth-error {
  color: var(--accent-danger);
  font-size: 0.85rem;
  margin-top: 1rem;
  min-height: 1.25rem;
}

@media (max-width: 480px) {
  .auth-modal {
    padding: 2rem 1.5rem;
  }

  .auth-input-wrapper {
    flex-direction: column;
  }

  .auth-input-wrapper .btn {
    width: 100%;
  }
}
