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

/* 深色模式变量 (默认) */
:root, [data-theme="dark"] {
  --bg-primary: #0f0f1e;
  --bg-secondary: #1a1a2e;
  --bg-secondary-blur: rgba(26, 26, 46, 0.8);
  --bg-card: #16213e;
  --text-primary: #ffffff;
  --text-secondary: #9ca3af;
  --border-color: #2a2a3e;
  --input-bg: #1a1a2e;
  
  /* 颜色变量 */
  --purple-50: #faf5ff;
  --purple-100: #f3e8ff;
  --purple-200: #e9d5ff;
  --purple-300: #d8b4fe;
  --purple-400: #c084fc;
  --purple-500: #a855f7;
  --purple-600: #9333ea;
  --purple-700: #7e22ce;
  --purple-800: #6b21a8;
  --purple-900: #581c87;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  
  /* 阴影变量 */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
}

/* 浅色模式变量 */
[data-theme="light"] {
  --bg-primary: #f3f4f6;
  --bg-secondary: #ffffff;
  --bg-secondary-blur: rgba(255, 255, 255, 0.8);
  --bg-card: #faf9fc;
  --text-primary: #1f2937;
  --text-secondary: #4b5563;
  --border-color: #d1d5db;
  --input-bg: #f9fafb;
}

/* 跟随系统 */
@media (prefers-color-scheme: light) {
  [data-theme="auto"] {
    --bg-primary: #f3f4f6;
    --bg-secondary: #ffffff;
    --bg-secondary-blur: rgba(255, 255, 255, 0.8);
    --bg-card: #faf9fc;
    --text-primary: #1f2937;
    --text-secondary: #4b5563;
    --border-color: #d1d5db;
    --input-bg: #f9fafb;
  }
}

@media (prefers-color-scheme: dark) {
  [data-theme="auto"] {
    --bg-primary: #0f0f1e;
    --bg-secondary: #1a1a2e;
    --bg-secondary-blur: rgba(26, 26, 46, 0.8);
    --bg-card: #16213e;
    --text-primary: #ffffff;
    --text-secondary: #9ca3af;
    --border-color: #2a2a3e;
    --input-bg: #1a1a2e;
  }
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding-top: 60px;
  transition: background 0.3s, color 0.3s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* 导航栏 */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, var(--bg-secondary-blur) 0%, rgba(168, 85, 247, 0.03) 100%);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  z-index: 9999;
  height: 64px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
  transform: translateZ(0);
  overflow: visible;
}

[data-theme="light"] .navbar {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(168, 85, 247, 0.02) 100%);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.nav-container {
  max-width: 90rem;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: visible;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: brightness(1.2) drop-shadow(0 2px 8px rgba(168, 85, 247, 0.3));
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-left:hover .logo-img {
  filter: brightness(1.4) drop-shadow(0 4px 12px rgba(168, 85, 247, 0.5));
  transform: scale(1.05) rotate(-5deg);
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--text-secondary) 0%, var(--purple-400) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.025em;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.brand-name::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--purple-400), var(--purple-600));
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-left:hover .brand-name::after {
  width: 100%;
}

[data-theme="light"] .brand-name {
  background: linear-gradient(135deg, #374151 0%, var(--purple-600) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow: visible;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.125rem;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 0.625rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 0.9375rem;
  font-weight: 500;
  position: relative;
}

.nav-link:hover {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.12) 0%, rgba(168, 85, 247, 0.08) 100%);
  color: var(--purple-400);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.15);
}

.nav-link:active {
  transform: translateY(0);
}

[data-theme="light"] .nav-link {
  color: #6b7280;
}

[data-theme="light"] .nav-link:hover {
  color: var(--purple-600);
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.08) 0%, rgba(168, 85, 247, 0.05) 100%);
}

/* 只显示图标的导航链接 */
.nav-link-icon-only {
  padding: 0.625rem;
  gap: 0;
}

.nav-link-icon-only span:not(.nav-icon) {
  display: none;
}

/* 版本号徽章 */
.version-badge {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  cursor: default;
  user-select: none;
  transition: all 0.2s;
}

.version-badge:hover {
  background: transparent;
  color: var(--purple-400);
  transform: none;
  box-shadow: none;
}

[data-theme="light"] .version-badge {
  background: transparent;
  border: none;
}

[data-theme="light"] .version-badge:hover {
  background: transparent;
  color: var(--purple-600);
}

/* 下拉菜单样式 */
.nav-link-dropdown {
  cursor: pointer;
}

.dropdown-arrow {
  display: flex;
  align-items: center;
  transition: transform 0.2s;
}

.nav-link-dropdown.active .dropdown-arrow {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 0.75rem);
  right: 0;
  min-width: 220px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 0.875rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(168, 85, 247, 0.1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10000;
  overflow: hidden;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.nav-link-dropdown.active .dropdown-menu {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) scale(1) !important;
  display: block !important;
}

[data-theme="light"] .dropdown-menu {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(168, 85, 247, 0.08);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.125rem;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  cursor: default;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border-bottom: 1px solid rgba(168, 85, 247, 0.05);
}

.dropdown-item:last-child {
  border-bottom: none;
}

.dropdown-item:hover {
  background: linear-gradient(90deg, rgba(168, 85, 247, 0.08) 0%, rgba(168, 85, 247, 0.04) 100%);
  padding-left: 1.25rem;
}

.status-ping {
  margin-left: auto;
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gray-500);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.status-dot::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.3s;
}

.status-dot.online {
  background: #10b981;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.6), 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.status-dot.online::after {
  background: #10b981;
  animation: statusPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  opacity: 1;
}

.status-dot.offline {
  background: #ef4444;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.6), 0 0 0 2px rgba(239, 68, 68, 0.2);
}

@keyframes statusPulse {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.8;
  }
  50% {
    transform: translate(-50%, -50%) scale(2);
    opacity: 0;
  }
}

.theme-switcher {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem;
  background: rgba(168, 85, 247, 0.1);
  border-radius: 0.5rem;
  height: 38px;
}

.mobile-menu-btn {
  display: none;
  padding: 0.5rem;
  background: transparent;
  border: none;
  border-radius: 0.5rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.mobile-menu-btn:hover {
  background: rgba(168, 85, 247, 0.1);
  color: var(--purple-400);
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 60px;
  right: 0;
  background: var(--bg-secondary-blur);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-left: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  border-radius: 0 0 0 1rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  z-index: 9998;
  min-width: 200px;
  overflow: hidden;
}

.mobile-menu.show {
  display: block;
  animation: slideInRight 0.3s ease-out;
}

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

.mobile-menu-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.2s;
  border-bottom: 1px solid var(--border-color);
}

.mobile-menu-item:last-child {
  border-bottom: none;
}

.mobile-menu-item:hover {
  background: rgba(168, 85, 247, 0.1);
  color: var(--purple-400);
}

.mobile-menu-item svg {
  flex-shrink: 0;
}

/* 移动端下拉菜单 */
.mobile-menu-dropdown {
  flex-direction: column;
  align-items: stretch;
  padding: 0;
}

.mobile-menu-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  cursor: pointer;
  transition: all 0.2s;
}

.mobile-menu-header:hover {
  background: rgba(168, 85, 247, 0.05);
}

.dropdown-arrow-mobile {
  margin-left: auto;
  transition: transform 0.2s;
}

.mobile-menu-dropdown.active .dropdown-arrow-mobile {
  transform: rotate(180deg);
}

.mobile-submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  background: rgba(168, 85, 247, 0.05);
}

.mobile-menu-dropdown.active .mobile-submenu {
  max-height: 200px;
}

.mobile-submenu-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem 0.75rem 3rem;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  cursor: default;
}

.mobile-submenu-item .status-ping {
  margin-left: auto;
}

