@import url("https://fonts.bluecdn.com/css2?family=Ubuntu:wght@500;700&display=swap");

/* ==================== CSS变量定义 ==================== */
:root {
  --bg-primary: #ffffff;
  --bg-secondary: #fafafa;
  --bg-tertiary: #f5f5f5;
  --text-primary: #333333;
  --text-secondary: #666666;
  --text-tertiary: #999999;
  --border-color: #e5e5e5;
  --border-hover: #d0d0d0;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.08);
  --card-bg: #ffffff;
  --card-hover-bg: #fafafa;
  --accent-black: #0066fc;
  --accent-black-light: #3385ff;
  --accent-black-dark: #0052d9;
  --accent-hover: #0052d9;
  --success: #00c851;
  --warning: #ffbb33;
  --danger: #ff4444;
  --premium: #d4af37;
  --transition: all 0.2s ease;
}

[data-theme="dark"] {
  --bg-primary: #0a0a0a;
  --bg-secondary: #1a1a1a;
  --bg-tertiary: #2a2a2a;
  --text-primary: #ffffff;
  --text-secondary: #b0b0b0;
  --text-tertiary: #808080;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.15);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.5);
  --card-bg: #1a1a1a;
  --card-hover-bg: #222222;
  --accent-black: #ffffff;
  --accent-black-light: #f5f5f5;
  --accent-black-dark: #e5e5e5;
  --accent-hover: #cccccc;
}

/* ==================== 全局样式 ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro SC", "SF Pro Text",
    "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "WenQuanYi Micro Hei", Arial, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body.modal-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ==================== 顶栏 ==================== */
.top-bar {
  background: rgba(255, 255, 255, 0.85);
  border-bottom: 1px solid var(--border-color);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 999;
  transition: var(--transition);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
}

[data-theme="dark"] .top-bar {
  background: rgba(10, 10, 10, 0.85);
}

.top-bar-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.announcement {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-secondary);
}

.announcement:hover {
  color: var(--text-primary);
}

.announcement svg {
  width: 18px;
  height: 18px;
}

/* 顶栏 Logo 尺寸与对齐 */
.announcement-logo {
  height: 20px;
  width: auto;
  display: block;
}

/* 品牌链接（SVG + 文字） */
.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: inherit;
  text-decoration: none;
}
.brand-text {
  font-family: "Ubuntu", -apple-system, BlinkMacSystemFont, "SF Pro SC",
    "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.2px;
  color: var(--text-primary);
}
.brand-link:hover .brand-text {
  color: var(--text-primary);
}

.announcement-text {
  font-size: 14px;
}

.top-nav {
  display: flex;
  gap: 32px;
  align-items: center;
}

.top-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
}

.top-nav a:hover {
  color: var(--text-primary);
  text-decoration: underline;
  text-decoration-color: #0066fc;
  text-underline-offset: 6px;
  text-decoration-thickness: 2px;
}

/* 顶部导航：当前页高亮与可访问状态 */
.top-nav a.active,
.top-nav a[aria-current="page"] {
  color: #0066fc;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: #0066fc;
  text-underline-offset: 6px;
  text-decoration-thickness: 2px;
}

.top-nav a:focus-visible {
  outline: none;
  color: #0066fc;
  text-decoration: underline;
  text-decoration-color: #0066fc;
  text-underline-offset: 6px;
  text-decoration-thickness: 2px;
}

/* 顶栏 管理入口状态色：未登录=绿色 登录后=红色 */
.top-nav a#adminLoginLink.login-state {
  color: #2e7d32; /* 绿色（登录 CTA）*/
  font-weight: 600;
}
.top-nav a#adminLoginLink.manage-state {
  color: #ff6b6b; /* 红色（已登录显示管理）*/
  font-weight: 600;
}

[data-theme="dark"] .theme-toggle {
  color: #ffffff;
}

.theme-selector {
  position: relative;
}

.theme-toggle {
  background: transparent;
  border: 1px solid var(--border-color);
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: var(--transition);
}

.theme-toggle:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.theme-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
}

/* 顶栏中的下拉适配，覆盖底部版本的定位与层级 */
.top-bar .theme-selector {
  position: relative;
}
.top-bar .theme-dropdown {
  top: calc(100% + 8px);
  bottom: auto;
  right: 0;
  z-index: 2000;
}
.top-bar .theme-dropdown.active {
  display: block;
}

/* ==================== Logo区域 ==================== */
.header-section {
  background: var(--bg-primary);
  padding: 100px 24px;
  text-align: center;
}

.header-section .logo-container {
  max-width: 600px;
  margin: 0 auto;
}

.logo-text {
  font-size: 42px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.logo-subtitle {
  font-size: 13px;
  color: var(--text-tertiary);
  letter-spacing: 3px;
  font-weight: 400;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.domain-count-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #0066fc;
  color: #ffffff;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  margin-top: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .domain-count-badge {
  background: #0066fc;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.domain-count-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

#domainCount {
  white-space: nowrap;
}

/* ==================== 主体内容 ==================== */
.main-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 80px 24px 0px 24px;
}

