:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --bg-card: #ffffff;
  --bg-hover: #f8fafc;
  --bg-active: #e2e8f0;

  --text-primary: #0f172a;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --text-disabled: #cbd5e1;

  --accent-primary: #8b5cf6;
  --accent-secondary: #7c3aed;
  --accent-glow: rgba(139, 92, 246, 0.1);
  --accent-glow-strong: rgba(139, 92, 246, 0.15);

  --border-subtle: rgba(0, 0, 0, 0.06);
  --border-default: rgba(0, 0, 0, 0.1);
  --border-hover: rgba(0, 0, 0, 0.15);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.12);
  --shadow-glow: 0 0 20px rgba(139, 92, 246, 0.15);

  --gradient-primary: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 50%, #6366f1 100%);
  --gradient-subtle: linear-gradient(135deg, rgba(139, 92, 246, 0.05) 0%, rgba(99, 102, 241, 0.03) 100%);
  --gradient-card: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
}

[data-theme="dark"] {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --bg-card: #1e293b;
  --bg-hover: #334155;
  --bg-active: #475569;

  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-disabled: #475569;

  --accent-primary: #a78bfa;
  --accent-secondary: #8b5cf6;
  --accent-glow: rgba(139, 92, 246, 0.2);
  --accent-glow-strong: rgba(139, 92, 246, 0.3);

  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-default: rgba(255, 255, 255, 0.1);
  --border-hover: rgba(255, 255, 255, 0.15);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 20px rgba(139, 92, 246, 0.25);

  --gradient-primary: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 50%, #6366f1 100%);
  --gradient-subtle: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(99, 102, 241, 0.08) 100%);
  --gradient-card: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
}

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

html, body {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  height: 100vh;
  width: 100vw;
  display: flex;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* 侧边栏 */
.sidebar {
  width: 230px;
  padding: 0;
  overflow-y: auto;
  flex-shrink: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-subtle);
  transition: transform 0.3s ease;
}

.sidebar::-webkit-scrollbar {
  width: 4px;
}

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

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

.logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 24px 20px;
  border-bottom: 1px solid var(--border-subtle);
  letter-spacing: -0.02em;
}

.logo span {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sb-section-title {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 10px;
  margin-top: 24px;
  padding: 0 24px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  padding: 10px 24px;
  margin: 0 12px;
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  min-height: 44px;
}

.sidebar-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.sidebar-item.active {
  background: var(--accent-glow);
  color: var(--text-primary);
  font-weight: 600;
}

.sidebar-item.active::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  background: var(--gradient-primary);
  border-radius: 2px;
}

.sidebar-item .icon,
.sidebar-item .fas {
  margin-right: 10px;
  font-size: 16px;
  width: 18px;
  text-align: center;
  opacity: 0.9;
  flex-shrink: 0;
}

.sidebar-item.active .icon,
.sidebar-item.active .fas {
  opacity: 1;
  color: var(--accent-primary);
}

.sidebar-item .count {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.2s;
  padding: 2px 8px;
  background: var(--bg-tertiary);
  border-radius: 6px;
}

.sidebar-item:hover .count,
.sidebar-item.active .count {
  opacity: 1;
}

.sidebar-item.active .count {
  background: var(--accent-glow);
  color: var(--accent-primary);
}

/* 主容器 */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  position: relative;
  background: var(--bg-primary);
}

/* 顶部导航 */
.top-nav {
  position: fixed;
  top: 12px;
  right: 20px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 16px;
}

/* 提交网站按钮 */
.submit-site-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--gradient-primary);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
}

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

.submit-site-btn:active {
  transform: translateY(0);
}

.submit-site-btn i {
  font-size: 16px;
}

@media (max-width: 640px) {
  .submit-site-btn span {
    display: none;
  }
  .submit-site-btn {
    padding: 10px 12px;
  }
}