.mobile-menu-theme {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

.mobile-theme-switcher {
  display: flex;
  gap: 0.25rem;
  margin-left: auto;
  background: rgba(168, 85, 247, 0.05);
  padding: 0.25rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(168, 85, 247, 0.1);
}

.mobile-theme-switcher .theme-btn {
  padding: 0.5rem;
  width: 36px;
  height: 36px;
  border-radius: 0.375rem;
}

.theme-btn {
  padding: 0.5rem;
  background: transparent;
  border: none;
  border-radius: 0.375rem;
  color: #9ca3af;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.theme-btn:hover {
  background: rgba(168, 85, 247, 0.2);
  color: var(--purple-400);
}

.theme-btn.active {
  background: var(--purple-600);
  color: white;
}

.nav-icon {
  font-size: 1.125rem;
  display: flex;
  align-items: center;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover .nav-icon {
  transform: scale(1.1);
}

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

.page-container {
  min-height: 100vh;
}

.search-container {
  background: var(--bg-primary);
  padding: 3rem 2rem 1rem;
  transition: background 0.3s;
}

.container {
  width: 100%;
  max-width: 90rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.search-grid {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 1.5rem;
  align-items: start;
}

.main-card {
  height: auto;
}

.sidebar {
  position: sticky;
  top: 76px;
}

@media (max-width: 1024px) {
  .search-grid {
    grid-template-columns: 1fr;
  }
  
  .sidebar {
    position: static;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
}

.wide-container {
  width: 100%;
  max-width: 90rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.card {
  background: linear-gradient(
    135deg,
    rgba(168, 85, 247, 0.03) 0%,
    rgba(139, 92, 246, 0.05) 50%,
    rgba(168, 85, 247, 0.03) 100%
  );
  backdrop-filter: blur(10px);
  border-radius: 1rem;
  border: 1px solid rgba(168, 85, 247, 0.1);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
  overflow: visible;
  transition: all 0.3s;
  position: relative;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(circle, rgba(168, 85, 247, 0.08) 1.5px, transparent 1.5px);
  background-size: 20px 20px;
  background-position: center center;
  pointer-events: none;
  z-index: 0;
  border-radius: 1rem;
  overflow: hidden;
}

[data-theme="light"] .card::before {
  background-image: 
    radial-gradient(circle, rgba(168, 85, 247, 0.12) 1.5px, transparent 1.5px);
}

.card-spotlight {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  background-image: 
    radial-gradient(circle, rgba(168, 85, 247, 0.5) 1px, transparent 1px);
  background-size: 20px 20px;
  background-position: center center;
  opacity: 0;
  mask-image: radial-gradient(circle 150px at var(--mouse-x, 50%) var(--mouse-y, 50%), black, transparent);
  -webkit-mask-image: radial-gradient(circle 150px at var(--mouse-x, 50%) var(--mouse-y, 50%), black, transparent);
  border-radius: 1rem;
  overflow: hidden;
}

.card:hover .card-spotlight {
  opacity: 1;
}

[data-theme="light"] .card-spotlight {
  background-image: 
    radial-gradient(circle, rgba(168, 85, 247, 0.6) 1px, transparent 1px);
}

[data-theme="light"] .card {
  background: linear-gradient(
    135deg,
    rgba(168, 85, 247, 0.02) 0%,
    rgba(139, 92, 246, 0.04) 50%,
    rgba(168, 85, 247, 0.02) 100%
  );
  border: 1px solid rgba(168, 85, 247, 0.15);
  box-shadow: 0 2px 4px rgba(168, 85, 247, 0.08), 0 1px 2px rgba(168, 85, 247, 0.04);
}

.header {
  text-align: center;
  padding: 2rem 2rem 1.5rem;
  background: linear-gradient(180deg, rgba(168, 85, 247, 0.1) 0%, transparent 100%);
  border-radius: 1rem 1rem 0 0;
  position: relative;
  z-index: 2;
}

.icon {
  font-size: 3rem;
  margin-bottom: 0.75rem;
  display: inline-block;
}

h1 {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, #a855f7 0%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
  letter-spacing: -0.025em;
}

.subtitle {
  color: #9ca3af;
  font-size: 0.9375rem;
  line-height: 1.5;
  max-width: 32rem;
  margin: 0 auto;
}

.header {
  text-align: center;
  padding: 2rem 2rem 1.5rem;
  background: linear-gradient(180deg, rgba(168, 85, 247, 0.1) 0%, transparent 100%);
  border-radius: 1rem 1rem 0 0;
  position: relative;
  z-index: 2;
}

h1 {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, #a855f7 0%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
  letter-spacing: -0.025em;
}

.subtitle {
  color: #9ca3af;
  font-size: 0.9375rem;
  line-height: 1.5;
  max-width: 32rem;
  margin: 0 auto;
}

.search-section {
  padding: 1.5rem;
  position: relative;
  z-index: 5;
  background: linear-gradient(180deg, rgba(168, 85, 247, 0.08) 0%, transparent 100%);
  border-radius: 1rem 1rem 0 0;
}

.card-body {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 1.5rem;
  padding: 1.5rem;
  position: relative;
  z-index: 2;
}

.intro-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

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

.intro-header .icon {
  flex-shrink: 0;
  font-size: 2rem;
  margin-bottom: 0;
  color: var(--text-primary);
  display: flex;
  align-items: center;
}

.intro-header h2 {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, #a855f7 0%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0;
  letter-spacing: -0.025em;
  line-height: 1;
}

.intro-subtitle {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.guide-steps-compact {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-top: 0;
}

.step-item {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  padding: 0.625rem;
  background: linear-gradient(
    135deg,
    rgba(168, 85, 247, 0.03) 0%,
    rgba(139, 92, 246, 0.05) 50%,
    rgba(168, 85, 247, 0.03) 100%
  );
  backdrop-filter: blur(10px);
  border-radius: 0.5rem;
  border: 1px solid rgba(168, 85, 247, 0.1);
  transition: all 0.2s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.step-item:hover {
  background: linear-gradient(
    135deg,
    rgba(168, 85, 247, 0.06) 0%,
    rgba(139, 92, 246, 0.08) 50%,
    rgba(168, 85, 247, 0.06) 100%
  );
  border-color: rgba(168, 85, 247, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(168, 85, 247, 0.15);
}

.step-icon {
  position: relative;
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  background: linear-gradient(135deg, var(--purple-500), var(--purple-600));
  border-radius: 0.375rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(168, 85, 247, 0.3);
}

.step-icon svg {
  color: white;
  z-index: 1;
}

.step-number {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 14px;
  height: 14px;
  background: var(--purple-400);
  color: white;
  border-radius: 50%;
  font-size: 0.5625rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-card);
  z-index: 2;
}

.step-content {
  flex: 1;
  min-width: 0;
}

.step-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.125rem;
}

.step-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.3;
}

[data-theme="light"] .step-item {
  background: linear-gradient(
    135deg,
    rgba(168, 85, 247, 0.02) 0%,
    rgba(139, 92, 246, 0.03) 50%,
    rgba(168, 85, 247, 0.02) 100%
  );
  border: 1px solid rgba(168, 85, 247, 0.12);
  box-shadow: 0 1px 3px rgba(168, 85, 247, 0.06);
}

[data-theme="light"] .step-item:hover {
  background: linear-gradient(
    135deg,
    rgba(168, 85, 247, 0.04) 0%,
    rgba(139, 92, 246, 0.06) 50%,
    rgba(168, 85, 247, 0.04) 100%
  );
  border-color: rgba(168, 85, 247, 0.25);
  box-shadow: 0 3px 6px rgba(168, 85, 247, 0.12);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.stat-card {
  text-align: center;
  padding: 1rem;
  background: rgba(168, 85, 247, 0.05);
  border-radius: 0.75rem;
  border: 1px solid rgba(168, 85, 247, 0.1);
  transition: all 0.2s;
}

.stat-card:hover {
  background: rgba(168, 85, 247, 0.1);
  transform: translateY(-2px);
}

.chart-section {
  background: rgba(168, 85, 247, 0.03);
  border-radius: 0.75rem;
  padding: 1.25rem;
  border: 1px solid rgba(168, 85, 247, 0.1);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  flex-shrink: 0;
}

.chart-title-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.chart-title-wrapper svg {
  flex-shrink: 0;
  color: var(--purple-400);
}

.chart-title-wrapper h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.chart-period {
  font-size: 0.75rem;
  color: var(--text-secondary);
  padding: 0.25rem 0.625rem;
  background: rgba(168, 85, 247, 0.1);
  border-radius: 9999px;
}

.chart-container {
  position: relative;
  flex: 1;
  min-height: 0;
}

/* 图表骨架屏 */
.chart-skeleton {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1rem 0;
  position: relative;
}

/* 模拟图表的网格线 */
.chart-skeleton::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    repeating-linear-gradient(
      to bottom,
      transparent,
      transparent 19%,
      rgba(168, 85, 247, 0.05) 19%,
      rgba(168, 85, 247, 0.05) 20%
    );
  pointer-events: none;
}

/* 模拟折线图的曲线容器 */
.skeleton-chart-line {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
  height: calc(100% - 2rem);
  display: flex;
  align-items: flex-end;
}

/* 第一条曲线（橙色 - 电影） */
.skeleton-curve-1 {
  position: absolute;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 7% 55%, rgba(251, 146, 60, 0.15) 0%, transparent 3%),
    radial-gradient(circle at 21% 40%, rgba(251, 146, 60, 0.15) 0%, transparent 3%),
    radial-gradient(circle at 35% 65%, rgba(251, 146, 60, 0.15) 0%, transparent 3%),
    radial-gradient(circle at 50% 30%, rgba(251, 146, 60, 0.15) 0%, transparent 3%),
    radial-gradient(circle at 64% 50%, rgba(251, 146, 60, 0.15) 0%, transparent 3%),
    radial-gradient(circle at 78% 35%, rgba(251, 146, 60, 0.15) 0%, transparent 3%),
    radial-gradient(circle at 93% 45%, rgba(251, 146, 60, 0.15) 0%, transparent 3%);
  animation: skeleton-loading 1.5s ease-in-out infinite;
}

.skeleton-curve-1::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to right,
    transparent 0%,
    transparent 5%,
    rgba(251, 146, 60, 0.08) 7%,
    transparent 9%,
    transparent 19%,
    rgba(251, 146, 60, 0.08) 21%,
    transparent 23%,
    transparent 33%,
    rgba(251, 146, 60, 0.08) 35%,
    transparent 37%,
    transparent 48%,
    rgba(251, 146, 60, 0.08) 50%,
    transparent 52%,
    transparent 62%,
    rgba(251, 146, 60, 0.08) 64%,
    transparent 66%,
    transparent 76%,
    rgba(251, 146, 60, 0.08) 78%,
    transparent 80%,
    transparent 91%,
    rgba(251, 146, 60, 0.08) 93%,
    transparent 95%
  );
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    transparent 25%,
    black 55%,
    black 60%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    transparent 25%,
    black 55%,
    black 60%,
    transparent 100%
  );
}

/* 第二条曲线（紫色 - 剧集） */
.skeleton-curve-2 {
  position: absolute;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 7% 40%, rgba(139, 92, 246, 0.15) 0%, transparent 3%),
    radial-gradient(circle at 21% 60%, rgba(139, 92, 246, 0.15) 0%, transparent 3%),
    radial-gradient(circle at 35% 50%, rgba(139, 92, 246, 0.15) 0%, transparent 3%),
    radial-gradient(circle at 50% 70%, rgba(139, 92, 246, 0.15) 0%, transparent 3%),
    radial-gradient(circle at 64% 35%, rgba(139, 92, 246, 0.15) 0%, transparent 3%),
    radial-gradient(circle at 78% 65%, rgba(139, 92, 246, 0.15) 0%, transparent 3%),
    radial-gradient(circle at 93% 55%, rgba(139, 92, 246, 0.15) 0%, transparent 3%);
  animation: skeleton-loading 1.5s ease-in-out infinite 0.2s;
}

