/* ============================================
   Product Nav — Apple Design Language
   iOS 26 Crystal Glassmorphism
   ============================================ */

/* --- CSS Variables (Design Tokens) --- */
:root {
  /* Apple-inspired light palette */
  --bg-primary: #f5f5f7;
  --bg-secondary: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.72);
  --bg-card-hover: rgba(255, 255, 255, 0.88);

  /* Glass — thinner, more transparent */
  --glass-bg: rgba(255, 255, 255, 0.65);
  --glass-bg-hover: rgba(255, 255, 255, 0.80);
  --glass-bg-active: rgba(255, 255, 255, 0.90);
  --glass-border: rgba(255, 255, 255, 0.50);
  --glass-border-hover: rgba(255, 255, 255, 0.70);
  --glass-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  --glass-shadow-hover: 0 8px 40px rgba(0, 0, 0, 0.10);

  /* Dark glass (for dark backgrounds) */
  --glass-bg-dark: rgba(255, 255, 255, 0.12);
  --glass-bg-dark-hover: rgba(255, 255, 255, 0.18);
  --glass-border-dark: rgba(255, 255, 255, 0.08);
  --glass-border-dark-hover: rgba(255, 255, 255, 0.15);
  --glass-shadow-dark: 0 4px 24px rgba(0, 0, 0, 0.15);
  --glass-shadow-dark-hover: 0 8px 40px rgba(0, 0, 0, 0.20);

  /* Apple blue accent */
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --accent-active: #006edb;
  --accent-light: #e8f0fe;
  --accent-text: #0071e3;

  /* Text */
  --text-primary: #1d1d1f;
  --text-secondary: #6e6e73;
  --text-tertiary: #aeaeb2;
  --text-inverse: #ffffff;

  /* Sizing */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text',
    'Helvetica Neue', 'Inter', sans-serif;

  /* Transitions */
  --transition-fast: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.47059;
  overflow-x: hidden;
}

/* --- Background Image --- */
body.has-bg-image {
  background: var(--bg-image) no-repeat center center fixed;
  background-size: cover;
}

/* --- Glass Effect States --- */
body.no-glass .glass,
body.no-glass .glass-card,
body.no-glass .glass-btn,
body.no-glass .glass-input,
body.no-glass .search-bar,
body.no-glass .category-tab,
body.no-glass .product-card-inner,
body.no-glass .login-card,
body.no-glass .admin-sidebar,
body.no-glass .admin-table,
body.no-glass .code-editor,
body.no-glass .toast,
body.no-glass .modal {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background: var(--bg-card) !important;
}

/* --- Glass Base --- */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(40px) saturate(1.4);
  -webkit-backdrop-filter: blur(40px) saturate(1.4);
  border: 0.5px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
  transition: all var(--transition-base);
}

.glass:hover {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-hover);
  box-shadow: var(--glass-shadow-hover);
}

/* Dark glass (for use on dark/custom backgrounds) */
.glass-dark {
  background: var(--glass-bg-dark);
  backdrop-filter: blur(40px) saturate(1.4);
  -webkit-backdrop-filter: blur(40px) saturate(1.4);
  border: 0.5px solid var(--glass-border-dark);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow-dark);
  transition: all var(--transition-base);
  color: #fff;
}

.glass-dark:hover {
  background: var(--glass-bg-dark-hover);
  border-color: var(--glass-border-dark-hover);
  box-shadow: var(--glass-shadow-dark-hover);
}

.glass-dark .text-secondary {
  color: rgba(255, 255, 255, 0.65);
}

/* --- Glass Card --- */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(40px) saturate(1.4);
  -webkit-backdrop-filter: blur(40px) saturate(1.4);
  border: 0.5px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: all var(--transition-base);
  cursor: pointer;
}

.glass-card:hover {
  transform: translateY(-2px);
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-hover);
  box-shadow: var(--glass-shadow-hover);
}

/* --- Glass Button --- */
.glass-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  background: var(--glass-bg);
  backdrop-filter: blur(40px) saturate(1.4);
  -webkit-backdrop-filter: blur(40px) saturate(1.4);
  border: 0.5px solid var(--glass-border);
  border-radius: var(--radius-md);
  color: var(--accent-text);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  user-select: none;
  white-space: nowrap;
}

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