/* ==================== 域名网格 ==================== */
.domain-grid,
.domains-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 24px;
  margin-bottom: 60px;
}

.domain-card {
  background: #ffffff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 32px;
  transition: transform 0.2s ease, box-shadow 0.2s ease,
    background-color 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
}

.domain-card:hover {
  transform: translateY(-4px);
  border: 1px solid #0066fc;
  box-shadow: 0 4px 16px rgba(0, 102, 252, 0.15);
  background: #fafafa;
}

[data-theme="dark"] .domain-card {
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .domain-card:hover {
  background: #222222;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.domain-footer {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
  color: var(--text-tertiary);
  font-size: 12px;
}

.detail-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* ==================== 首页结构适配 ==================== */
.domains-section {
  background: var(--bg-primary);
}

.domains-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 24px 80px 24px;
}

.featured-section,
.all-domains-section {
  margin-bottom: 40px;
}

/* ==================== 精选域名区域样式 (全新简约风格) ==================== */
.featured-section #featuredDomains {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}

/* 卡片外壳 - 现代简约风格 */
.featured-card {
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  border: 2px solid #f0f4f8;
  position: relative;
}

.featured-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: #0066fc;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* 悬停效果 - 与普通状态保持一致 */
.featured-card:hover {
  transform: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  border-color: #f0f4f8;
}

.featured-card:hover::before {
  opacity: 0;
}

/* 卡片内容 */
.featured-card-inner {
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 16px;
}

/* 顶部徽章区域 */
.featured-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 24px;
}

/* 徽章样式 - 极简扁平风格 */
.featured-badge {
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  background: #0066fc;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.featured-badge.badge-featured {
  background: #0066fc;
}

.featured-badge.badge-new {
  background: #10b981;
}

.featured-badge.badge-special {
  background: #ef4444;
}

.featured-badge.badge-flash {
  background: #f59e0b;
}

/* 标签组 - 简化样式 */
.featured-labels {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.featured-label {
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  background: #f0f4f8;
  color: #64748b;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.featured-card:hover .featured-label {
  background: #f0f4f8;
  color: #64748b;
}

.featured-label.label-rating {
  background: #fef3c7;
  color: #92400e;
}

/* 主体内容区 - 简化布局 */
.featured-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.featured-domain-wrap {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.featured-domain-name {
  font-size: 24px;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
  letter-spacing: -0.5px;
  word-break: break-all;
  line-height: 1.3;
  transition: color 0.2s ease;
}

.featured-card:hover .featured-domain-name {
  color: #1e293b;
}

.featured-suffix-tag {
  padding: 2px 8px;
  background: #f0f4f8;
  color: #0066fc;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
}

.featured-domain-desc {
  font-size: 13px;
  color: #64748b;
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: hidden;
  min-height: 40px;
}

/* 元信息区 - 极简风格 */
.featured-meta {
  display: flex;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
  padding: 4px 0;
  flex: 1;
  transition: all 0.2s ease;
}

.featured-card:hover .meta-item {
  color: #64748b;
}

.meta-item svg {
  flex-shrink: 0;
  opacity: 0.7;
  width: 14px;
  height: 14px;
}

.meta-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 操作按钮区 - 现代扁平风格 */
.featured-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.btn-featured-detail,
.btn-featured-buy,
.btn-featured-disabled {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  text-decoration: none;
}

.btn-featured-detail svg,
.btn-featured-buy svg {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
}

.btn-featured-detail {
  background: #0066fc;
  color: #ffffff;
}

.btn-featured-detail:hover {
  background: #0066fc;
}

.btn-featured-buy {
  background: #f8fafc;
  color: #0066fc;
  border: 1.5px solid #cbd5e1;
}

.btn-featured-buy:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.btn-featured-disabled {
  background: #f8fafc;
  color: #cbd5e1;
  cursor: not-allowed;
  border: 1.5px solid #e2e8f0;
}

/* 暗色主题适配 */
[data-theme="dark"] .featured-card {
  background: #1e293b;
  border-color: #334155;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .featured-card::before {
  background: #3385ff;
}

[data-theme="dark"] .featured-card:hover {
  border-color: #334155;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .featured-badge {
  background: #0066fc;
}

[data-theme="dark"] .featured-label {
  background: #334155;
  color: #94a3b8;
}

[data-theme="dark"] .featured-card:hover .featured-label {
  background: #334155;
  color: #94a3b8;
}

[data-theme="dark"] .featured-label.label-rating {
  background: #422006;
  color: #fbbf24;
}

[data-theme="dark"] .featured-domain-name {
  color: #f1f5f9;
}

[data-theme="dark"] .featured-card:hover .featured-domain-name {
  color: #f1f5f9;
}

[data-theme="dark"] .featured-suffix-tag {
  background: #334155;
  color: #3385ff;
}

[data-theme="dark"] .featured-domain-desc {
  color: #94a3b8;
}

[data-theme="dark"] .featured-meta {
  border-top-color: #334155;
}

[data-theme="dark"] .meta-item {
  color: #94a3b8;
}

[data-theme="dark"] .featured-card:hover .meta-item {
  color: #94a3b8;
}

[data-theme="dark"] .btn-featured-buy {
  background: #0f172a;
  border-color: #475569;
  color: #94a3b8;
}

[data-theme="dark"] .btn-featured-buy:hover {
  background: #0f172a;
  border-color: #475569;
  color: #94a3b8;
}

[data-theme="dark"] .btn-featured-disabled {
  background: #0f172a;
  color: #475569;
  border-color: #334155;
}

/* 响应式布局 */
@media (max-width: 1400px) {
  .featured-section #featuredDomains {
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
  }

  .featured-card-inner {
    padding: 18px;
  }

  .featured-domain-name {
    font-size: 20px;
  }
}

@media (max-width: 1200px) {
  .featured-section #featuredDomains {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 992px) {
  .featured-section #featuredDomains {
    grid-template-columns: repeat(3, 1fr);
  }

  .featured-card-inner {
    padding: 16px;
  }

  .featured-domain-name {
    font-size: 18px;
  }
}