.skeleton-curve-2::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to right,
    transparent 0%,
    transparent 5%,
    rgba(139, 92, 246, 0.08) 7%,
    transparent 9%,
    transparent 19%,
    rgba(139, 92, 246, 0.08) 21%,
    transparent 23%,
    transparent 33%,
    rgba(139, 92, 246, 0.08) 35%,
    transparent 37%,
    transparent 48%,
    rgba(139, 92, 246, 0.08) 50%,
    transparent 52%,
    transparent 62%,
    rgba(139, 92, 246, 0.08) 64%,
    transparent 66%,
    transparent 76%,
    rgba(139, 92, 246, 0.08) 78%,
    transparent 80%,
    transparent 91%,
    rgba(139, 92, 246, 0.08) 93%,
    transparent 95%
  );
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    transparent 25%,
    black 40%,
    black 70%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    transparent 25%,
    black 40%,
    black 70%,
    transparent 100%
  );
}

/* 模拟图例 */
.skeleton-legend {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 1;
}

.skeleton-legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.skeleton-legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(
    90deg,
    rgba(168, 85, 247, 0.2) 0%,
    rgba(168, 85, 247, 0.3) 50%,
    rgba(168, 85, 247, 0.2) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
}

.skeleton-legend-text {
  width: 40px;
  height: 12px;
  background: linear-gradient(
    90deg,
    rgba(168, 85, 247, 0.1) 0%,
    rgba(168, 85, 247, 0.2) 50%,
    rgba(168, 85, 247, 0.1) 100%
  );
  background-size: 200% 100%;
  border-radius: 4px;
  animation: skeleton-loading 1.5s ease-in-out infinite;
}

@keyframes skeleton-loading {
  0% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.6;
  }
}

@keyframes skeleton-shine {
  0% {
    left: -100%;
  }
  50%, 100% {
    left: 100%;
  }
}

[data-theme="light"] .skeleton-curve-1 {
  background: 
    radial-gradient(circle at 7% 55%, rgba(251, 146, 60, 0.2) 0%, transparent 3%),
    radial-gradient(circle at 21% 40%, rgba(251, 146, 60, 0.2) 0%, transparent 3%),
    radial-gradient(circle at 35% 65%, rgba(251, 146, 60, 0.2) 0%, transparent 3%),
    radial-gradient(circle at 50% 30%, rgba(251, 146, 60, 0.2) 0%, transparent 3%),
    radial-gradient(circle at 64% 50%, rgba(251, 146, 60, 0.2) 0%, transparent 3%),
    radial-gradient(circle at 78% 35%, rgba(251, 146, 60, 0.2) 0%, transparent 3%),
    radial-gradient(circle at 93% 45%, rgba(251, 146, 60, 0.2) 0%, transparent 3%);
}

[data-theme="light"] .skeleton-curve-2 {
  background: 
    radial-gradient(circle at 7% 40%, rgba(139, 92, 246, 0.2) 0%, transparent 3%),
    radial-gradient(circle at 21% 60%, rgba(139, 92, 246, 0.2) 0%, transparent 3%),
    radial-gradient(circle at 35% 50%, rgba(139, 92, 246, 0.2) 0%, transparent 3%),
    radial-gradient(circle at 50% 70%, rgba(139, 92, 246, 0.2) 0%, transparent 3%),
    radial-gradient(circle at 64% 35%, rgba(139, 92, 246, 0.2) 0%, transparent 3%),
    radial-gradient(circle at 78% 65%, rgba(139, 92, 246, 0.2) 0%, transparent 3%),
    radial-gradient(circle at 93% 55%, rgba(139, 92, 246, 0.2) 0%, transparent 3%);
}

.search-box {
  position: relative;
  margin-bottom: 0;
  z-index: 1000;
}

.search-tips {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(168, 85, 247, 0.05);
  border-radius: 0.5rem;
  border: 1px solid rgba(168, 85, 247, 0.1);
}

.tip-badge-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tip-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  transition: all 0.2s;
}

.tip-badge-movie {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.tip-badge-tv {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.tip-badge-anime {
  background: rgba(168, 85, 247, 0.1);
  color: #a855f7;
  border: 1px solid rgba(168, 85, 247, 0.2);
}

.tip-text {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

.input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.input-group::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 0.875rem;
  padding: 2px;
  background: linear-gradient(135deg, var(--purple-500), var(--purple-600), #ec4899);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.input-group:focus-within::before {
  opacity: 1;
}

.input-icon {
  position: absolute;
  left: 1.125rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  pointer-events: none;
  z-index: 1;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.input-group:focus-within .input-icon {
  color: var(--purple-400);
  transform: scale(1.1);
}

#searchInput {
  width: 100%;
  padding: 1rem 1.25rem 1rem 3.25rem;
  font-size: 1rem;
  border: 2px solid rgba(168, 85, 247, 0.2);
  border-radius: 0.75rem;
  outline: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: linear-gradient(135deg, rgba(26, 26, 46, 0.6) 0%, rgba(30, 25, 45, 0.7) 100%);
  color: var(--text-primary);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1), inset 0 1px 2px rgba(255, 255, 255, 0.05);
}

[data-theme="light"] #searchInput {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(250, 245, 255, 0.95) 100%);
  border: 2px solid rgba(168, 85, 247, 0.15);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05), inset 0 1px 2px rgba(168, 85, 247, 0.05);
}

#searchInput:hover {
  border-color: rgba(168, 85, 247, 0.4);
  background: linear-gradient(135deg, rgba(30, 30, 50, 0.7) 0%, rgba(35, 28, 50, 0.8) 100%);
  box-shadow: 0 6px 16px rgba(168, 85, 247, 0.15), inset 0 1px 2px rgba(255, 255, 255, 0.05);
}

[data-theme="light"] #searchInput:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 240, 255, 1) 100%);
  box-shadow: 0 6px 16px rgba(168, 85, 247, 0.1), inset 0 1px 2px rgba(168, 85, 247, 0.05);
}

#searchInput:focus {
  border-color: transparent;
  box-shadow: 0 8px 24px rgba(168, 85, 247, 0.25), 0 0 0 4px rgba(168, 85, 247, 0.1), inset 0 1px 2px rgba(255, 255, 255, 0.1);
  background: linear-gradient(135deg, rgba(30, 30, 50, 0.85) 0%, rgba(38, 30, 55, 0.95) 100%);
}

[data-theme="light"] #searchInput:focus {
  background: white;
  box-shadow: 0 8px 24px rgba(168, 85, 247, 0.15), 0 0 0 4px rgba(168, 85, 247, 0.08), inset 0 1px 2px rgba(168, 85, 247, 0.05);
}

#searchInput::placeholder {
  color: var(--text-secondary);
  transition: color 0.3s;
}

#searchInput:focus::placeholder {
  color: var(--text-tertiary);
}

.suggestions {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  right: 0;
  background: linear-gradient(135deg, rgba(26, 26, 46, 0.95) 0%, rgba(30, 25, 45, 0.98) 100%);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 0.75rem;
  max-height: 28rem;
  overflow-y: auto;
  will-change: scroll-position;
  -webkit-overflow-scrolling: touch;
  display: none;
  z-index: 1001;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(168, 85, 247, 0.1);
  transition: background 0.3s, border-color 0.3s;
}

[data-theme="light"] .suggestions {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(250, 245, 255, 0.98) 100%);
  border: 1px solid rgba(168, 85, 247, 0.15);
  box-shadow: 0 20px 40px rgba(168, 85, 247, 0.15), 0 0 0 1px rgba(168, 85, 247, 0.05);
}

.suggestions::-webkit-scrollbar {
  width: 8px;
}

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

.suggestions::-webkit-scrollbar-thumb {
  background: rgba(168, 85, 247, 0.3);
  border-radius: 4px;
}

.suggestions::-webkit-scrollbar-thumb:hover {
  background: rgba(168, 85, 247, 0.5);
}

[data-theme="light"] .suggestions::-webkit-scrollbar-thumb {
  background: rgba(168, 85, 247, 0.25);
}

[data-theme="light"] .suggestions::-webkit-scrollbar-thumb:hover {
  background: rgba(168, 85, 247, 0.4);
}

.suggestions.show {
  display: block;
  animation: slideIn 0.2s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-0.5rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.suggestion-item {
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.15s;
  border-bottom: 1px solid var(--border-color);
}

.suggestion-item:last-child {
  border-bottom: none;
}

.suggestion-item:hover {
  background: linear-gradient(90deg, rgba(168, 85, 247, 0.08) 0%, rgba(139, 92, 246, 0.05) 100%);
  border-color: rgba(168, 85, 247, 0.15);
}

[data-theme="light"] .suggestion-item:hover {
  background: linear-gradient(90deg, rgba(168, 85, 247, 0.06) 0%, rgba(139, 92, 246, 0.03) 100%);
}

.suggestion-item.owned {
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.04) 0%, rgba(16, 185, 129, 0.02) 100%);
}

.suggestion-item.owned:hover {
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.08) 0%, rgba(16, 185, 129, 0.05) 100%);
}

.suggestion-item.requested {
  background: linear-gradient(90deg, rgba(251, 191, 36, 0.04) 0%, rgba(251, 191, 36, 0.02) 100%);
}

.suggestion-item.requested:hover {
  background: linear-gradient(90deg, rgba(251, 191, 36, 0.08) 0%, rgba(251, 191, 36, 0.05) 100%);
}

.suggestion-btn {
  width: 2rem;
  height: 2rem;
  min-width: 2rem;
  min-height: 2rem;
  max-width: 2rem;
  max-height: 2rem;
  border-radius: 0.5rem;
  border: 1px solid var(--purple-500);
  background: rgba(139, 92, 246, 0.2);
  color: var(--purple-400);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
  margin: 0;
  overflow: hidden;
  box-sizing: border-box;
}

.suggestion-btn:hover {
  background: var(--purple-600);
  border-color: var(--purple-600);
}

.suggestion-btn:active {
  background: var(--purple-700);
}

.suggestion-btn.loading {
  width: 2rem !important;
  height: 2rem !important;
  min-width: 2rem !important;
  min-height: 2rem !important;
  max-width: 2rem !important;
  max-height: 2rem !important;
  padding: 0 !important;
  background: rgba(139, 92, 246, 0.3);
  border-color: rgba(139, 92, 246, 0.4);
  border-width: 1px;
  cursor: wait;
  pointer-events: none;
}