.glass-btn:active {
  transform: scale(0.97);
  background: var(--glass-bg-active);
}

.glass-btn-primary {
  background: var(--accent);
  border: none;
  color: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.glass-btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 2px 8px rgba(0, 113, 227, 0.3);
}

.glass-btn-primary:active {
  background: var(--accent-active);
}

.glass-btn-danger {
  color: #ff3b30;
  border-color: rgba(255, 59, 48, 0.2);
}

.glass-btn-danger:hover {
  background: rgba(255, 59, 48, 0.08);
  border-color: rgba(255, 59, 48, 0.3);
}

.glass-btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
}

/* --- Glass Input --- */
.glass-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border: 0.5px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  transition: all var(--transition-base);
  outline: none;
}

.glass-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15);
  background: #fff;
}

.glass-input::placeholder {
  color: var(--text-tertiary);
}

.glass-textarea {
  resize: vertical;
  min-height: 80px;
}

/* --- Layout --- */
.container {
  max-width: 1024px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- Header (Apple-style) --- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0.75rem 0;
  background: rgba(255, 255, 255, 0.80);
  backdrop-filter: blur(60px) saturate(1.8);
  -webkit-backdrop-filter: blur(60px) saturate(1.8);
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1024px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.header-logo .logo-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  color: #fff;
}

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

/* --- Hero Section (Apple-style) --- */
.hero {
  position: relative;
  z-index: 1;
  padding: 5rem 0 3rem;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  background: var(--accent-light);
  border-radius: 100px;
  font-size: 0.75rem;
  color: var(--accent-text);
  font-weight: 500;
  margin-bottom: 1.25rem;
  letter-spacing: 0.01em;
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.hero p {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 2rem;
  line-height: 1.5;
}

/* --- Preheat 按钮（Header 内，跳转 GitHub 求 Star） --- */
.preheat-badge .icon-svg {
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.preheat-badge:hover .icon-svg {
  color: var(--accent-text);
}

.preheat-badge .preheat-count {
  display: inline-flex;
  align-items: center;
  padding: 0.08rem 0.45rem;
  border-radius: 100px;
  background: linear-gradient(145deg, rgba(245, 166, 35, 0.20), rgba(245, 166, 35, 0.10));
  border: 0.5px solid rgba(245, 166, 35, 0.35);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.6);
  color: #c2410c;
  font-size: 0.6875rem;
  font-weight: 650;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* --- Search Bar --- */
.search-section {
  position: relative;
  z-index: 1;
  padding: 0 0 2rem;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 600px;
  margin: 0 auto;
  padding: 0.375rem 0.375rem 0.375rem 1.25rem;
  background: var(--glass-bg);
  backdrop-filter: blur(40px) saturate(1.4);
  -webkit-backdrop-filter: blur(40px) saturate(1.4);
  border: 0.5px solid var(--glass-border);
  border-radius: 100px;
  transition: all var(--transition-base);
  box-shadow: var(--glass-shadow);
}

.search-bar:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.12), var(--glass-shadow);
}

.search-bar .search-icon {
  color: var(--text-tertiary);
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.search-bar input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  padding: 0.5rem 0;
}

.search-bar input::placeholder {
  color: var(--text-tertiary);
}

/* --- Category Tabs --- */
.category-tabs {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 0.5rem;
  padding: 0 0 2rem;
  flex-wrap: wrap;
  justify-content: center;
}

.category-tab {
  padding: 0.375rem 1rem;
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border: 0.5px solid var(--glass-border);
  border-radius: 100px;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-weight: 500;
}

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

.category-tab.active {
  background: var(--accent);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 1px 3px rgba(0, 113, 227, 0.2);
}