.user-avatar-container {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 6px 6px;
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  background: var(--bg-card);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.user-avatar-container:hover {
  box-shadow: var(--shadow-md);
  background: var(--bg-hover);
}

/* 未登录状态：简化样式，只保留登录按钮 */
.user-avatar-container.logged-out {
  gap: 0;
  padding: 0;
  border-radius: 8px;
  box-shadow: none;
  background: transparent;
}

.user-avatar-container.logged-out:hover {
  box-shadow: none;
  background: transparent;
}

.user-avatar-container.logged-out .user-avatar {
  width: auto;
  height: 36px;
  padding: 0 16px;
  background: var(--gradient-primary);
  color: #fff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  box-shadow: var(--shadow-sm);
}

.user-avatar-container.logged-out .user-info {
  display: none;
}

.user-avatar {
  width: 36px;
  height: 36px;
  background: var(--gradient-primary);
  color: #fff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.user-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

.user-nickname {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-description {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

/* 应用容器 */
.apps-container {
  flex: 1;
  padding: 80px 40px 60px;
  overflow-y: auto;
  scroll-behavior: smooth;
}

.apps-container::-webkit-scrollbar {
  width: 6px;
}

.apps-container::-webkit-scrollbar-track {
  background: transparent;
}

.apps-container::-webkit-scrollbar-thumb {
  background: var(--border-default);
  border-radius: 6px;
}

/* Hero 区域 */
.hero-section {
  padding: 40px 0 30px;
  width: 100%;
  text-align: center;
}

.page-title {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 16px;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.page-title span {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-subtitle {
  color: var(--text-secondary);
  font-size: clamp(14px, 2vw, 16px);
  font-weight: 400;
}

/* 分类区域 */
.category-section {
  margin-bottom: 40px;
}

.category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.category-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  padding-left: 12px;
  border-left: 3px solid var(--accent-primary);
  margin: 0;
}

/* 卡片网格 */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.app-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  color: inherit;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  box-shadow: var(--shadow-sm);
}

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

.app-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: white;
  flex-shrink: 0;
  background: var(--gradient-subtle);
  transition: all 0.25s ease;
  overflow: hidden;
}

.app-card:hover .app-icon-box {
  transform: scale(1.05);
  background: var(--accent-glow-strong);
}

.app-icon-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

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

.app-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 状态指示器 */
.status-indicator {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 12px;
  background-color: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  font-size: 12px;
  font-weight: 500;
  color: #f59e0b;
  transition: all 0.3s ease;
}

.status-indicator.online {
  background-color: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #10b981;
}

.status-indicator.offline {
  background-color: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: currentColor;
}

/* 页脚 */
.site-footer {
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  padding: 20px;
  border-top: 1px solid var(--border-subtle);
  margin-top: 40px;
}

/* 移动端导航 */
.mobile-nav-btn {
  position: fixed;
  top: 12px;
  left: 12px;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: var(--shadow-md);
  font-size: 20px;
  cursor: pointer;
  z-index: 103;
  display: none;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-subtle);
}

.mobile-nav-btn:active {
  transform: scale(0.95);
}

.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* 侧边栏底部 */
.sidebar-bottom-container {
  margin-top: auto;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sidebar-bottom-square {
  width: 80px;
  height: 80px;
  padding: 6px;
}

.square-link {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  overflow: hidden;
}

.square-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scan-text {
  text-align: center;
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 8px;
  font-weight: 500;
}

/* 快速收藏 */
.quick-favorites {
  position: fixed;
  bottom: 50px;
  right: 20px;
  z-index: 105;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.favorites-toggle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-primary);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  z-index: 102;
}

.favorites-toggle:hover {
  transform: scale(1.1);
}

.favorites-toggle.active {
  transform: rotate(72deg);
  background: var(--accent-secondary);
}

.favorites-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 8px;
  background: var(--bg-card);
  border-radius: 16px;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.9);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: absolute;
  bottom: 80px;
  min-width: 50px;
  z-index: 110;
}

.favorites-list.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  bottom: 110px;
}

.favorite-item {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid var(--border-subtle);
}

.favorite-item:hover {
  transform: translateX(-5px);
  background: var(--accent-glow);
  border-color: var(--accent-primary);
}

.favorite-item img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 6px;
}

/* 登录模态框 */
.auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  backdrop-filter: blur(8px);
}

.auth-box {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: 16px;
  width: 90%;
  max-width: 450px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  text-align: center;
  border: 1px solid var(--border-subtle);
}