.suggestion-btn.owned {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.3);
  border-width: 1px;
  cursor: not-allowed;
  opacity: 0.8;
}

.suggestion-btn.owned:hover {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.3);
}

.suggestion-btn.requested {
  background: rgba(251, 191, 36, 0.2);
  border-color: rgba(251, 191, 36, 0.3);
  border-width: 1px;
  cursor: not-allowed;
  opacity: 0.8;
}

.suggestion-btn.requested:hover {
  background: rgba(251, 191, 36, 0.2);
  border-color: rgba(251, 191, 36, 0.3);
}

.suggestion-btn.error {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.3);
  border-width: 1px;
  cursor: not-allowed;
  opacity: 0.9;
}

.suggestion-btn.error:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.3);
}

.suggestion-btn.error svg {
  color: #ef4444;
}

.suggestion-btn svg {
  display: block;
}

.suggestion-poster {
  width: 3.5rem;
  height: 5.25rem;
  object-fit: cover;
  border-radius: 0.5rem;
  background: var(--gray-200);
  box-shadow: var(--shadow-md);
  flex-shrink: 0;
}

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

.suggestion-title {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.375rem;
  font-size: 0.9375rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.suggestion-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.625rem;
  background: rgba(168, 85, 247, 0.2);
  color: #c084fc;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.025em;
}

.year {
  color: #9ca3af;
}

.loading {
  text-align: center;
  padding: 2rem;
  color: var(--gray-500);
  font-size: 0.9375rem;
}

.spinner {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  border: 3px solid var(--purple-200);
  border-top-color: var(--purple-600);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding: 1.5rem;
  border-top: 1px solid var(--border-color);
  background: var(--bg-card);
  border-radius: 0 0 1rem 1rem;
  transition: border-color 0.3s, background 0.3s;
  position: relative;
  z-index: 3;
  overflow: hidden;
}

.stats::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(168, 85, 247, 0.05);
  border-radius: 0 0 1rem 1rem;
  z-index: -1;
}

.stats::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(to right, rgba(168, 85, 247, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(168, 85, 247, 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  background-position: center center;
  pointer-events: none;
  z-index: -1;
  border-radius: 0 0 1rem 1rem;
}

[data-theme="light"] .stats::before {
  background: rgba(168, 85, 247, 0.03);
}

[data-theme="light"] .stats::after {
  background-image: 
    linear-gradient(to right, rgba(168, 85, 247, 0.08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(168, 85, 247, 0.08) 1px, transparent 1px);
}

[data-theme="light"] .stats {
  border-top-color: #e5e7eb;
}

/* 侧边栏 */
.sidebar {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.info-card {
  background: linear-gradient(
    135deg,
    rgba(168, 85, 247, 0.03) 0%,
    rgba(139, 92, 246, 0.05) 50%,
    rgba(168, 85, 247, 0.03) 100%
  );
  backdrop-filter: blur(10px);
  border-radius: 1rem;
  padding: 0;
  border: 1px solid rgba(168, 85, 247, 0.1);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
  transition: all 0.3s;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.recent-card {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 120px);
  min-height: 400px;
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
}

.recent-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(circle, rgba(168, 85, 247, 0.08) 1.5px, transparent 1.5px);
  background-size: 20px 20px;
  background-position: center center;
  pointer-events: none;
  z-index: 0;
  border-radius: 1rem;
}

[data-theme="light"] .recent-card::before {
  background-image: 
    radial-gradient(circle, rgba(168, 85, 247, 0.12) 1.5px, transparent 1.5px);
}

.recent-card-spotlight {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  background-image: 
    radial-gradient(circle, rgba(168, 85, 247, 0.5) 1px, transparent 1px);
  background-size: 20px 20px;
  background-position: center center;
  opacity: 0;
  mask-image: radial-gradient(circle 150px at var(--mouse-x, 50%) var(--mouse-y, 50%), black, transparent);
  -webkit-mask-image: radial-gradient(circle 150px at var(--mouse-x, 50%) var(--mouse-y, 50%), black, transparent);
  border-radius: 1rem;
}

.recent-card:hover .recent-card-spotlight {
  opacity: 1;
}

[data-theme="light"] .recent-card-spotlight {
  background-image: 
    radial-gradient(circle, rgba(168, 85, 247, 0.6) 1px, transparent 1px);
}

[data-theme="light"] .info-card {
  background: linear-gradient(
    135deg,
    rgba(168, 85, 247, 0.02) 0%,
    rgba(139, 92, 246, 0.04) 50%,
    rgba(168, 85, 247, 0.02) 100%
  );
  border: 1px solid rgba(168, 85, 247, 0.15);
  box-shadow: 0 2px 4px rgba(168, 85, 247, 0.08), 0 1px 2px rgba(168, 85, 247, 0.04);
}

.info-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(168, 85, 247, 0.2), 0 6px 12px rgba(0, 0, 0, 0.1);
  border-color: rgba(168, 85, 247, 0.3);
  background: linear-gradient(
    135deg,
    rgba(168, 85, 247, 0.06) 0%,
    rgba(139, 92, 246, 0.08) 50%,
    rgba(168, 85, 247, 0.06) 100%
  );
}

.recent-header {
  padding: 1.5rem 1.5rem 2rem;
  background: linear-gradient(180deg, rgba(168, 85, 247, 0.1) 0%, rgba(168, 85, 247, 0.05) 70%, transparent 100%);
  border-radius: 1rem 1rem 0 0;
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.recent-header .info-header {
  margin-bottom: 0;
  padding: 0;
}

.info-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--purple-400);
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}

.info-header h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.info-content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.recent-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  will-change: scroll-position;
  -webkit-overflow-scrolling: touch;
  max-height: calc(100vh - 300px);
  padding-right: 0.25rem;
  position: relative;
}

.recent-content::-webkit-scrollbar {
  width: 8px;
}

.recent-content::-webkit-scrollbar-track {
  background: transparent;
}

.recent-content::-webkit-scrollbar-thumb {
  background: rgba(168, 85, 247, 0.3);
  border-radius: 4px;
}

.recent-content::-webkit-scrollbar-thumb:hover {
  background: rgba(168, 85, 247, 0.5);
}

[data-theme="light"] .recent-content::-webkit-scrollbar-thumb {
  background: rgba(168, 85, 247, 0.25);
}

[data-theme="light"] .recent-content::-webkit-scrollbar-thumb:hover {
  background: rgba(168, 85, 247, 0.4);
}

.carousel-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  min-height: 0;
  max-height: 100%;
  z-index: 2;
  padding: 0 1.5rem 2.5rem;
  margin-top: -1rem;
  width: 100%;
  max-width: 100%;
}

.carousel-container::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(
    to top,
    rgba(168, 85, 247, 0.15) 0%,
    rgba(139, 92, 246, 0.1) 30%,
    rgba(168, 85, 247, 0.05) 60%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 10;
}

[data-theme="light"] .carousel-container::after {
  background: linear-gradient(
    to top,
    rgba(168, 85, 247, 0.12) 0%,
    rgba(139, 92, 246, 0.08) 30%,
    rgba(168, 85, 247, 0.04) 60%,
    transparent 100%
  );
}

.carousel-track {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: transform 0.5s ease-in-out;
  will-change: transform;
  width: 100%;
  max-width: 100%;
}

.recent-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: rgba(26, 26, 46, 0.5);
  border-radius: 0.5rem;
  transition: all 0.2s;
  border: 1px solid rgba(168, 85, 247, 0.1);
  flex-shrink: 0;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

/* 最近请求骨架屏 */
.recent-skeleton {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: rgba(26, 26, 46, 0.5);
  border-radius: 0.5rem;
  border: 1px solid rgba(168, 85, 247, 0.1);
  flex-shrink: 0;
  width: 100%;
  position: relative;
  overflow: hidden;
}

/* 添加光泽扫过效果 */
.recent-skeleton::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.08),
    transparent
  );
  animation: skeleton-shine 2s ease-in-out infinite;
}

.skeleton-poster {
  width: 2.5rem;
  height: 3.75rem;
  border-radius: 0.375rem;
  background: rgba(168, 85, 247, 0.12);
  flex-shrink: 0;
}

.skeleton-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.skeleton-title {
  height: 14px;
  width: 70%;
  border-radius: 6px;
  background: rgba(168, 85, 247, 0.12);
}

.skeleton-meta {
  display: flex;
  gap: 0.5rem;
}

.skeleton-badge {
  height: 18px;
  width: 40px;
  border-radius: 9999px;
  background: rgba(168, 85, 247, 0.15);
}

.skeleton-time {
  height: 12px;
  width: 60px;
  border-radius: 6px;
  background: rgba(168, 85, 247, 0.1);
}

[data-theme="light"] .recent-skeleton {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(168, 85, 247, 0.15);
}

[data-theme="light"] .recent-skeleton::after {
  background: linear-gradient(
    90deg,
    transparent,
    rgba(168, 85, 247, 0.12),
    transparent
  );
}

[data-theme="light"] .skeleton-poster {
  background: rgba(168, 85, 247, 0.1);
}

[data-theme="light"] .skeleton-title {
  background: rgba(168, 85, 247, 0.1);
}

[data-theme="light"] .skeleton-badge {
  background: rgba(168, 85, 247, 0.12);
}

[data-theme="light"] .skeleton-time {
  background: rgba(168, 85, 247, 0.08);
}

.recent-item:hover {
  background: rgba(168, 85, 247, 0.3);
  border-color: var(--purple-500);
}

[data-theme="light"] .recent-item {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(168, 85, 247, 0.15);
}

[data-theme="light"] .recent-item:hover {
  background: rgba(168, 85, 247, 0.2);
}

.recent-poster {
  width: 2.5rem;
  height: 3.75rem;
  object-fit: cover;
  border-radius: 0.375rem;
  background: var(--border-color);
  flex-shrink: 0;
}

.recent-info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  max-width: 100%;
}

.recent-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 0.25rem;
  max-width: 100%;
  width: 100%;
}

.recent-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
  flex-wrap: wrap;
}