/* --- Product Grid --- */
.products-section {
  position: relative;
  z-index: 1;
  padding: 0 0 4rem;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.product-card {
  position: relative;
  overflow: hidden;
  animation: cardFadeIn 0.4s ease-out backwards;
}

.product-card:nth-child(1) { animation-delay: 0.03s; }
.product-card:nth-child(2) { animation-delay: 0.06s; }
.product-card:nth-child(3) { animation-delay: 0.09s; }
.product-card:nth-child(4) { animation-delay: 0.12s; }
.product-card:nth-child(5) { animation-delay: 0.15s; }
.product-card:nth-child(6) { animation-delay: 0.18s; }
.product-card:nth-child(7) { animation-delay: 0.21s; }
.product-card:nth-child(8) { animation-delay: 0.24s; }
.product-card:nth-child(9) { animation-delay: 0.27s; }
.product-card:nth-child(10) { animation-delay: 0.30s; }
.product-card:nth-child(11) { animation-delay: 0.33s; }
.product-card:nth-child(12) { animation-delay: 0.36s; }

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

.product-card-inner {
  padding: 1.5rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--glass-bg);
  backdrop-filter: blur(40px) saturate(1.4);
  -webkit-backdrop-filter: blur(40px) saturate(1.4);
  border: 0.5px solid var(--glass-border);
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
  cursor: pointer;
  position: relative;
}

.product-card-inner:hover {
  transform: translateY(-2px);
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-hover);
  box-shadow: var(--glass-shadow-hover);
}

.product-card .product-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.375rem;
  margin-bottom: 0.875rem;
  background: rgba(0, 113, 227, 0.06);
  border: 0.5px solid rgba(0, 113, 227, 0.1);
}

.product-card .product-title {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 0.375rem;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.product-card .product-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
  flex: 1;
  margin-bottom: 0.75rem;
}

.product-card .product-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.product-card .product-tag {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  background: rgba(0, 113, 227, 0.06);
  border: 0.5px solid rgba(0, 113, 227, 0.12);
  border-radius: 100px;
  font-size: 0.6875rem;
  color: var(--accent-text);
  font-weight: 500;
}

.product-card .product-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8125rem;
  color: var(--accent-text);
  text-decoration: none;
  margin-top: 0.5rem;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.product-card .product-link:hover {
  color: var(--accent-hover);
}

/* --- Empty State --- */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  grid-column: 1 / -1;
}

.empty-state .empty-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  opacity: 0.4;
}

.empty-state h3 {
  font-size: 1.125rem;
  margin-bottom: 0.375rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.empty-state p {
  color: var(--text-tertiary);
  font-size: 0.875rem;
}

/* --- Footer --- */
.footer {
  position: relative;
  z-index: 1;
  padding: 1.5rem 0;
  border-top: 0.5px solid rgba(0, 0, 0, 0.06);
  text-align: center;
  color: var(--text-tertiary);
  font-size: 0.75rem;
}

/* --- Toast (Apple-style notification) --- */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  z-index: 9999;
  padding: 0.75rem 1.5rem;
  background: var(--glass-bg);
  backdrop-filter: blur(60px) saturate(2);
  -webkit-backdrop-filter: blur(60px) saturate(2);
  border: 0.5px solid var(--glass-border);
  border-radius: 100px;
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
  opacity: 0;
  transition: all var(--transition-base);
  pointer-events: none;
  white-space: nowrap;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast.toast-success { border-color: rgba(52, 199, 89, 0.3); }
.toast.toast-error { border-color: rgba(255, 59, 48, 0.3); color: #ff3b30; }

/* --- Modal (Apple-style sheet) --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  width: 100%;
  max-width: 480px;
  max-height: 80vh;
  overflow-y: auto;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(60px) saturate(2);
  -webkit-backdrop-filter: blur(60px) saturate(2);
  border: 0.5px solid var(--glass-border);
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.15);
  transform: scale(0.95) translateY(10px);
  transition: transform var(--transition-base);
}

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

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.modal-header h2 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.modal-close {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.04);
  border: none;
  border-radius: 50%;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 1rem;
}

.modal-close:hover {
  background: rgba(0, 0, 0, 0.08);
  color: var(--text-primary);
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal-body .form-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.modal-body .form-group label {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 0.5px solid rgba(0, 0, 0, 0.06);
}

/* --- Toggle Switch (Apple-style) --- */
.toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  user-select: none;
}

.toggle input {
  display: none;
}

.toggle .toggle-track {
  width: 44px;
  height: 26px;
  background: rgba(0, 0, 0, 0.12);
  border-radius: 13px;
  transition: all var(--transition-fast);
  position: relative;
}

.toggle .toggle-track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 22px;
  height: 22px;
  background: #fff;
  border-radius: 50%;
  transition: all var(--transition-fast);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.toggle input:checked + .toggle-track {
  background: var(--accent);
}

.toggle input:checked + .toggle-track::after {
  transform: translateX(18px);
}

.toggle .toggle-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* --- Admin Login (Apple-style) --- */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.login-card {
  width: 100%;
  max-width: 380px;
  padding: 2.5rem;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(60px) saturate(1.8);
  -webkit-backdrop-filter: blur(60px) saturate(1.8);
  border: 0.5px solid var(--glass-border);
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.08);
}