@media (max-width: 768px) {
  .featured-section #featuredDomains {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .featured-card-inner {
    padding: 14px;
  }

  .featured-domain-name {
    font-size: 16px;
  }

  .btn-featured-detail,
  .btn-featured-buy,
  .btn-featured-disabled {
    font-size: 12px;
    padding: 10px 12px;
  }

  .featured-card {
    padding: 16px;
  }

  .btn-featured {
    font-size: 11px;
    padding: 8px 10px;
  }
}

@media (max-width: 480px) {
  .featured-section #featuredDomains {
    grid-template-columns: 1fr;
  }

  .featured-domain-wrap {
    flex-direction: column;
    align-items: flex-start;
  }
}

.section-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
}

.section-header h2 {
  font-size: 22px;
  color: var(--text-primary);
}

.section-hint {
  color: var(--text-tertiary);
  font-size: 13px;
}

.filters-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  padding: 16px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-secondary);
  margin-bottom: 16px;
}

.filter-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.filter-label {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 32px;
  min-width: 48px;
  text-align: right;
  margin-top: 2px;
  white-space: nowrap; /* 防止中文标签换行导致“3+1”显示 */
}

.filter-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  row-gap: 8px;
}

.filter-btn {
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  border-radius: 6px;
  font-size: 13px;
  color: var(--text-primary);
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.filter-btn.active {
  background: #0066fc;
  color: #fff;
  border-color: #0066fc;
}

[data-theme="dark"] .filter-btn.active {
  background: #0066fc;
  color: #fff;
  border-color: #0066fc;
}

/* ==================== 搜索区域 ==================== */
.search-section {
  background: var(--bg-primary);
  padding: 10px 24px 0 24px;
}

.search-container {
  max-width: 800px;
  margin: 0 auto;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--bg-primary);
}

.search-icon {
  width: 18px;
  height: 18px;
  color: var(--text-tertiary);
  flex-shrink: 0;
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 14px;
}

.clear-btn {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border-radius: 6px;
  cursor: pointer;
}

.clear-btn:hover {
  background: var(--bg-secondary);
}

/* ==================== Footer 适配 ==================== */
.footer-section {
  background: #0a0a0a;
  color: #fff;
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 60px 24px 24px 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px;
}

.footer-content h3 {
  color: #fff;
  font-size: 16px;
  margin-bottom: 12px;
}

.footer-content p,
.footer-content li,
.footer-content a {
  color: #999999;
  font-size: 14px;
}

.footer-content ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-content li {
  margin-bottom: 8px;
}

.footer-content a:hover {
  color: #ffffff;
}

.footer-section .footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 16px 24px;
  text-align: center;
  color: #999999;
}

/* ==================== 分页适配 ==================== */
#paginationContainer.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  padding: 16px 24px 24px 24px; /* 减少底部间距，避免页脚前留白 */
}
.pagination-btn:hover:not(:disabled):not(.active) {
  background: var(--bg-tertiary);
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

.pagination .pagination-dots {
  display: inline-flex;
  align-items: center;
  color: var(--text-tertiary);
  padding: 0 4px;
}

.pagination .pagination-btn.active {
  background: #0066fc;
  color: #ffffff;
  border-color: #0066fc;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .pagination .pagination-btn.active {
  background: #0066fc;
  color: #ffffff;
  border-color: #0066fc;
}

/* 覆盖首页分页（#paginationContainer.pagination）为正方形页码 */
#paginationContainer.pagination .pagination-btn {
  width: 40px;
  height: 40px;
  min-width: 40px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}