.auth-box h2 {
  margin: 0 0 1.5rem;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

.auth-box input {
  width: 100%;
  margin-bottom: 1rem;
  font-size: 16px;
  padding: 14px;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  box-sizing: border-box;
}

.auth-box input:focus {
  outline: none;
  border-color: var(--accent-primary);
}

.auth-box button {
  width: 100%;
  font-size: 16px;
  padding: 14px;
  font-weight: 600;
  background: var(--accent-primary);
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-box button:hover {
  background: var(--accent-secondary);
}

/* 提交网站模态框优化 */
.submit-box {
  max-width: 480px;
  padding: 2.5rem;
  position: relative;
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px !important;
  height: 36px;
  border-radius: 50% !important;
  border: none;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  font-size: 16px;
  padding: 0;
  margin: 0;
}

.modal-close-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  transform: rotate(90deg);
}

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

.submit-icon {
  width: 64px;
  height: 64px;
  background: var(--gradient-primary);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  box-shadow: var(--shadow-glow);
}

.submit-icon i {
  font-size: 28px;
  color: white;
}

.submit-header h2 {
  margin: 0 0 0.5rem;
  font-size: 26px;
}

.submit-desc {
  color: var(--text-secondary);
  font-size: 14px;
  margin: 0;
  line-height: 1.5;
}

.submit-form {
  text-align: left;
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-group label i {
  margin-right: 6px;
  color: var(--accent-primary);
  width: 16px;
}

.required {
  color: #ef4444;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 15px;
  font-family: inherit;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

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

.form-group select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

.form-group select option {
  background: var(--bg-primary);
  color: var(--text-primary);
  padding: 8px;
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
  line-height: 1.5;
}

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

.submit-actions {
  display: flex;
  gap: 12px;
}

.submit-actions button {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

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

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

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

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

/* 收藏选择模态框 */
.favorite-box {
  max-width: 600px;
  max-height: 80vh;
  padding: 2rem;
  position: relative;
  display: flex;
  flex-direction: column;
}

.favorite-categories {
  flex: 1;
  overflow-y: auto;
  max-height: 50vh;
  margin: 1rem 0;
  padding-right: 8px;
}

.favorite-categories::-webkit-scrollbar {
  width: 6px;
}

.favorite-categories::-webkit-scrollbar-track {
  background: transparent;
}

.favorite-categories::-webkit-scrollbar-thumb {
  background: var(--border-default);
  border-radius: 3px;
}

.favorite-category-section {
  margin-bottom: 1.5rem;
}

.favorite-category-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
}

.favorite-category-icon {
  font-size: 16px;
}

.favorite-sites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 12px;
}

.favorite-site-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 8px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.favorite-site-item:hover {
  background: var(--accent-glow);
  border-color: var(--accent-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.favorite-site-item.already-fav {
  opacity: 0.5;
  cursor: not-allowed;
  background: var(--bg-tertiary);
}

.favorite-site-item.already-fav:hover {
  transform: none;
  border-color: var(--border-subtle);
  box-shadow: none;
}

.favorite-site-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: white;
  flex-shrink: 0;
}

.favorite-site-name {
  font-size: 12px;
  color: var(--text-secondary);
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.favorite-site-item:hover .favorite-site-name {
  color: var(--text-primary);
}

.favorite-site-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--accent-primary);
  color: white;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: 500;
}

@media (max-width: 640px) {
  .favorite-box {
    max-width: 90vw;
    max-height: 85vh;
    padding: 1.5rem;
  }

  .favorite-sites-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .favorite-site-icon {
    width: 36px;
    height: 36px;
  }
}

/* 模态框动画 */
.auth-overlay.show {
  animation: fadeIn 0.2s ease;
}

.auth-overlay .auth-box {
  animation: slideUp 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

/* 骨架屏样式 */
.skeleton {
  background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-hover) 50%, var(--bg-tertiary) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: 8px;
}

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

.skeleton-category {
  margin-bottom: 40px;
}

.skeleton-category-header {
  width: 120px;
  height: 20px;
  margin-bottom: 16px;
  margin-top: 48px;
}

.skeleton-category-section:first-child .skeleton-category-header {
  margin-top: 0;
}

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

.skeleton-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
}

.skeleton-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  flex-shrink: 0;
}

.skeleton-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skeleton-title {
  width: 60%;
  height: 16px;
}

.skeleton-desc {
  width: 80%;
  height: 14px;
}