.recent-type {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  background: rgba(168, 85, 247, 0.2);
  color: var(--purple-400);
  border-radius: 9999px;
  font-size: 0.625rem;
  font-weight: 600;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.5;
}

.info-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  background: linear-gradient(135deg, var(--purple-500), var(--purple-600));
  color: white;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.info-text {
  flex: 1;
}

.tip-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
  padding: 0.5rem 0;
}

.tip-item kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  padding: 0.25rem 0.5rem;
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: 0.375rem;
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.tip-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.tip-badge svg {
  flex-shrink: 0;
}

.empty-recent {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
  gap: 0.5rem;
  text-align: center;
}

.recent-poster {
  width: 2.5rem;
  height: 3.75rem;
  object-fit: cover;
  border-radius: 0.375rem;
  background: var(--border-color);
  flex-shrink: 0;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 1.75rem;
  font-weight: 800;
  background: linear-gradient(135deg, #a855f7 0%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.25rem;
  letter-spacing: -0.025em;
}

.stat-label {
  color: #9ca3af;
  font-size: 0.875rem;
  font-weight: 500;
}

.empty-state {
  text-align: center;
  padding: 2rem;
  color: #9ca3af;
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 0.5rem;
  opacity: 0.5;
}

/* 热门内容区域 */
.trending-container {
  background: var(--bg-primary);
  padding: 2.5rem 0;
  transition: background 0.3s;
}

.trending-section {
  margin-bottom: 2.5rem;
}

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

.section-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.375rem;
  letter-spacing: -0.025em;
  display: flex;
  align-items: center;
}

.section-title svg {
  flex-shrink: 0;
}

.refresh-btn {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.1), rgba(139, 92, 246, 0.15));
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 0.5rem;
  padding: 0.375rem;
  margin-left: 0.75rem;
  cursor: pointer;
  color: var(--purple-400);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(168, 85, 247, 0.1);
}

.refresh-btn:hover {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(139, 92, 246, 0.25));
  border-color: rgba(168, 85, 247, 0.4);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(168, 85, 247, 0.2);
}

.refresh-btn:hover svg {
  animation: rotate 0.6s ease-in-out;
}

.refresh-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(168, 85, 247, 0.15);
}

.refresh-btn:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

[data-theme="light"] .refresh-btn {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.08), rgba(139, 92, 246, 0.12));
  border-color: rgba(168, 85, 247, 0.25);
  box-shadow: 0 1px 3px rgba(168, 85, 247, 0.12);
}

[data-theme="light"] .refresh-btn:hover {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.15), rgba(139, 92, 246, 0.2));
  border-color: rgba(168, 85, 247, 0.35);
  box-shadow: 0 3px 6px rgba(168, 85, 247, 0.18);
}

.section-subtitle {
  color: #9ca3af;
  font-size: 0.875rem;
}

.movie-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr); /* 固定6列 */
  gap: 1.25rem;
}

/* 移除之前的 nth-child 隐藏规则 */

.loading-grid {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  padding: 3rem;
}

.movie-card {
  background: linear-gradient(
    135deg,
    rgba(168, 85, 247, 0.03) 0%,
    rgba(139, 92, 246, 0.05) 50%,
    rgba(168, 85, 247, 0.03) 100%
  );
  backdrop-filter: blur(10px);
  border-radius: 0.75rem;
  overflow: hidden;
  transition: all 0.3s, opacity 0.15s ease-out;
  border: 1px solid rgba(168, 85, 247, 0.1);
  opacity: 1;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
}

/* 隐藏状态 - 使用 opacity 而不是 display，避免闪烁 */
.movie-card[style*="display: none"] {
  opacity: 0;
  pointer-events: none;
}

/* 电影卡片骨架屏 */
.movie-card-skeleton {
  background: linear-gradient(
    135deg,
    rgba(168, 85, 247, 0.03) 0%,
    rgba(139, 92, 246, 0.05) 50%,
    rgba(168, 85, 247, 0.03) 100%
  );
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid rgba(168, 85, 247, 0.1);
  position: relative;
}

/* 添加整体的光泽扫过效果 */
.movie-card-skeleton::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(168, 85, 247, 0.1),
    transparent
  );
  animation: skeleton-shine 2s ease-in-out infinite;
}

.skeleton-movie-poster {
  position: relative;
  padding-top: 150%;
  background: linear-gradient(
    135deg,
    rgba(168, 85, 247, 0.08) 0%,
    rgba(139, 92, 246, 0.12) 50%,
    rgba(168, 85, 247, 0.08) 100%
  );
}

.skeleton-movie-info {
  padding: 0.875rem;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.skeleton-movie-title {
  height: 15px;
  width: 100%;
  border-radius: 4px;
  background: rgba(168, 85, 247, 0.1);
  margin-bottom: 0.375rem;
}

.skeleton-movie-title-2 {
  height: 15px;
  width: 70%;
  border-radius: 4px;
  background: rgba(168, 85, 247, 0.08);
  margin-bottom: 0.5rem;
}

.skeleton-movie-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0;
}

.skeleton-movie-year {
  height: 14px;
  width: 50px;
  border-radius: 4px;
  background: rgba(168, 85, 247, 0.06);
}

.skeleton-movie-btn {
  width: 2rem;
  height: 2rem;
  border-radius: 0.375rem;
  background: rgba(168, 85, 247, 0.1);
}

[data-theme="light"] .movie-card-skeleton {
  background: linear-gradient(
    135deg,
    rgba(168, 85, 247, 0.02) 0%,
    rgba(139, 92, 246, 0.03) 50%,
    rgba(168, 85, 247, 0.02) 100%
  );
}

[data-theme="light"] .movie-card-skeleton::after {
  background: linear-gradient(
    90deg,
    transparent,
    rgba(168, 85, 247, 0.15),
    transparent
  );
}

[data-theme="light"] .skeleton-movie-poster {
  background: linear-gradient(
    135deg,
    rgba(168, 85, 247, 0.06) 0%,
    rgba(139, 92, 246, 0.08) 50%,
    rgba(168, 85, 247, 0.06) 100%
  );
}

[data-theme="light"] .skeleton-movie-title,
[data-theme="light"] .skeleton-movie-title-2,
[data-theme="light"] .skeleton-movie-year,
[data-theme="light"] .skeleton-movie-btn {
  background: rgba(168, 85, 247, 0.1);
}

[data-theme="light"] .movie-card {
  background: linear-gradient(
    135deg,
    rgba(168, 85, 247, 0.02) 0%,
    rgba(139, 92, 246, 0.04) 50%,
    rgba(168, 85, 247, 0.02) 100%
  );
  border: 1px solid rgba(168, 85, 247, 0.15);
  box-shadow: 0 2px 4px rgba(168, 85, 247, 0.08), 0 1px 2px rgba(168, 85, 247, 0.04);
}

.movie-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(168, 85, 247, 0.3), 0 10px 20px rgba(0, 0, 0, 0.2);
  border-color: rgba(168, 85, 247, 0.4);
  background: linear-gradient(
    135deg,
    rgba(168, 85, 247, 0.06) 0%,
    rgba(139, 92, 246, 0.08) 50%,
    rgba(168, 85, 247, 0.06) 100%
  );
}

[data-theme="light"] .movie-card:hover {
  box-shadow: 0 12px 30px rgba(168, 85, 247, 0.2), 0 6px 15px rgba(168, 85, 247, 0.1);
  border-color: rgba(168, 85, 247, 0.3);
  background: linear-gradient(
    135deg,
    rgba(168, 85, 247, 0.04) 0%,
    rgba(139, 92, 246, 0.06) 50%,
    rgba(168, 85, 247, 0.04) 100%
  );
}

/* 浅色主题 - 未完成订阅卡片 */
[data-theme="light"] .incomplete-item {
  background: linear-gradient(
    135deg,
    rgba(168, 85, 247, 0.02) 0%,
    rgba(139, 92, 246, 0.04) 50%,
    rgba(168, 85, 247, 0.02) 100%
  );
  border: 1px solid rgba(168, 85, 247, 0.15);
  box-shadow: 0 2px 4px rgba(168, 85, 247, 0.08), 0 1px 2px rgba(168, 85, 247, 0.04);
}

[data-theme="light"] .incomplete-item:hover {
  box-shadow: 0 8px 20px rgba(168, 85, 247, 0.18), 0 4px 10px rgba(168, 85, 247, 0.08);
  border-color: rgba(168, 85, 247, 0.3);
  background: linear-gradient(
    135deg,
    rgba(168, 85, 247, 0.04) 0%,
    rgba(139, 92, 246, 0.06) 50%,
    rgba(168, 85, 247, 0.04) 100%
  );
}

.movie-poster-wrapper {
  position: relative;
  padding-top: 150%;
  background: #2a2a3e;
  overflow: hidden;
}

.movie-poster {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.movie-rating {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: rgba(0, 0, 0, 0.8);
  color: #fbbf24;
  padding: 0.25rem 0.625rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.movie-info {
  padding: 0.875rem;
}

.movie-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.movie-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.4;
  min-height: 2.625em;
}

.movie-year {
  font-size: 0.875rem;
  color: #9ca3af;
  flex: 1;
}

.subscribe-icon-btn {
  width: 2rem;
  height: 2rem;
  min-width: 2rem;
  min-height: 2rem;
  max-width: 2rem;
  max-height: 2rem;
  padding: 0;
  margin: 0;
  background: rgba(168, 85, 247, 0.2);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.subscribe-icon-btn:hover {
  background: var(--purple-600);
  border-color: var(--purple-600);
  transform: scale(1.1);
}

.subscribe-icon-btn:active {
  transform: scale(0.95);
}

.plus-icon {
  position: relative;
  width: 12px;
  height: 12px;
}

.plus-icon::before,
.plus-icon::after {
  content: '';
  position: absolute;
  background: #c084fc;
  transition: background 0.2s;
}

.plus-icon::before {
  left: 50%;
  top: 0;
  width: 2px;
  height: 100%;
  transform: translateX(-50%);
}

.plus-icon::after {
  top: 50%;
  left: 0;
  width: 100%;
  height: 2px;
  transform: translateY(-50%);
}

.subscribe-icon-btn:hover .plus-icon::before,
.subscribe-icon-btn:hover .plus-icon::after,
.suggestion-btn:hover .plus-icon::before,
.suggestion-btn:hover .plus-icon::after {
  background: white;
}

.subscribe-icon-btn.owned {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.3);
  cursor: not-allowed;
  opacity: 0.8;
}

.subscribe-icon-btn.owned:hover {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.3);
  transform: none;
}