/* 首尾的上一页/下一页保持矩形，避免文字被挤压 */
#paginationContainer.pagination .pagination-btn:first-child,
#paginationContainer.pagination .pagination-btn:last-child {
  width: auto;
  min-width: 96px;
  height: 40px;
  padding: 0 12px;
}

@media (max-width: 768px) {
  #paginationContainer.pagination .pagination-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
  }
  #paginationContainer.pagination .pagination-btn:first-child,
  #paginationContainer.pagination .pagination-btn:last-child {
    min-width: 84px;
    height: 36px;
    padding: 0 10px;
  }
}

.domain-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 20px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.badge-featured {
  background: #fff9e6;
  color: #b8860b;
}

[data-theme="dark"] .badge-featured {
  background: rgba(212, 175, 55, 0.15);
  color: var(--premium);
}

.badge-new {
  background: #e6f9f0;
  color: #00864a;
}

[data-theme="dark"] .badge-new {
  background: rgba(0, 200, 81, 0.15);
  color: var(--success);
}

.badge-special {
  background: #dfdfdf;
  color: #000000;
}

[data-theme="dark"] .badge-special {
  background: rgba(255, 187, 51, 0.15);
  color: var(--warning);
}

.badge-flash {
  background: #ffe6e6;
  color: #cc0000;
}

[data-theme="dark"] .badge-flash {
  background: rgba(255, 68, 68, 0.15);
  color: var(--danger);
}

.domain-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.meta-tag {
  padding: 4px 10px;
  background: var(--bg-tertiary);
  border-radius: 4px;
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 500;
}

.domain-name {
  font-size: 28px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 20px 0;
  word-break: break-all;
  letter-spacing: -0.5px;
}

.domain-description {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 20px 0;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 44px;
}

.domain-rating {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--bg-tertiary);
  border-radius: 4px;
  margin: 20px 0;
  font-size: 12px;
  font-weight: 600;
}

.rating-icon {
  width: 14px;
  height: 14px;
  color: var(--premium);
}

.card-actions {
  display: flex;
  gap: 12px;
  margin-top: 28px;
}

/* ==================== 按钮样式 ==================== */
.btn {
  flex: 1;
  padding: 12px 20px;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  background: transparent;
  color: var(--text-primary);
}

.btn-primary {
  background: #0066fc;
  color: #ffffff;
  border: 1px solid #0066fc;
  font-weight: 600;
}

.btn-primary:hover {
  background: #0052d9;
  border-color: #0052d9;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 102, 252, 0.3);
}

.btn-large {
  padding: 16px 48px;
  font-size: 15px;
  border-radius: 6px;
  display: inline-block;
}

.btn-primary.btn-large {
  background: #0066fc;
  border-color: #0066fc;
}

.btn-primary.btn-large:hover {
  background: #0052d9;
  border-color: #0052d9;
  box-shadow: 0 4px 12px rgba(0, 102, 252, 0.3);
}

[data-theme="dark"] .btn-primary:hover {
  background: #3385ff;
  border-color: #3385ff;
  box-shadow: 0 4px 12px rgba(0, 102, 252, 0.35);
}

[data-theme="dark"] .btn-primary.btn-large:hover {
  background: #3385ff;
  border-color: #3385ff;
  box-shadow: 0 4px 12px rgba(0, 102, 252, 0.35);
}

.btn-secondary {
  background: transparent;
  border: 1px solid #e5e5e5;
}

.btn-secondary:hover {
  border-color: #1a1a1a;
  background: #f5f5f5;
  transform: translateY(-1px);
}

[data-theme="dark"] .btn-secondary {
  border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .btn-secondary:hover {
  border-color: #ffffff;
  background: #2a2a2a;
}

/* ==================== 主题切换器 - 底部位置 ==================== */
.theme-switcher {
  position: relative;
  z-index: 10;
}

.theme-toggle-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #999999;
  transition: var(--transition);
  font-size: 13px;
  font-weight: 500;
}

.theme-toggle-btn:hover {
  color: #ffffff;
}

.theme-toggle-btn svg {
  width: 16px;
  height: 16px;
}

.theme-toggle-text {
  display: inline-block;
}

.theme-dropdown {
  position: absolute;
  bottom: calc(100% + 8px);
  top: auto;
  right: 0;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  min-width: 160px;
  display: none;
  z-index: 3000;
}

.theme-dropdown.active {
  display: block;
}

.theme-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
}

.theme-option:first-child {
  border-radius: 8px 8px 0 0;
}

.theme-option:last-child {
  border-radius: 0 0 8px 8px;
}

.theme-option:not(:last-child) {
  border-bottom: 1px solid var(--border-color);
}

.theme-option:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.theme-option.active {
  color: var(--accent-black);
  background: var(--bg-tertiary);
}

.theme-option svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: inherit;
  stroke: currentColor;
}

.theme-option-text {
  flex: 1;
}