.login-card .login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-card .login-header .lock-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.375rem;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 113, 227, 0.2);
}

.login-card .login-header h1 {
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.login-card .login-header p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.login-card .form-group {
  margin-bottom: 1.25rem;
}

.login-card .form-group label {
  display: block;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: 0.375rem;
  font-weight: 500;
}

.login-card .form-actions {
  margin-top: 1.5rem;
}

.login-card .form-actions .glass-btn {
  width: 100%;
  padding: 0.75rem;
  font-size: 0.9375rem;
}

.login-error {
  text-align: center;
  color: #ff3b30;
  font-size: 0.8125rem;
  margin-top: 0.75rem;
  min-height: 1.5rem;
}

/* --- Admin Dashboard --- */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(60px) saturate(2);
  -webkit-backdrop-filter: blur(60px) saturate(2);
  border-right: 0.5px solid rgba(0, 0, 0, 0.06);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}

.admin-sidebar .sidebar-logo {
  font-size: 1rem;
  font-weight: 600;
  padding-bottom: 1.25rem;
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.06);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: -0.01em;
}

.admin-sidebar .nav-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.625rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  transition: all var(--transition-fast);
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: var(--font-sans);
  font-weight: 500;
}

.admin-sidebar .nav-item:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--text-primary);
}

.admin-sidebar .nav-item.active {
  background: var(--accent-light);
  color: var(--accent-text);
}

.admin-sidebar .sidebar-footer {
  margin-top: auto;
  padding-top: 1.25rem;
  border-top: 0.5px solid rgba(0, 0, 0, 0.06);
}

.admin-main {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;
}

.admin-main .page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.admin-main .page-header h1 {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* --- Admin Products Table --- */
.admin-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.admin-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.06);
}

.admin-table td {
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.04);
  vertical-align: middle;
}

.admin-table tr:hover td {
  background: rgba(0, 0, 0, 0.02);
}

.admin-table .actions {
  display: flex;
  gap: 0.375rem;
}

/* --- Code Editor --- */
.code-editor {
  width: 100%;
  min-height: 280px;
  font-family: 'SF Mono', 'SFMono-Regular', ui-monospace, 'Fira Code', monospace;
  font-size: 0.8125rem;
  line-height: 1.6;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.03);
  border: 0.5px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  resize: vertical;
  outline: none;
  tab-size: 2;
}

.code-editor:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.12);
  background: #fff;
}

.code-tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 0.75rem;
}

.code-tab {
  padding: 0.375rem 0.875rem;
  background: rgba(0, 0, 0, 0.03);
  border: 0.5px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  color: var(--text-tertiary);
  font-size: 0.8125rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font-sans);
  font-weight: 500;
}

.code-tab.active {
  background: #fff;
  color: var(--text-primary);
  border-bottom-color: #fff;
}

/* --- Background Settings (Apple-style) --- */
.bg-preview-area {
  width: 100%;
  height: 160px;
  border-radius: var(--radius-md);
  border: 0.5px solid rgba(0, 0, 0, 0.06);
  overflow: hidden;
  position: relative;
  background: var(--bg-primary);
  transition: all var(--transition-base);
}