.subscribe-icon-btn.requested {
  background: rgba(251, 191, 36, 0.2);
  border-color: rgba(251, 191, 36, 0.3);
  cursor: not-allowed;
  opacity: 0.8;
}

.subscribe-icon-btn.requested:hover {
  background: rgba(251, 191, 36, 0.2);
  border-color: rgba(251, 191, 36, 0.3);
  transform: none;
}

.subscribe-icon-btn.error {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.3);
  cursor: not-allowed;
  opacity: 0.9;
}

.subscribe-icon-btn.error:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.3);
  transform: none;
}

.subscribe-icon-btn.error svg {
  color: #ef4444;
  stroke: #ef4444;
}

.subscribe-icon-btn.loading {
  background: rgba(139, 92, 246, 0.3);
  border-color: rgba(139, 92, 246, 0.4);
  cursor: wait;
  pointer-events: none;
  transform: none !important;
  padding: 0 !important;
}

.subscribe-icon-btn.loading:hover {
  transform: none !important;
}

.spinner-small {
  display: block;
  width: 12px !important;
  height: 12px !important;
  min-width: 12px;
  min-height: 12px;
  max-width: 12px;
  max-height: 12px;
  border: 2px solid rgba(139, 92, 246, 0.3);
  border-top-color: var(--purple-500);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  flex-shrink: 0;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

@media (max-width: 1024px) {
  .movie-grid {
    grid-template-columns: repeat(5, 1fr); /* 固定5列 */
    gap: 1.25rem;
  }
}

@media (max-width: 768px) {
  .movie-grid {
    grid-template-columns: repeat(3, 1fr); /* 固定3列 */
    gap: 1rem;
  }
}

@media (max-width: 640px) {
  body {
    padding-top: 60px;
  }

  .nav-container {
    padding: 0 1rem;
  }

  .brand-name {
    font-size: 1.125rem;
  }

  .nav-link:not(#showLogBtn):not(#schedulerBtn):not(#adminBtn) {
    display: none;
  }
  
  #showLogBtn,
  #schedulerBtn,
  #adminBtn {
    padding: 0.5rem;
  }
  
  #showLogBtn span:not(.nav-icon),
  #schedulerBtn span:not(.nav-icon),
  #adminBtn span:not(.nav-icon) {
    display: none;
  }

  .theme-switcher {
    display: none !important;
  }

  .mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .nav-right {
    gap: 0.5rem;
  }

  .search-container {
    padding: 2rem 0;
  }
  
  .container {
    padding: 0 1rem;
  }
  
  .wide-container {
    padding: 0 1rem;
  }
  
  .search-grid {
    gap: 1.5rem;
  }

  h1 {
    font-size: 1.75rem;
  }

  .header {
    padding: 1.5rem 1rem 1rem;
  }

  .search-section {
    padding: 1rem;
    position: relative;
  }
  
  #searchInput {
    font-size: 16px; /* 防止 iOS 自动缩放 */
  }
  
  .card-body {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1rem;
  }
  
  .intro-header {
    flex-direction: column;
    text-align: center;
  }
  
  .intro-header h2 {
    font-size: 1.25rem;
  }
  
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
  }
  
  .stat-card {
    padding: 0.75rem 0.5rem;
  }
  
  .chart-container {
    height: 150px;
  }
  
  .card {
    border-radius: 0.75rem;
  }
  
  .info-card {
    padding: 0;
  }
  
  .recent-header {
    padding: 1rem 1rem 1.5rem;
  }
  
  .carousel-container {
    padding: 1rem 1rem 2rem;
    margin-top: -0.5rem;
  }
  
  .carousel-track {
    gap: 1rem;
  }

  .stats {
    gap: 0.75rem;
    padding: 1rem;
  }

  .stat-number {
    font-size: 1.5rem;
  }

  .stat-label {
    font-size: 0.8125rem;
  }

  .suggestion-poster {
    width: 3rem;
    height: 4.5rem;
  }
  
  .sidebar {
    position: static;
  }
  
  .recent-card {
    max-height: 500px;
    width: 100%;
    max-width: 100%;
  }
  
  .recent-item {
    max-width: 100%;
  }
  
  .recent-title {
    max-width: 100%;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .trending-container {
    padding: 2rem 0;
  }

  .section-title {
    font-size: 1.25rem;
  }

  .movie-grid {
    grid-template-columns: repeat(3, 1fr); /* 固定3列 */
    gap: 1rem;
  }

  .movie-info {
    padding: 0.75rem;
  }

  .movie-title {
    font-size: 0.875rem;
  }
}

/* 超小屏幕优化 */
@media (max-width: 480px) {
  .movie-grid {
    grid-template-columns: repeat(3, 1fr); /* 固定3列 */
    gap: 0.75rem;
  }
}

.subscribe-icon-btn svg {
  display: block;
}


/* Footer */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  margin-top: 4rem;
  padding: 3rem 0 1.5rem;
  transition: background 0.3s, border-color 0.3s;
}

.footer-container {
  max-width: 90rem;
  margin: 0 auto;
  padding: 0 2rem;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2rem;
}

.footer-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.footer-logo-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  filter: brightness(1.2);
}

.footer-brand {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.footer-desc {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.6;
}

.footer-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--purple-400);
}

.footer-stats {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
}

.footer-stat:last-child {
  border-bottom: none;
}

.footer-stat-label {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.footer-stat-value {
  color: var(--purple-400);
  font-weight: 700;
  font-size: 1rem;
}

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

.footer-copyright {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.footer-social {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.footer-social svg {
  animation: heartbeat 1.5s ease-in-out infinite;
}

@media (max-width: 768px) {
  .footer {
    padding: 2rem 0 1rem;
    margin-top: 2rem;
  }

  .footer-container {
    padding: 0 1rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

/* 分页样式 */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin: 2rem 0;
  flex-wrap: wrap;
}

/* 分页骨架屏 */
.pagination-skeleton {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.skeleton-page-btn {
  width: 2.5rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  background: rgba(168, 85, 247, 0.1);
  position: relative;
  overflow: hidden;
}

.skeleton-page-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.08),
    transparent
  );
  animation: skeleton-shine 2s ease-in-out infinite;
}

.skeleton-page-btn.wide {
  width: 4rem;
}

[data-theme="light"] .skeleton-page-btn::after {
  background: linear-gradient(
    90deg,
    transparent,
    rgba(168, 85, 247, 0.12),
    transparent
  );
}

.page-btn {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  color: var(--text-primary);
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.875rem;
  min-width: 2.5rem;
}

.page-btn:hover:not(.active) {
  background: rgba(168, 85, 247, 0.1);
  border-color: var(--purple-500);
}

.page-btn.active {
  background: var(--purple-600);
  color: white;
  border-color: var(--purple-600);
  cursor: default;
}

.page-dots {
  color: var(--text-secondary);
  padding: 0 0.5rem;
}

@media (max-width: 768px) {
  .pagination {
    gap: 0.25rem;
  }
  
  .page-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    min-width: 2rem;
  }
}

/* 未完成订阅区域 */
.incomplete-container {
  padding: 2rem 0;
  background: var(--bg-primary);
}

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

.incomplete-list {
  display: grid;
  grid-template-columns: repeat(7, 1fr); /* 固定7列 */
  gap: 1rem;
}


.incomplete-item {
  background: linear-gradient(
    135deg,
    rgba(168, 85, 247, 0.03) 0%,
    rgba(139, 92, 246, 0.05) 50%,
    rgba(168, 85, 247, 0.03) 100%
  );
  backdrop-filter: blur(10px);
  border-radius: 0.75rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  transition: all 0.3s;
  border: 1px solid rgba(168, 85, 247, 0.1);
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
}

.incomplete-item:hover {
  border-color: rgba(168, 85, 247, 0.4);
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(168, 85, 247, 0.25), 0 6px 12px rgba(0, 0, 0, 0.15);
  background: linear-gradient(
    135deg,
    rgba(168, 85, 247, 0.06) 0%,
    rgba(139, 92, 246, 0.08) 50%,
    rgba(168, 85, 247, 0.06) 100%
  );
}

.incomplete-poster {
  width: 100%;
  height: 270px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-secondary);
}

.incomplete-info {
  flex: 1;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.incomplete-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.incomplete-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.3;
  min-height: 2.6em;
}

.incomplete-stats {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  margin-bottom: 0.5rem;
}

.incomplete-stat {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.incomplete-stat-icon {
  width: 12px;
  height: 12px;
  color: var(--purple-500);
  flex-shrink: 0;
}

.incomplete-stat-value {
  font-weight: 600;
  color: var(--text-primary);
}

.incomplete-progress {
  margin-bottom: 0.5rem;
}

.incomplete-progress-bar {
  width: 100%;
  height: 4px;
  background: var(--bg-secondary);
  border-radius: 2px;
  overflow: hidden;
}

.incomplete-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--purple-500), var(--purple-400));
  border-radius: 2px;
  transition: width 0.3s;
}

.incomplete-status {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  border-radius: 1rem;
  font-size: 0.6875rem;
  font-weight: 500;
  align-self: flex-start;
  border: 1px solid transparent;
  transition: all 0.2s;
  margin-top: auto;
}

.incomplete-status.incomplete {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.1), rgba(251, 191, 36, 0.15));
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.2);
}

.incomplete-status.ongoing {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.1), rgba(251, 191, 36, 0.15));
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.2);
}

.incomplete-status.pending {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.1), rgba(139, 92, 246, 0.15));
  color: var(--purple-400);
  border-color: rgba(168, 85, 247, 0.2);
  box-shadow: 0 2px 4px rgba(168, 85, 247, 0.1);
}