/* 隐藏状态 */
.hidden {
  display: none !important;
}

/* 响应式设计 */
@media (max-width: 1025px) {
  .mobile-nav-btn {
    display: flex;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    transform: translateX(-100%);
  }

  .sidebar.active {
    transform: translateX(0);
  }

  .apps-container {
    padding: 60px 16px 40px;
  }

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

  .page-title {
    font-size: 28px;
  }

  .hero-section {
    padding: 30px 0 40px;
  }
}

@media (min-width: 765px) and (max-width: 1025px) {
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .apps-container {
    padding: 70px 32px 50px;
  }
  
  .page-title {
    font-size: 36px;
  }
}

@media (min-width: 1026px) {
  .category-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
  }

  .apps-container {
    padding: 80px 48px 60px;
  }
}

@media (min-width: 1440px) {
  .category-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }

  .apps-container {
    padding: 100px 64px 80px;
  }
}

@media (min-width: 1920px) {
  .category-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  }

  .apps-container {
    padding: 60px 60px;
  }

  .page-title {
    font-size: 40px;
  }

  .app-card {
    padding: 32px;
  }

  .app-title {
    font-size: 18px;
  }

  .app-desc {
    font-size: 14px;
  }
}

/* ==========================================
   通知区域样式
   ========================================== */
.notification-area {
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.notification-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: var(--gradient-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  transition: all 0.3s ease;
  animation: slideDown 0.4s ease;
}

.notification-item.important {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.08) 0%, rgba(239, 68, 68, 0.03) 100%);
  border-color: rgba(239, 68, 68, 0.2);
}

.notification-item.important .notification-icon {
  color: #ef4444;
}

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

.notification-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border-radius: 10px;
  color: var(--accent-primary);
  font-size: 18px;
  box-shadow: var(--shadow-sm);
}

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

.notification-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  line-height: 1.4;
}

.notification-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.notification-close {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
}

.notification-close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

/* 深色模式下的通知样式 */
[data-theme="dark"] .notification-item {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(99, 102, 241, 0.05) 100%);
}

[data-theme="dark"] .notification-item.important {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(239, 68, 68, 0.05) 100%);
}

[data-theme="dark"] .notification-icon {
  background: var(--bg-secondary);
}

/* ==========================================
   搜索框样式
   ========================================== */
.search-box-container {
  max-width: 640px;
  margin: 30px auto 0;
}

.search-engine-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  padding: 0 4px;
}

.search-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.search-tab.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: white;
}

.search-tab i {
  font-size: 14px;
}

.search-input-wrapper {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 4px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.search-input-wrapper:focus-within {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-glow), var(--shadow-md);
}

#searchInput {
  flex: 1;
  padding: 14px 16px;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 16px;
  outline: none;
}

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

.search-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--gradient-primary);
  border: none;
  border-radius: 10px;
  color: white;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

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

.search-btn:active {
  transform: translateY(0);
}

/* 深色模式搜索样式 */
[data-theme="dark"] .search-input-wrapper {
  background: var(--bg-secondary);
}

[data-theme="dark"] .search-tab {
  background: var(--bg-secondary);
}

/* ==========================================
   AI 聊天组件样式
   ========================================== */
.ai-chat-widget {
  position: relative;
  z-index: 104;
}

.ai-chat-toggle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
  transition: all 0.3s ease;
  position: relative;
}

.ai-chat-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

.ai-chat-toggle:active {
  transform: scale(0.95);
}

/* AI 聊天未读消息红点 */
.ai-unread-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 12px;
  height: 12px;
  background: #ef4444;
  border-radius: 50%;
  border: 2px solid var(--bg-card);
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
  animation: pulse-badge 2s infinite;
  display: none;
}

@keyframes pulse-badge {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

.ai-chat-panel {
  position: absolute;
  bottom: 55px;
  right: 0;
  width: 380px;
  height: 500px;
  background: var(--bg-card);
  border-radius: 16px;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp 0.3s ease;
  transition: width 0.3s ease, height 0.3s ease, bottom 0.3s ease, right 0.3s ease;
}

.ai-chat-panel.show {
  display: flex;
}

/* AI 聊天窗口放大状态 */
.ai-chat-panel.expanded {
  width: 680px;
  height: 70vh;
  bottom: 60px;
}

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

.ai-chat-header {
  padding: 16px 20px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
}

.ai-chat-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ai-chat-header-left i {
  font-size: 18px;
}

.ai-chat-header-actions {
  display: flex;
  gap: 8px;
}

.ai-chat-header button {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.ai-chat-header button:hover {
  background: rgba(255, 255, 255, 0.3);
}

.ai-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--bg-secondary);
}