.theme-option-check {
  width: 16px;
  height: 16px;
  opacity: 0;
  color: inherit;
}

.theme-option.active .theme-option-check {
  opacity: 1;
}

/* 浅色模式下的主题选项样式修复 */
html[data-theme="light"] .theme-option,
html:not([data-theme]) .theme-option {
  color: #666666;
}

html[data-theme="light"] .theme-option:hover,
html:not([data-theme]) .theme-option:hover {
  color: #1a1a1a;
  background: #f5f5f5;
}

html[data-theme="light"] .theme-option.active,
html:not([data-theme]) .theme-option.active {
  color: #1a1a1a;
  background: #f5f5f5;
}

html[data-theme="light"] .theme-option svg,
html:not([data-theme]) .theme-option svg {
  color: #666666;
  stroke: #666666;
}

html[data-theme="light"] .theme-option:hover svg,
html:not([data-theme]) .theme-option:hover svg {
  color: #1a1a1a;
  stroke: #1a1a1a;
}

html[data-theme="light"] .theme-option.active svg,
html:not([data-theme]) .theme-option.active svg {
  color: #1a1a1a;
  stroke: #1a1a1a;
}

/* 深色模式下的主题选项样式 */
html[data-theme="dark"] .theme-option {
  color: #b0b0b0;
}

html[data-theme="dark"] .theme-option:hover {
  color: #ffffff;
  background: #2a2a2a;
}

html[data-theme="dark"] .theme-option.active {
  color: #ffffff;
  background: #2a2a2a;
}

html[data-theme="dark"] .theme-option svg {
  color: #b0b0b0;
  stroke: #b0b0b0;
}

html[data-theme="dark"] .theme-option:hover svg {
  color: #ffffff;
  stroke: #ffffff;
}

html[data-theme="dark"] .theme-option.active svg {
  color: #ffffff;
  stroke: #ffffff;
}

/* ==================== 弹窗 ==================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.3s ease;
  overflow-y: auto;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal-overlay.active {
  display: flex;
  opacity: 1;
}

.modal {
  background: #ffffff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  margin: auto;
}

[data-theme="dark"] .modal {
  background: #0a0a0a;
  border-color: rgba(255, 255, 255, 0.08);
}

.modal-large {
  max-width: 800px;
}

.modal-header {
  padding: 32px;
  border-bottom: 1px solid var(--border-color);
  position: relative;
}

.modal-title {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  letter-spacing: -0.5px;
}

.modal-subtitle {
  font-size: 13px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.modal-close {
  position: absolute;
  top: 32px;
  right: 32px;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--text-tertiary);
  font-size: 24px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

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

.modal-body {
  padding: 32px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.detail-item {
  padding: 16px;
  background: var(--bg-tertiary);
  border-radius: 6px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

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

.detail-label {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.detail-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.domain-intro {
  background: var(--bg-tertiary);
  padding: 24px;
  border-radius: 6px;
  margin: 24px 0;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.domain-intro:hover {
  background: var(--bg-secondary);
}

.domain-intro-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.domain-intro-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
}

/* ==================== 表单 ==================== */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.form-label .required {
  color: var(--danger);
  margin-left: 4px;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 14px;
  transition: var(--transition);
  font-family: inherit;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent-black);
  background: var(--bg-primary);
  box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.05);
}