.incomplete-status.unknown {
  background: linear-gradient(135deg, rgba(156, 163, 175, 0.1), rgba(156, 163, 175, 0.15));
  color: #9ca3af;
  border-color: rgba(156, 163, 175, 0.2);
}

.incomplete-status.complete {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.15));
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.2);
}

[data-theme="light"] .incomplete-status.pending {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.08), rgba(139, 92, 246, 0.12));
  color: #8b5cf6;
  border-color: rgba(168, 85, 247, 0.25);
  box-shadow: 0 1px 3px rgba(168, 85, 247, 0.12);
}

[data-theme="light"] .incomplete-status.incomplete {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.08), rgba(251, 191, 36, 0.12));
  color: #d97706;
  border-color: rgba(251, 191, 36, 0.25);
}

[data-theme="light"] .incomplete-status.ongoing {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.08), rgba(251, 191, 36, 0.12));
  color: #d97706;
  border-color: rgba(251, 191, 36, 0.25);
}

[data-theme="light"] .incomplete-status.complete {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(16, 185, 129, 0.12));
  color: #059669;
  border-color: rgba(16, 185, 129, 0.25);
}


.incomplete-pagination {
  margin-top: 2rem;
}

.incomplete-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-secondary);
  grid-column: 1 / -1;
}

.incomplete-empty-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  color: var(--purple-500);
  opacity: 0.5;
}

.loading-spinner {
  text-align: center;
  padding: 3rem 1rem;
  grid-column: 1 / -1;
}

.loading-spinner .spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto 1rem;
  border: 3px solid var(--bg-secondary);
  border-top-color: var(--purple-500);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.loading-spinner p {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* 订阅卡片骨架屏 */
.subscription-skeleton {
  background: linear-gradient(
    135deg,
    rgba(168, 85, 247, 0.03) 0%,
    rgba(139, 92, 246, 0.05) 50%,
    rgba(168, 85, 247, 0.03) 100%
  );
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid rgba(168, 85, 247, 0.1);
  position: relative;
}

.subscription-skeleton::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(168, 85, 247, 0.1),
    transparent
  );
  animation: skeleton-shine 2s ease-in-out infinite;
}

.skeleton-subscription-poster {
  width: 100%;
  height: 270px;
  background: linear-gradient(
    135deg,
    rgba(168, 85, 247, 0.08) 0%,
    rgba(139, 92, 246, 0.12) 50%,
    rgba(168, 85, 247, 0.08) 100%
  );
}

.skeleton-subscription-info {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.skeleton-subscription-title {
  height: 15px;
  width: 100%;
  background: rgba(168, 85, 247, 0.1);
  border-radius: 4px;
  margin-bottom: 0.25rem;
}

.skeleton-subscription-title-2 {
  height: 15px;
  width: 70%;
  background: rgba(168, 85, 247, 0.08);
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

.skeleton-subscription-stat {
  height: 12px;
  width: 100%;
  background: rgba(168, 85, 247, 0.06);
  border-radius: 4px;
  margin-bottom: 0.375rem;
}

.skeleton-subscription-progress {
  height: 4px;
  width: 100%;
  background: rgba(168, 85, 247, 0.08);
  border-radius: 2px;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.skeleton-subscription-status {
  height: 20px;
  width: 80px;
  background: rgba(168, 85, 247, 0.1);
  border-radius: 1rem;
  margin-top: auto;
}

[data-theme="light"] .subscription-skeleton {
  background: linear-gradient(
    135deg,
    rgba(168, 85, 247, 0.02) 0%,
    rgba(139, 92, 246, 0.03) 50%,
    rgba(168, 85, 247, 0.02) 100%
  );
}

[data-theme="light"] .subscription-skeleton::after {
  background: linear-gradient(
    90deg,
    transparent,
    rgba(168, 85, 247, 0.15),
    transparent
  );
}

[data-theme="light"] .skeleton-subscription-poster {
  background: linear-gradient(
    135deg,
    rgba(168, 85, 247, 0.06) 0%,
    rgba(139, 92, 246, 0.08) 50%,
    rgba(168, 85, 247, 0.06) 100%
  );
}

[data-theme="light"] .skeleton-subscription-title,
[data-theme="light"] .skeleton-subscription-title-2,
[data-theme="light"] .skeleton-subscription-stat,
[data-theme="light"] .skeleton-subscription-progress,
[data-theme="light"] .skeleton-subscription-status {
  background: rgba(168, 85, 247, 0.1);
}


/* 响应式 */
@media (max-width: 1200px) {
  .incomplete-list {
    grid-template-columns: repeat(5, 1fr); /* 固定5列 */
  }
}

@media (max-width: 768px) {
  .incomplete-list {
    grid-template-columns: repeat(3, 1fr); /* 固定3列 */
    gap: 0.75rem;
  }
  
  .incomplete-poster {
    height: 210px;
  }
  
  .incomplete-info {
    padding: 0.625rem;
  }
  
  .incomplete-title {
    font-size: 0.8125rem;
  }
  
  .incomplete-stat {
    font-size: 0.6875rem;
  }
}

@media (max-width: 480px) {
  .incomplete-list {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
  }
  
  .incomplete-poster {
    height: 180px;
  }
  
  .incomplete-info {
    padding: 0.5rem;
  }
  
  .incomplete-title {
    font-size: 0.75rem;
    margin-bottom: 0.375rem;
  }
  
  .incomplete-stat {
    font-size: 0.625rem;
  }
  
  .incomplete-stat-icon {
    width: 10px;
    height: 10px;
  }
}


/* HDHive 查找日志面板 */
.log-panel {
  position: fixed;
  top: 0;
  right: -400px;
  width: 400px;
  height: 100vh;
  background: var(--bg-primary);
  border-left: 1px solid var(--border-color);
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
  transition: right 0.3s ease;
  z-index: 1000;
  display: flex;
  flex-direction: column;
}

.log-panel.active {
  right: 0;
}

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

.log-panel-header h3 {
  margin: 0;
  font-size: 1.125rem;
  color: var(--text-primary);
}

.log-tabs {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1rem 0;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
}

.log-tab {
  padding: 0.5rem 1rem;
  background: transparent;
  border: none;
  border-radius: 0.5rem 0.5rem 0 0;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
  border-bottom: 2px solid transparent;
}

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

.log-tab.active {
  background: var(--bg-secondary);
  color: var(--purple-400);
  border-bottom-color: var(--purple-400);
}

.log-panel-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.25rem;
  transition: background 0.2s;
}

.log-panel-close:hover {
  background: var(--bg-secondary);
}

.log-panel-content {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  will-change: scroll-position;
  -webkit-overflow-scrolling: touch;
}

/* 面板滚动条样式 */
.log-panel-content::-webkit-scrollbar {
  width: 8px;
}

.log-panel-content::-webkit-scrollbar-track {
  background: transparent;
}

.log-panel-content::-webkit-scrollbar-thumb {
  background: rgba(168, 85, 247, 0.3);
  border-radius: 4px;
}

.log-panel-content::-webkit-scrollbar-thumb:hover {
  background: rgba(168, 85, 247, 0.5);
}

[data-theme="light"] .log-panel-content::-webkit-scrollbar-thumb {
  background: rgba(168, 85, 247, 0.25);
}

[data-theme="light"] .log-panel-content::-webkit-scrollbar-thumb:hover {
  background: rgba(168, 85, 247, 0.4);
}

.log-refresh-info {
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.1) 100%);
  border-radius: 0.375rem;
  border-left: 3px solid #10b981;
  font-size: 0.875rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.log-refresh-info span {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

#checkCountdown {
  font-weight: 600;
  color: #10b981;
  min-width: 4ch;
  display: inline-block;
  text-align: center;
}

.log-empty {
  text-align: center;
  color: var(--text-secondary);
  padding: 2rem 1rem;
}

.log-item {
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  background: var(--bg-secondary);
  border-radius: 0.375rem;
  border-left: 3px solid var(--purple-500);
  display: block;
}

.log-item.batch-progress-info {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(59, 130, 246, 0.15) 100%);
  border-left-color: var(--purple-400);
  margin-bottom: 1rem;
}

.log-item.success {
  border-left-color: #10b981;
}

.log-item.warning {
  border-left-color: #fbbf24;
}

.log-item.error {
  border-left-color: #ef4444;
}

.log-item.monitoring-task {
  border-left-color: #3b82f6;
  background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(59, 130, 246, 0.05) 100%);
  animation: pulse-border 2s ease-in-out infinite;
}

@keyframes pulse-border {
  0%, 100% {
    border-left-color: #3b82f6;
  }
  50% {
    border-left-color: #60a5fa;
  }
}

.log-item-title {
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.log-item-info {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.log-item-time {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-top: 0.25rem;
}

/* 开关按钮样式 - 现代扁平风格 */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  border-radius: 24px;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
}

/* 浅色模式下的开关 */
[data-theme="light"] .slider {
  background-color: rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .slider:hover {
  background-color: rgba(0, 0, 0, 0.12);
  border-color: rgba(0, 0, 0, 0.2);
}

@media (prefers-color-scheme: light) {
  [data-theme="auto"] .slider {
    background-color: rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.15);
  }
  
  [data-theme="auto"] .slider:hover {
    background-color: rgba(0, 0, 0, 0.12);
    border-color: rgba(0, 0, 0, 0.2);
  }
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 2.5px;
  top: 50%;
  transform: translateY(-50%);
  background: #ffffff;
  transition: all 0.3s ease;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

input:checked + .slider {
  background-color: rgba(139, 92, 246, 0.2);
  border-color: rgba(139, 92, 246, 0.4);
}

input:checked + .slider:before {
  transform: translate(20px, -50%);
  background: var(--purple-500);
  box-shadow: 0 2px 4px rgba(139, 92, 246, 0.3);
}

.slider:hover {
  background-color: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
}

input:checked + .slider:hover {
  background-color: rgba(139, 92, 246, 0.3);
  border-color: rgba(139, 92, 246, 0.5);
}

/* 定时任务面板 - 紧凑卡片样式 */
.task-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.task-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1rem;
  transition: all 0.2s;
}

.task-card:hover {
  border-color: var(--purple-500);
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.15);
}

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