.bg-preview-area.has-image {
  background: var(--bg-image-preview) no-repeat center center;
  background-size: cover;
}

.bg-preview-area .bg-preview-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  color: var(--text-tertiary);
}

.bg-preview-area.has-image .bg-preview-overlay {
  background: rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  color: rgba(255, 255, 255, 0.7);
}

.bg-preview-area.has-image .bg-preview-label {
  display: none;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.04);
}

.setting-row:last-child {
  border-bottom: none;
}

.setting-row .setting-info h4 {
  font-size: 0.9375rem;
  font-weight: 500;
  margin-bottom: 0.125rem;
}

.setting-row .setting-info p {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .admin-sidebar {
    display: none;
  }

  .admin-main {
    padding: 1rem;
  }

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

  .hero {
    padding: 3rem 0 2rem;
  }

  .header-actions .glass-btn span {
    display: none;
  }
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.2);
}

/* --- Icon SVG inline helper --- */
.icon-svg {
  width: 1em;
  height: 1em;
  display: inline-block;
  vertical-align: middle;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ============================================================
   iOS 26 Liquid Glass — Crystal Glassmorphism
   水晶玻璃质感：色彩环境光 + 高饱和磨砂 + 渐变水晶描边 + 高光
   ============================================================ */

/* --- Liquid Glass Tokens (override) --- */
:root {
  --glass-bg: linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.36));
  --glass-bg-hover: linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.50));
  --glass-bg-active: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.62));
  --glass-border: rgba(255, 255, 255, 0.55);
  --glass-border-hover: rgba(255, 255, 255, 0.85);
  --glass-shadow: 0 1px 1px rgba(0, 0, 0, 0.03), 0 8px 28px rgba(31, 45, 61, 0.08);
  --glass-shadow-hover: 0 1px 1px rgba(0, 0, 0, 0.04), 0 18px 48px rgba(31, 45, 61, 0.13);
  --glass-blur: blur(32px) saturate(185%);
  --glass-bg-dark: linear-gradient(145deg, rgba(255, 255, 255, 0.20), rgba(255, 255, 255, 0.08));
  --glass-bg-dark-hover: linear-gradient(145deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.12));
  --glass-shadow-dark: 0 1px 1px rgba(255, 255, 255, 0.06), 0 8px 28px rgba(0, 0, 0, 0.28);
  --glass-shadow-dark-hover: 0 1px 1px rgba(255, 255, 255, 0.08), 0 18px 48px rgba(0, 0, 0, 0.36);
}

/* --- Ambient crystal backdrop (彩色环境光，供磨砂玻璃折射) --- */
body::before {
  content: '';
  position: fixed;
  inset: -5%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(640px 640px at 10% 6%, rgba(99, 102, 241, 0.20), transparent 62%),
    radial-gradient(760px 760px at 90% 10%, rgba(34, 211, 238, 0.18), transparent 62%),
    radial-gradient(840px 840px at 72% 92%, rgba(244, 114, 182, 0.16), transparent 62%),
    radial-gradient(640px 640px at 18% 90%, rgba(129, 140, 248, 0.14), transparent 62%);
  filter: saturate(1.1);
  animation: ambientDrift 36s ease-in-out infinite alternate;
}

@keyframes ambientDrift {
  from { transform: scale(1) translate3d(0, 0, 0); }
  to   { transform: scale(1.06) translate3d(1%, -1%, 0); }
}

body.has-bg-image::before { opacity: 0; }
body.no-glass::before { opacity: 0.1; }

/* --- Core glass surfaces: 渐变底 + 高饱和磨砂 + 内高光 --- */
.glass,
.glass-card,
.product-card-inner,
.login-card,
.modal,
.search-bar {
  position: relative;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 0.5px solid rgba(255, 255, 255, 0.55);
  box-shadow: var(--glass-shadow),
              inset 0 1px 1px rgba(255, 255, 255, 0.65),
              inset 0 -1px 1px rgba(255, 255, 255, 0.10);
}