[data-theme="dark"] .form-input:focus,
[data-theme="dark"] .form-textarea:focus {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.form-hint {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 4px;
}

.form-footer {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.form-note {
  text-align: center;
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.form-note a {
  color: var(--accent-black);
  text-decoration: none;
  font-weight: 500;
}

.form-note a:hover {
  text-decoration: underline;
}

/* ==================== 优势区域 ==================== */
.advantages-section,
.contact-section {
  background: var(--bg-secondary);
  padding: 100px 24px;
  border-top: 1px solid var(--border-color);
}

.section-container {
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  font-size: 32px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 12px;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.section-subtitle {
  text-align: center;
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 60px;
}

.advantages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}

.advantage-item {
  background: var(--bg-primary);
  padding: 32px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.advantage-item:hover {
  transform: translateY(-4px);
  /* 与域名卡片一致的蓝色悬浮效果 */
  border: 1px solid #0066fc;
  box-shadow: 0 4px 16px rgba(0, 102, 252, 0.15);
}

[data-theme="dark"] .advantage-item:hover {
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.advantage-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 20px;
  color: var(--accent-black);
}

[data-theme="dark"] .advantage-icon {
  color: #4169e1;
}

.advantage-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.advantage-description {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ==================== 联系区域 ==================== */
.contact-section {
  background: var(--bg-primary);
}

.contact-button-wrapper {
  text-align: center;
}

/* ==================== 友情链接区域 ==================== */
.friends-link-section {
  background: var(--bg-secondary);
  padding: 50px 24px;
  border-top: 1px solid var(--border-color);
}

.friends-link-title {
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-tertiary);
  margin-bottom: 24px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.friends-link-wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  max-width: 1000px;
  margin: 0 auto;
  line-height: 2;
}

.friend-link {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 400;
  text-decoration: none;
  transition: var(--transition);
  white-space: nowrap;
}

.friend-link:hover {
  color: var(--text-primary);
}

.link-separator {
  color: var(--text-tertiary);
  font-size: 13px;
  margin: 0 12px;
  user-select: none;
}

/* ==================== Footer（黑色背景） ==================== */
.footer {
  background: #0a0a0a;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 80px 24px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr;
  gap: 48px;
}

.footer-logo-section {
  padding-right: 24px;
}

.footer-logo-text {
  font-size: 20px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 16px;
}

.footer-description {
  font-size: 14px;
  color: #999999;
  line-height: 1.8;
}

.footer-column-title {
  font-size: 12px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: #999999;
  text-decoration: none;
  font-size: 14px;
  transition: var(--transition);
}

.footer-links a:hover {
  color: #ffffff;
}

.footer .footer-bottom {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.copyright {
  font-size: 13px;
  color: #666666;
}

.footer-nav {
  display: flex;
  gap: 32px;
  align-items: center;
}

.footer-nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #999999;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: var(--transition);
}

.footer-nav-link:hover {
  color: #ffffff;
}

.footer-nav-icon {
  width: 16px;
  height: 16px;
}

/* ==================== 响应式 ==================== */
@media (max-width: 1200px) {
  .domain-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }

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

  .footer-logo-section {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  .top-bar-container {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
  }

  .announcement {
    flex-shrink: 1;
    min-width: 0;
  }

  .announcement-text {
    display: none;
  }

  .top-nav {
    gap: 16px;
    flex-shrink: 0;
  }

  .top-nav a {
    font-size: 13px;
    white-space: nowrap;
  }

  .logo-text {
    font-size: 32px;
  }

  .domain-grid {
    grid-template-columns: 1fr;
    padding: 0 16px;
    gap: 16px;
  }

  .domain-card {
    margin: 0;
    width: 100%;
  }

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

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

  /* 友情链接移动端优化 */
  .friends-link-section {
    padding: 40px 20px;
  }

  .friends-link-title {
    font-size: 12px;
    margin-bottom: 20px;
  }

  .friends-link-wrapper {
    line-height: 1.8;
  }

  .friend-link {
    font-size: 12px;
  }

  .link-separator {
    font-size: 12px;
    margin: 0 8px;
  }

  /* Footer移动端优化 - 紧凑布局 */
  .footer-main {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 40px 20px;
  }

  .footer-logo-section {
    text-align: left;
    padding-right: 0;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .footer-column {
    text-align: left;
  }

  .footer-column-title {
    margin-bottom: 12px;
    font-size: 11px;
  }

  .footer-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px 16px;
  }

  .footer-links li {
    margin-bottom: 0;
  }

  .footer-links a {
    font-size: 13px;
    display: block;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 20px;
    text-align: center;
    padding: 20px;
  }

  .footer-nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
  }

  /* 移动端主题切换器优化 */
  .theme-toggle-text {
    display: none;
  }

  .modal-header,
  .modal-body {
    padding: 24px;
  }

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

  .form-footer {
    flex-direction: column;
  }

  .header-section {
    padding: 60px 20px;
  }

  .main-content {
    padding: 10px 0 0 0;
  }
}

@media (max-width: 480px) {
  .logo-text {
    font-size: 24px;
    word-break: keep-all;
  }

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

  .domain-name {
    font-size: 24px;
  }

  .footer-main {
    padding: 30px 16px;
  }

  .footer-nav {
    gap: 16px;
  }
}

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

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

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

::-webkit-scrollbar-thumb:hover {
  background: var(--text-tertiary);
}

/* ==================== 动画效果 ==================== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.domain-card,
.advantage-item {
  animation: fadeIn 0.4s ease forwards;
}

/* ==================== 打印样式 ==================== */
@media print {
  .domain-card {
    break-inside: avoid;
  }

  body {
    background: white;
    color: black;
  }
}

/* ==================== 高对比度模式 ==================== */
@media (prefers-contrast: high) {
  :root {
    --border-color: #000000;
    --text-secondary: #000000;
  }

  [data-theme="dark"] {
    --border-color: #ffffff;
    --text-secondary: #ffffff;
  }
}

/* ==================== 减少动画模式 ==================== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==================== 通知提示样式 ==================== */
.notification {
  position: fixed;
  top: 24px;
  right: 24px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px 20px;
  box-shadow: var(--shadow-lg);
  z-index: 10000;
  max-width: 420px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  animation: slideInRight 0.3s ease;
}

.notification-content {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex: 1;
}

.notification-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  margin-top: 2px;
}

.notification-message {
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.6;
  flex: 1;
}

.notification-close {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--text-tertiary);
  transition: var(--transition);
  border-radius: 4px;
  flex-shrink: 0;
}

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

.notification-close svg {
  width: 16px;
  height: 16px;
  display: block;
}

.notification-success {
  border-left: 4px solid var(--success);
}

.notification-success .notification-icon {
  color: var(--success);
}

.notification-error {
  border-left: 4px solid var(--danger);
}

.notification-error .notification-icon {
  color: var(--danger);
}

.notification-info {
  border-left: 4px solid #0000cd;
}

.notification-info .notification-icon {
  color: #0000cd;
}

.notification-fade-out {
  animation: fadeOut 0.3s ease forwards;
}

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

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

@media (max-width: 768px) {
  .notification {
    left: 16px;
    right: 16px;
    top: 16px;
    max-width: none;
  }

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

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

/* ==================== 返回顶部按钮 - 圆形设计 ==================== */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  background: #1a1a1a;
  color: #ffffff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.9);
  z-index: 998;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.back-to-top:hover {
  background: #333333;
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 24px rgba(26, 26, 26, 0.25);
}

.back-to-top:active {
  transform: translateY(0) scale(1);
  box-shadow: 0 4px 12px rgba(26, 26, 26, 0.2);
}

.back-to-top svg {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
}

.back-to-top:hover svg {
  transform: translateY(-1px);
}

[data-theme="dark"] .back-to-top {
  background: #ffffff;
  color: #1a1a1a;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] .back-to-top:hover {
  background: #f5f5f5;
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.15);
}

/* 移动端优化 - 圆形按钮 */
@media (max-width: 768px) {
  .back-to-top {
    width: 44px;
    height: 44px;
    bottom: 16px;
    right: 16px;
  }

  .back-to-top svg {
    width: 18px;
    height: 18px;
  }

  /* 移动端悬停状态优化 */
  .back-to-top:hover {
    transform: none;
    background: #1a1a1a;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  }

  .back-to-top:hover svg {
    transform: none;
  }

  [data-theme="dark"] .back-to-top:hover {
    background: #ffffff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  }

  /* 移动端点击反馈 */
  .back-to-top:active {
    transform: scale(0.95);
    transition: transform 0.1s ease;
  }
}

/* 超小屏幕优化 */
@media (max-width: 480px) {
  .back-to-top {
    width: 40px;
    height: 40px;
    bottom: 12px;
    right: 12px;
  }

  .back-to-top svg {
    width: 16px;
    height: 16px;
  }
}

/* 大屏幕优化 */
@media (min-width: 1440px) {
  .back-to-top {
    right: 24px;
  }
}

/* 超大屏幕优化 */
@media (min-width: 1920px) {
  .back-to-top {
    right: calc((100vw - 1400px) / 2 - 80px);
  }
}

/* 无障碍访问优化 */
@media (prefers-reduced-motion: reduce) {
  .back-to-top {
    transition: opacity 0.3s ease;
  }

  .back-to-top:hover {
    transform: none;
  }

  .back-to-top:hover svg {
    transform: none;
  }
}

/* 确保按钮不会与弹窗重叠 */
.modal-open .back-to-top {
  z-index: 9998;
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
  .back-to-top {
    border: 2px solid currentColor;
  }

  [data-theme="dark"] .back-to-top {
    border: 2px solid currentColor;
  }
}

/* ==================== 分页控件 ==================== */
.pagination-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0px 24px 100px 24px; /* 减少顶部内边距，从60px改为30px */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0px; /* 减少间距 */
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.pagination-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 100px;
  justify-content: center;
}

.pagination-btn:hover:not(:disabled):not(.active) {
  background: var(--bg-tertiary);
  border-color: var(--accent-black);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.pagination-btn:active:not(:disabled) {
  transform: translateY(0);
}

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

.pagination-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.pagination-prev {
  order: 1;
}

.pagination-next {
  order: 3;
}

.pagination-pages {
  display: flex;
  gap: 4px;
  order: 2;
}

.pagination-page {
  min-width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0 12px;
}

.pagination-page:hover:not(.active):not(.ellipsis) {
  background: var(--bg-tertiary);
  border-color: var(--accent-black);
  transform: translateY(-1px);
}

.pagination-page.active {
  background: #0066fc;
  color: #ffffff;
  border-color: #0066fc;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .pagination-page.active {
  background: #0066fc;
  color: #ffffff;
  border-color: #0066fc;
}

.pagination-page.ellipsis {
  background: transparent;
  border: none;
  cursor: default;
  transform: none !important;
  color: var(--text-tertiary);
  min-width: auto;
  padding: 0 8px;
}

/* 域名卡片翻页动画 */
.domain-card {
  opacity: 0;
  transform: translateY(20px);
  animation: cardFadeIn 0.6s ease forwards;
}

/* ========== 骨架屏与空占位 ========== */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-tertiary) 25%,
    var(--bg-secondary) 37%,
    var(--bg-tertiary) 63%
  );
  background-size: 400% 100%;
  animation: skeleton-loading 1.4s ease infinite;
}
.skeleton-card {
  border-color: var(--border-color);
  background: var(--bg-primary);
}
@keyframes skeleton-loading {
  0% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0 50%;
  }
}