.ai-message {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  max-width: 85%;
}

.ai-message-user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.ai-message-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
  flex-shrink: 0;
  font-size: 14px;
}

.ai-message-bot .ai-message-avatar {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
}

.ai-message-user .ai-message-avatar {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  color: white;
}

.ai-message-content {
  background: var(--bg-card);
  padding: 12px 16px;
  border-radius: 16px;
  border-bottom-left-radius: 4px;
  box-shadow: var(--shadow-sm);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-primary);
}

.ai-message-user .ai-message-content {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  color: white;
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 4px;
}

.ai-message-text {
  word-break: break-word;
}

.ai-message-text pre {
  background: rgba(0, 0, 0, 0.05);
  padding: 12px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 8px 0;
  font-family: 'Fira Code', monospace;
  font-size: 13px;
}

.ai-message-user .ai-message-text pre {
  background: rgba(255, 255, 255, 0.2);
}

.ai-message-text code {
  background: rgba(0, 0, 0, 0.05);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Fira Code', monospace;
  font-size: 13px;
}

.ai-message-user .ai-message-text code {
  background: rgba(255, 255, 255, 0.2);
}

.ai-message-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
  opacity: 0.8;
}

.ai-message-user .ai-message-time {
  color: rgba(255, 255, 255, 0.7);
}

.ai-message-loading .ai-message-content {
  display: flex;
  align-items: center;
  gap: 4px;
}

.ai-message-loading .ai-message-content::after {
  content: '';
  width: 16px;
  height: 16px;
  border: 2px solid var(--accent-primary);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* 流式消息闪烁光标效果 */
.ai-message-streaming .ai-message-text::after {
  content: '▊';
  display: inline-block;
  margin-left: 2px;
  color: var(--accent-primary);
  animation: blink 1s step-end infinite;
}

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

.ai-chat-input-area {
  padding: 16px 20px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  gap: 12px;
  background: var(--bg-card);
}

#aiChatInput {
  flex: 1;
  padding: 12px 18px;
  border: 1px solid var(--border-subtle);
  border-radius: 24px;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: all 0.2s ease;
}

#aiChatInput:focus {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

#aiChatInput::placeholder {
  color: var(--text-muted);
}

#aiChatSend {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

#aiChatSend:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

#aiChatSend:active {
  transform: scale(0.95);
}

#aiChatSend:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* 停止生成按钮 */
#aiChatStop {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

#aiChatStop:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

#aiChatStop:active {
  transform: scale(0.95);
}

/* AI 生成内容提示 */
.ai-chat-notice {
  padding: 8px 20px;
  background: var(--bg-card);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.ai-chat-notice i {
  font-size: 11px;
  opacity: 0.7;
}

/* AI 聊天限流提示样式 */
.ai-rate-limit-message {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.1) 0%, rgba(245, 158, 11, 0.1) 100%);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 12px;
}

.ai-rate-limit-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ai-rate-limit-icon i {
  font-size: 16px;
}

.ai-rate-limit-text {
  flex: 1;
  font-size: 13px;
  line-height: 1.6;
}

.ai-rate-limit-text p {
  margin: 0 0 6px 0;
}

.ai-rate-limit-text p:last-child {
  margin-bottom: 0;
}

.ai-rate-limit-hint {
  color: var(--text-muted);
  font-size: 12px;
}