.glass:hover,
.glass-card:hover,
.product-card-inner:hover {
  background: var(--glass-bg-hover);
  border-color: rgba(255, 255, 255, 0.85);
  box-shadow: var(--glass-shadow-hover),
              inset 0 1px 1px rgba(255, 255, 255, 0.75),
              inset 0 -1px 1px rgba(255, 255, 255, 0.12);
}

.login-card,
.modal {
  box-shadow: 0 24px 80px rgba(31, 45, 61, 0.16), inset 0 1px 1px rgba(255, 255, 255, 0.7);
}

/* --- 水晶渐变描边（晶石边缘反光） --- */
.glass::before,
.glass-card::before,
.product-card-inner::before,
.login-card::before,
.modal::before,
.search-bar::before,
.detail-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.10) 42%, rgba(255, 255, 255, 0.60));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
  z-index: 2;
}

/* --- 顶部高光（光线在玻璃上折射的镜面反射） --- */
.glass::after,
.glass-card::after,
.product-card-inner::after,
.login-card::after,
.modal::after,
.detail-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 6%;
  right: 6%;
  height: 42%;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0));
  filter: blur(8px);
  pointer-events: none;
  z-index: 2;
}

/* --- Header / Sidebar / Toast --- */
.header {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.58));
  backdrop-filter: blur(40px) saturate(190%);
  -webkit-backdrop-filter: blur(40px) saturate(190%);
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.75);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.5), 0 1px 0 rgba(0, 0, 0, 0.04);
}

.admin-sidebar {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.80), rgba(255, 255, 255, 0.55));
  backdrop-filter: blur(40px) saturate(190%);
  -webkit-backdrop-filter: blur(40px) saturate(190%);
}

.toast {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.70));
  backdrop-filter: blur(40px) saturate(200%);
  -webkit-backdrop-filter: blur(40px) saturate(200%);
  box-shadow: 0 8px 28px rgba(31, 45, 61, 0.18), inset 0 1px 1px rgba(255, 255, 255, 0.8);
}

/* --- Buttons / Inputs / Tabs --- */
.glass-btn {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.38));
  backdrop-filter: blur(24px) saturate(175%);
  -webkit-backdrop-filter: blur(24px) saturate(175%);
  border: 0.5px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05), inset 0 1px 1px rgba(255, 255, 255, 0.7);
}

.glass-btn:hover {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.52));
  border-color: rgba(255, 255, 255, 0.85);
}

.glass-btn-primary {
  background: linear-gradient(180deg, #0a84ff, var(--accent-active));
  border: none;
  color: #fff;
  box-shadow: 0 2px 10px rgba(0, 113, 227, 0.35), inset 0 1px 1px rgba(255, 255, 255, 0.35);
}

.glass-btn-primary:hover {
  background: linear-gradient(180deg, #2f97ff, var(--accent));
  box-shadow: 0 4px 16px rgba(0, 113, 227, 0.42), inset 0 1px 1px rgba(255, 255, 255, 0.4);
}

.glass-input {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0.45));
  backdrop-filter: blur(20px) saturate(170%);
  -webkit-backdrop-filter: blur(20px) saturate(170%);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.6);
}

.category-tab {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.70), rgba(255, 255, 255, 0.34));
  backdrop-filter: blur(20px) saturate(170%);
  -webkit-backdrop-filter: blur(20px) saturate(170%);
  border: 0.5px solid rgba(255, 255, 255, 0.6);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.6);
}

.category-tab.active {
  background: linear-gradient(180deg, #0a84ff, var(--accent-active));
  border-color: transparent;
  box-shadow: 0 2px 10px rgba(0, 113, 227, 0.35), inset 0 1px 1px rgba(255, 255, 255, 0.35);
}

/* --- Card 封面图（有图片时） --- */
.product-cover {
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 0.875rem;
  height: 128px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(34, 211, 238, 0.10));
}

.product-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.product-card-inner:hover .product-cover img {
  transform: scale(1.04);
}

/* --- 产品详情页 --- */
.product-detail-page {
  position: relative;
  z-index: 1;
  padding: 2.5rem 0 4rem;
}