.empty-placeholder {
  padding: 32px;
  border: 1px dashed var(--border-color);
  border-radius: 8px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  text-align: center;
}
.empty-placeholder svg {
  width: 32px;
  height: 32px;
  margin-bottom: 8px;
  color: var(--text-tertiary);
}
.empty-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.empty-subtitle {
  font-size: 13px;
  color: var(--text-tertiary);
}

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

.domain-card.fade-out {
  animation: cardFadeOut 0.4s ease forwards;
}

@keyframes cardFadeOut {
  to {
    opacity: 0;
    transform: translateY(-20px);
  }
}

/* 移动端分页优化 */
@media (max-width: 768px) {
  .pagination-container {
    padding: 0px 16px 80px 16px; /* 移动端也减少间距 */
    gap: 0px;
  }

  .pagination-controls {
    gap: 6px;
  }

  .pagination-btn {
    padding: 8px 12px;
    min-width: 80px;
    font-size: 13px;
  }

  .pagination-btn span {
    display: none;
  }

  .pagination-btn svg {
    margin: 0;
  }

  .pagination-page {
    min-width: 36px;
    height: 36px;
    font-size: 13px;
  }

  .pagination-info {
    font-size: 13px;
    margin-bottom: 4px;
  }
}

/* 超小屏幕优化 */
@media (max-width: 480px) {
  .pagination-container {
    padding: 0px 12px 60px 12px; /* 进一步减少间距 */
  }

  .pagination-pages {
    gap: 2px;
  }

  .pagination-page {
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    font-size: 12px;
  }

  .pagination-btn {
    padding: 6px 10px;
    min-width: 70px;
  }
}