.task-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
  color: var(--purple-500);
}

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

.task-info h4 {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
}

.task-info p {
  margin: 0.25rem 0 0 0;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

/* 间隔输入框样式 */
.interval-input {
  width: 60px;
  padding: 4px 8px;
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 4px;
  background: rgba(26, 26, 46, 0.5);
  color: var(--text-primary);
  font-size: 13px;
  text-align: center;
  transition: all 0.2s;
}

.interval-input:hover {
  border-color: rgba(168, 85, 247, 0.4);
  background: rgba(26, 26, 46, 0.7);
}

.interval-input:focus {
  outline: none;
  border-color: var(--purple-500);
  background: rgba(26, 26, 46, 0.8);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.1);
}

/* 隐藏数字输入框的上下箭头 */
.interval-input::-webkit-outer-spin-button,
.interval-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.interval-input[type=number] {
  -moz-appearance: textfield;
}

/* 浅色模式 */
@media (prefers-color-scheme: light) {
  .interval-input {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(168, 85, 247, 0.2);
  }
  
  .interval-input:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(168, 85, 247, 0.3);
  }
  
  .interval-input:focus {
    background: #ffffff;
    border-color: var(--purple-500);
  }
}

.task-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.8125rem;
}

.task-status-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
}

.task-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.status-badge {
  padding: 0.25rem 0.625rem;
  border-radius: 1rem;
  font-weight: 500;
  font-size: 0.75rem;
  white-space: nowrap;
  min-width: 70px;
  display: inline-block;
  text-align: center;
}

.status-badge.active {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
}

.status-badge.inactive {
  background: rgba(148, 163, 184, 0.1);
  color: #94a3b8;
}

.task-next-run {
  color: var(--text-secondary);
  font-size: 0.8125rem;
  white-space: nowrap;
}

.task-run-btn,
.task-stop-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.task-run-btn {
  background: rgba(139, 92, 246, 0.1);
  color: var(--purple-500);
}

.task-run-btn:hover:not(:disabled) {
  background: rgba(139, 92, 246, 0.2);
  border-color: rgba(139, 92, 246, 0.4);
  transform: translateY(-1px);
}

.task-stop-btn {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.2);
}

.task-stop-btn:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  transform: translateY(-1px);
}

.task-run-btn:active,
.task-stop-btn:active {
  transform: translateY(0);
}

.task-run-btn svg,
.task-stop-btn svg {
  flex-shrink: 0;
}

/* 任务子选项样式 */
.task-sub-option {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
}

.task-sub-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

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

.task-sub-title {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.task-sub-desc {
  display: block;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.switch-small {
  transform: scale(0.85);
}

.task-sub-action {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  background: rgba(139, 92, 246, 0.1);
  color: var(--purple-500);
}

.task-sub-action:hover:not(:disabled) {
  background: rgba(139, 92, 246, 0.2);
  border-color: rgba(139, 92, 246, 0.4);
  transform: translateY(-1px);
}

.task-sub-action:active {
  transform: translateY(0);
}

.task-sub-action svg {
  flex-shrink: 0;
}

/* 删除开关样式 */
.delete-switches {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

.delete-switch-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.delete-switch-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

.status-badge.status-badge-small {
  font-size: 0.6875rem;
  padding: 0.1875rem 0.5rem;
  width: 64px !important;
  display: inline-block;
  text-align: center;
}

.delete-actions-vertical {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.delete-rows {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}

.delete-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.delete-row .task-run-btn {
  flex: 0 0 auto;
  min-width: 120px;
}

.delete-row .delete-switch-item {
  flex: 0 0 auto;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .task-header {
    flex-wrap: wrap;
  }
  
  .task-status {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .task-status-left {
    width: 100%;
  }
  
  .task-actions {
    width: 100%;
  }
  
  .task-run-btn,
  .task-stop-btn {
    flex: 1;
    justify-content: center;
  }
  
  /* 删除订阅任务保持每行一个按钮+开关的布局 */
  .task-status-horizontal {
    display: block;
  }
  
  .delete-row {
    justify-content: flex-start;
  }
  
  .delete-row .task-run-btn {
    flex: 0 0 auto;
    min-width: 120px;
    justify-content: flex-start;
  }
  
  .delete-row .delete-switch-item {
    margin-left: auto;
  }
}



/* 旋转动画 */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* 管理面板样式 */
.admin-section {
  margin-bottom: 1.5rem;
}

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

.admin-section-header h4 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

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

.user-stats-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.user-stat-item {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  transition: all 0.2s;
}

.user-stat-item:hover {
  border-color: rgba(139, 92, 246, 0.3);
  background: rgba(139, 92, 246, 0.05);
}

.user-stat-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
}

.user-stat-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
}

.user-stat-name {
  font-weight: 500;
  color: var(--text-primary);
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-admin-badge {
  font-size: 0.65rem;
  color: #10b981;
  font-weight: 500;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  display: inline-block;
}

.user-stat-badge {
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
  background: rgba(139, 92, 246, 0.1);
  color: var(--purple-500);
}

.user-stat-progress {
  flex: 1;
  max-width: 200px;
  min-width: 120px;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--purple-500);
  transition: width 0.3s ease;
  border-radius: 4px;
}

.progress-fill.warning {
  background: #f59e0b;
}

.progress-fill.danger {
  background: #ef4444;
}

.user-stat-count {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  min-width: 60px;
}

.count-number {
  font-size: 0.875rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

.count-label {
  font-size: 0.65rem;
  color: var(--purple-500);
  opacity: 0.8;
  font-weight: 500;
}

.user-stat-actions {
  display: flex;
  flex-direction: row;
  gap: 0.375rem;
  justify-content: flex-end;
}

.btn-reset {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-reset:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
}

.loading-text {
  text-align: center;
  padding: 2rem;
  color: var(--text-secondary);
}

@media (max-width: 768px) {
  .user-stat-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  
  .user-stat-progress {
    width: 100%;
    max-width: none;
  }
  
  .user-stat-actions {
    width: 100%;
  }
  
  .btn-reset {
    flex: 1;
  }
}

/* 管理面板搜索框 */
.admin-search-box {
  position: relative;
  margin-bottom: 1rem;
}

.admin-search-box svg {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  pointer-events: none;
}

.admin-search-box input {
  width: 100%;
  padding: 0.625rem 0.75rem 0.625rem 2.5rem;
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 0.5rem;
  background: var(--card-bg);
  color: var(--text-primary);
  font-size: 0.875rem;
  transition: all 0.2s;
}

.admin-search-box input:focus {
  outline: none;
  border-color: var(--purple-500);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.admin-search-box input::placeholder {
  color: var(--text-secondary);
}

.btn-reset:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: rgba(239, 68, 68, 0.05);
  border-color: rgba(239, 68, 68, 0.1);
}

.btn-reset:disabled:hover {
  background: rgba(239, 68, 68, 0.05);
  border-color: rgba(239, 68, 68, 0.1);
}

.btn-set-limit {
  padding: 0.375rem 0.5rem;
  font-size: 0.75rem;
  background: rgba(139, 92, 246, 0.1);
  color: var(--purple-500);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-set-limit:hover {
  background: rgba(139, 92, 246, 0.2);
  border-color: rgba(139, 92, 246, 0.4);
}

.btn-set-limit svg {
  display: block;
}

/* 限制编辑器 */
.limit-editor {
  margin-top: 0.75rem;
  padding: 0.75rem;
  background: rgba(139, 92, 246, 0.05);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 0.375rem;
  animation: slideDown 0.2s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.limit-editor-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.limit-editor-content label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
}

.limit-editor-content input {
  padding: 0.5rem;
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 0.375rem;
  background: var(--card-bg);
  color: var(--text-primary);
  font-size: 0.875rem;
  transition: all 0.2s;
}

.limit-editor-content input:focus {
  outline: none;
  border-color: var(--purple-500);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.limit-editor-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-save {
  flex: 1;
  padding: 0.5rem;
  font-size: 0.875rem;
  background: var(--purple-500);
  color: white;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
}

.btn-save:hover {
  background: var(--purple-600);
  transform: translateY(-1px);
}

.btn-cancel {
  flex: 1;
  padding: 0.5rem;
  font-size: 0.875rem;
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-cancel:hover {
  background: rgba(0, 0, 0, 0.1);
}

.user-stat-item {
  flex-wrap: wrap;
}

.limit-editor {
  width: 100%;
}

/* 管理员用户名炫酷特效 */
.admin-name {
  background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899, #3b82f6);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 3s linear infinite;
  font-weight: 600;
  position: relative;
}

@keyframes gradient-shift {
  0% {
    background-position: 0% center;
  }
  100% {
    background-position: 200% center;
  }
}

/* 管理员进度条特效 */
.progress-fill.admin-progress {
  background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899, #3b82f6);
  background-size: 200% 100%;
  animation: gradient-shift 3s linear infinite;
  opacity: 0.7;
  transition: none;
}

/* 图片加载状态样式 */
img.image-retrying {
  position: relative;
  opacity: 0.5;
}

img.image-retrying::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid rgba(168, 85, 247, 0.3);
  border-top-color: var(--purple-500);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

img.image-fallback {
  opacity: 0.6;
  filter: grayscale(50%);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* 图片加载动画 - 骨架屏效果 */
img[src]:not([src=""]) {
  background: linear-gradient(
    90deg,
    rgba(168, 85, 247, 0.05) 0%,
    rgba(168, 85, 247, 0.1) 50%,
    rgba(168, 85, 247, 0.05) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

img[src]:not([src=""]).image-loaded,
img[src]:not([src=""]).image-fallback {
  animation: none;
  background: none;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* 浅色模式下的图片加载效果 */
@media (prefers-color-scheme: light) {
  img[src]:not([src=""]) {
    background: linear-gradient(
      90deg,
      rgba(168, 85, 247, 0.03) 0%,
      rgba(168, 85, 247, 0.08) 50%,
      rgba(168, 85, 247, 0.03) 100%
    );
    background-size: 200% 100%;
  }
}