.detail-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 0.5px solid rgba(255, 255, 255, 0.55);
  box-shadow: var(--glass-shadow), inset 0 1px 1px rgba(255, 255, 255, 0.65);
  animation: detailIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
}

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

.detail-hero {
  position: relative;
  height: 320px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.20), rgba(34, 211, 238, 0.14), rgba(244, 114, 182, 0.10));
}

.detail-hero.placeholder {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.20), rgba(34, 211, 238, 0.14));
}

.detail-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.detail-cover-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  color: rgba(0, 113, 227, 0.45);
}

.detail-body {
  padding: 2rem 2.5rem 2.5rem;
}

.detail-title-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.detail-icon {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  background: rgba(0, 113, 227, 0.06);
  border: 0.5px solid rgba(0, 113, 227, 0.12);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.7);
}

.detail-title-row h1 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.detail-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.375rem;
  flex-wrap: wrap;
}

.detail-domain {
  font-size: 0.8125rem;
  color: var(--text-tertiary);
}

.detail-desc {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.75rem;
}

.detail-section {
  margin-bottom: 1.75rem;
}

.detail-section h2 {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  margin-bottom: 0.75rem;
}

.detail-text {
  white-space: pre-wrap;
  font-size: 0.9375rem;
  line-height: 1.75;
  color: var(--text-primary);
}

.detail-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
}

.detail-thumbs img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition-fast);
}

.detail-thumbs img:hover {
  transform: scale(1.02);
  box-shadow: var(--glass-shadow-hover);
}

.detail-thumbs img.active {
  border-color: var(--accent);
}

.detail-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.detail-actions .glass-btn {
  padding: 0.75rem 1.5rem;
  font-size: 0.9375rem;
}

/* --- no-glass 状态下的补充覆盖 --- */
body.no-glass .glass::before, body.no-glass .glass::after,
body.no-glass .glass-card::before, body.no-glass .glass-card::after,
body.no-glass .product-card-inner::before, body.no-glass .product-card-inner::after,
body.no-glass .login-card::before, body.no-glass .login-card::after,
body.no-glass .modal::before, body.no-glass .modal::after,
body.no-glass .search-bar::before, body.no-glass .search-bar::after,
body.no-glass .detail-card::before, body.no-glass .detail-card::after {
  display: none;
}

body.no-glass .detail-card {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background: var(--bg-card) !important;
}

/* --- 移动端适配 --- */
@media (max-width: 768px) {
  .detail-hero {
    height: 220px;
  }

  .detail-body {
    padding: 1.5rem;
  }
}

/* ============================================
   站点设置（配置化后台自定义）
   ============================================ */
.config-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.5rem;
}

.config-grid .form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.config-grid .form-group label {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.cfg-hint {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-top: 0.25rem;
}

@media (max-width: 800px) {
  .config-grid {
    grid-template-columns: 1fr;
  }
}

/* --- 分类管理 --- */
.category-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  margin-bottom: 0.5rem;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.35));
  border: 0.5px solid var(--glass-border);
}