/* 减少动画模式支持 */
@media (prefers-reduced-motion: reduce) {
  .pagination-btn,
  .pagination-page,
  .domain-card {
    transition: opacity 0.3s ease;
    animation: none;
  }

  .pagination-btn:hover:not(:disabled),
  .pagination-page:hover:not(.active):not(.ellipsis) {
    transform: none;
  }

  .pagination-page.active {
    transform: none;
  }

  .domain-card {
    opacity: 1;
    transform: none;
  }
}

/* ==================== 移动端触摸优化 ==================== */
/* 移除所有交互元素的默认蓝色高亮 */
.domain-card,
.btn,
.pagination-btn,
.pagination-page,
.modal-close,
.theme-toggle-btn,
.theme-option,
.announcement,
.footer-nav-link,
.friend-link,
.top-nav a {
  -webkit-tap-highlight-color: transparent;
}

/* 为移动端添加自定义触摸反馈 */
@media (max-width: 768px) {
  /* 域名卡片的触摸反馈 */
  .domain-card {
    transition: transform 0.1s ease, box-shadow 0.1s ease,
      background-color 0.1s ease;
  }

  .domain-card:active {
    transform: scale(0.99);
    background: var(--bg-tertiary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }

  /* 按钮的触摸反馈 */
  .btn:active,
  .pagination-btn:active {
    transform: scale(0.97);
    opacity: 0.9;
  }

  /* 分页页码的触摸反馈 */
  .pagination-page:active {
    transform: scale(0.95);
    background: var(--bg-tertiary);
  }

  /* 其他交互元素的触摸反馈 */
  .modal-close:active,
  .theme-toggle-btn:active,
  .theme-option:active,
  .announcement:active,
  .footer-nav-link:active,
  .top-nav a:active {
    transform: scale(0.95);
    opacity: 0.8;
  }

  /* 返回顶部按钮的触摸反馈 */
  .back-to-top:active {
    transform: scale(0.9);
  }
}

/* 深色模式下的触摸反馈优化 */
[data-theme="dark"] .domain-card:active {
  background: #222222;
}

[data-theme="dark"] .pagination-page:active {
  background: #2a2a2a;
}

/* 确保链接和按钮在移动端有良好的触摸体验 */
a,
button {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  touch-action: manipulation; /* 改善触摸响应 */
}

/* 保留表单元素的文本选择能力 */
.form-input,
.form-textarea,
.domain-name {
  -webkit-user-select: text;
  -khtml-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

/* 减少动画模式支持 */
@media (prefers-reduced-motion: reduce) {
  .domain-card:active,
  .btn:active,
  .pagination-btn:active,
  .pagination-page:active,
  .modal-close:active,
  .theme-toggle-btn:active,
  .theme-option:active,
  .announcement:active,
  .footer-nav-link:active,
  .top-nav a:active,
  .back-to-top:active {
    transform: none !important;
  }
}
html,
body {
  height: 100%;
}
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.footer {
  margin-top: auto;
}