.ai-rate-limit-login-btn {
  margin-top: 10px;
  padding: 8px 16px;
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.ai-rate-limit-login-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.ai-rate-limit-login-btn i {
  font-size: 12px;
}

/* AI 聊天深色模式 */
[data-theme="dark"] .ai-chat-messages {
  background: var(--bg-primary);
}

[data-theme="dark"] .ai-chat-panel {
  border-color: var(--border-default);
}

/* 移动端适配 */
@media (max-width: 640px) {
  .quick-favorites {
    bottom: 40px;
    right: 16px;
    gap: 10px;
  }

  .ai-chat-panel {
    width: calc(100vw - 40px);
    height: 60vh;
    right: -10px;
    bottom: 50px;
  }

  .ai-chat-panel.expanded {
    width: calc(100vw - 20px);
    height: 80vh;
    right: -10px;
    bottom: 50px;
  }

  .ai-chat-toggle {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
}

/* 搜索框样式 */
@media (max-width: 640px) {
  .search-box-container {
    margin-top: 24px;
  }

  .search-engine-tabs {
    justify-content: center;
  }

  .search-tab {
    padding: 6px 12px;
    font-size: 13px;
  }

  .search-tab span {
    display: none;
  }

  .search-tab i {
    font-size: 16px;
  }

  #searchInput {
    padding: 12px 14px;
    font-size: 15px;
  }

  .search-btn {
    width: 40px;
    height: 40px;
  }
}

/* AI 模型选择器样式 */
.ai-model-item {
  transition: all 0.2s ease;
}

.ai-model-item:hover {
  background: var(--bg-hover) !important;
}

#aiModelSelectorBtn {
  transition: all 0.2s ease;
}

#aiModelSelectorBtn:hover {
  transform: scale(1.1);
  color: var(--accent-secondary);
}

.ai-model-dropdown {
  animation: slideUp 0.2s ease;
}

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

/* ==========================================
   每日热榜样式
   ========================================== */

.hot-rank-page {
  padding: 20px 0;
  animation: fadeIn 0.3s ease;
}

.hot-rank-header {
  text-align: center;
  margin-bottom: 30px;
}

.hot-rank-header h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.hot-rank-header h2 i {
  color: #ff6b6b;
}

.hot-rank-subtitle {
  color: var(--text-secondary);
  font-size: 15px;
}

.hot-rank-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  justify-content: center;
}

.hot-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: 1px solid var(--border-subtle);
  border-radius: 24px;
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.hot-tab:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  transform: translateY(-2px);
}

.hot-tab.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: white;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.hot-rank-content {
  background: var(--bg-card);
  border-radius: 16px;
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  min-height: 400px;
}

.hot-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--text-muted);
  gap: 16px;
}

.hot-loading .loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-subtle);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.hot-list {
  padding: 8px 0;
}

.hot-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-subtle);
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}

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

.hot-item:hover {
  background: var(--bg-hover);
}

.hot-rank {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  flex-shrink: 0;
}

.hot-rank.rank-1 {
  background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
  color: white;
}

.hot-rank.rank-2 {
  background: linear-gradient(135deg, #ffa502, #ffc107);
  color: white;
}

.hot-rank.rank-3 {
  background: linear-gradient(135deg, #2ed573, #7bed9f);
  color: white;
}

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

.hot-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hot-desc {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hot-value {
  font-size: 13px;
  color: var(--accent-primary);
  font-weight: 500;
  flex-shrink: 0;
  white-space: nowrap;
}

.hot-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--text-muted);
  gap: 12px;
}

.hot-error i {
  font-size: 48px;
  color: #ef4444;
}

.hot-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.hot-rank-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
  padding: 0 8px;
}

.update-time {
  font-size: 13px;
  color: var(--text-muted);
}

.refresh-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.refresh-btn:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

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

.refresh-btn i {
  transition: transform 0.3s ease;
}

.refresh-btn:hover i {
  transform: rotate(180deg);
}

/* 侧边栏 NEW 标签 */
.badge-new {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
  color: white;
  font-size: 10px;
  font-weight: 700;
  border-radius: 10px;
  margin-left: auto;
  animation: pulse 2s infinite;
}

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

/* 热榜响应式 */
@media (max-width: 768px) {
  .hot-rank-tabs {
    gap: 8px;
    padding: 0 4px;
  }

  .hot-tab {
    padding: 8px 14px;
    font-size: 13px;
  }

  .hot-tab span {
    display: none;
  }

  .hot-item {
    padding: 14px 16px;
    gap: 12px;
  }

  .hot-rank {
    width: 24px;
    height: 24px;
    font-size: 12px;
  }

  .hot-title {
    font-size: 14px;
  }

  .hot-value {
    font-size: 12px;
  }

  .hot-rank-header h2 {
    font-size: 22px;
  }
}