.category-item .category-item-name {
  font-size: 0.875rem;
  color: var(--text-primary);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-item .actions {
  display: flex;
  gap: 0.35rem;
  flex-shrink: 0;
}

.category-empty {
  padding: 1.25rem;
  text-align: center;
  color: var(--text-tertiary);
  font-size: 0.875rem;
  border: 1px dashed var(--glass-border);
  border-radius: 10px;
}

/* --- 首页网格列数（响应式） --- */
.products-grid[data-cols="2"] { grid-template-columns: repeat(2, 1fr); }
.products-grid[data-cols="3"] { grid-template-columns: repeat(3, 1fr); }
.products-grid[data-cols="4"] { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1100px) {
  .products-grid[data-cols="4"] { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 800px) {
  .products-grid[data-cols="3"],
  .products-grid[data-cols="4"] { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .products-grid[data-cols="2"],
  .products-grid[data-cols="3"],
  .products-grid[data-cols="4"] { grid-template-columns: 1fr; }
}

/* --- 关闭动画 --- */
body.no-animations *,
body.no-animations *::before,
body.no-animations *::after {
  animation-duration: 0.001s !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001s !important;
}

/* --- 隐藏产品描述 --- */
body.hide-product-desc .product-desc {
  display: none;
}

/* ============================================
   站点设置页 — iOS 26 水晶玻璃质感强化
   ============================================ */

/* 每张配置卡片：渐变底 + 彩色环境光 + 水晶高光
   --tint-r/g/b 由 HTML 内联变量控制每张卡片的环境光色 */
#page-config .config-card {
  background:
    radial-gradient(360px 200px at 6% 0%, rgba(var(--tint-r), var(--tint-g), var(--tint-b), 0.16), transparent 62%),
    radial-gradient(300px 180px at 96% 8%, rgba(255, 255, 255, 0.60), transparent 60%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.46));
  backdrop-filter: blur(40px) saturate(185%);
  -webkit-backdrop-filter: blur(40px) saturate(185%);
  border: 0.5px solid rgba(255, 255, 255, 0.66);
  box-shadow:
    0 8px 30px rgba(31, 45, 61, 0.07),
    inset 0 1px 1px rgba(255, 255, 255, 0.80),
    inset 0 -1px 1px rgba(255, 255, 255, 0.12);
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}

#page-config .config-card:hover {
  box-shadow:
    0 14px 40px rgba(31, 45, 61, 0.10),
    0 0 0 1px rgba(255, 255, 255, 0.45),
    inset 0 1px 1px rgba(255, 255, 255, 0.90),
    inset 0 -1px 1px rgba(255, 255, 255, 0.15);
}

/* 区块标题：水晶图标徽章 + 渐变文字 */
#page-config .config-section-header {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.60);
}

#page-config .config-section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 9px;
  color: var(--accent-text);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.55));
  border: 0.5px solid rgba(255, 255, 255, 0.75);
  box-shadow: 0 2px 6px rgba(31, 45, 61, 0.08), inset 0 1px 1px rgba(255, 255, 255, 0.85);
}

#page-config .config-section-title {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  background: linear-gradient(120deg, var(--text-primary) 32%, var(--accent-text));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* 配置页输入框：水晶描边 + 内高光 */
#page-config .glass-input {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.55));
  border: 0.5px solid rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04), inset 0 0 0 0.5px rgba(255, 255, 255, 0.50);
}

#page-config .glass-input:focus {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.16), inset 0 1px 2px rgba(255, 255, 255, 0.60);
}

/* 分类项：水晶渐变底 + 悬浮上浮 */
#page-config .category-item {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0.42));
  border: 0.5px solid rgba(255, 255, 255, 0.62);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), inset 0 1px 1px rgba(255, 255, 255, 0.70);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

#page-config .category-item:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.92);
  box-shadow: 0 5px 14px rgba(31, 45, 61, 0.09), inset 0 1px 1px rgba(255, 255, 255, 0.85);
}

/* 分类空态：水晶虚线框 */
#page-config .category-empty {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.40), rgba(255, 255, 255, 0.18));
  border: 1px dashed rgba(255, 255, 255, 0.65);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.50);
}

/* 开关：水晶轨道 + 发光激活态 */
#page-config .toggle .toggle-track {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.10), rgba(0, 0, 0, 0.16));
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.12), inset 0 0 0 0.5px rgba(255, 255, 255, 0.35);
}

#page-config .toggle .toggle-track::after {
  background: linear-gradient(180deg, #ffffff, #eceff3);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.20), inset 0 -1px 1px rgba(0, 0, 0, 0.04);
}

#page-config .toggle input:checked + .toggle-track {
  background: linear-gradient(145deg, var(--accent-hover), var(--accent));
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.35), 0 0 10px rgba(0, 113, 227, 0.35);
}

/* 配置页主按钮：渐变水晶按钮 */
#page-config .glass-btn-primary {
  background: linear-gradient(145deg, var(--accent-hover), var(--accent));
  box-shadow: 0 2px 8px rgba(0, 113, 227, 0.28), inset 0 1px 1px rgba(255, 255, 255, 0.30);
}