/* placeholder - styles moved to style.css */
/* ===== CSS Variables (Light / Dark) ===== */
:root {
  --bg: #f0f2f5;
  --surface: #ffffff;
  --surface2: #f8fafc;
  --border: rgba(16, 24, 40, 0.06);
  --text: #0f172a;
  --text2: #475569;
  --text3: #94a3b8;
  --accent: #2563eb;
  --accent2: #7c3aed;
  --accent-soft: rgba(37, 99, 235, 0.08);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(2, 6, 23, 0.06), 0 1px 4px rgba(2, 6, 23, 0.04);
  --shadow-lg:
    0 12px 36px rgba(2, 6, 23, 0.08), 0 4px 12px rgba(2, 6, 23, 0.04);
  --shadow-accent: 0 8px 24px rgba(37, 99, 235, 0.18);
  --header-h: 64px;
  --nav-h: 44px;
  --radius: 14px;
  --radius-sm: 8px;
  --unavail-bg: #fff6f6;
  --unavail-border: rgba(239, 68, 68, 0.1);
  --unavail-text: #dc2626;
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
[data-theme="dark"] {
  --bg: #0b0f1a;
  --surface: #151c2c;
  --surface2: #1a2235;
  --border: rgba(255, 255, 255, 0.06);
  --text: #f1f5f9;
  --text2: #94a3b8;
  --text3: #475569;
  --accent: #3b82f6;
  --accent2: #8b5cf6;
  --accent-soft: rgba(59, 130, 246, 0.12);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 12px 36px rgba(0, 0, 0, 0.35);
  --shadow-accent: 0 8px 24px rgba(59, 130, 246, 0.25);
  --unavail-bg: #1f1318;
  --unavail-border: rgba(239, 68, 68, 0.15);
  --unavail-text: #f87171;
}
/* ===== Reset ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
li {
  list-style: none;
}
body {
  background-color: var(--bg);
  color: var(--text);
  font-family:
    "Inter", "Noto Sans SC", "Microsoft YaHei", "PingFang SC", sans-serif;
  line-height: 1.6;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
  overflow-x: hidden;
}
/* ===== Scroll Progress Bar ===== */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent2), #ec4899);
  z-index: 10000;
  border-radius: 0 3px 3px 0;
  transition: width 0.1s linear;
}
/* ===== Container ===== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
  box-sizing: border-box;
}
/* ===== Ambient background blobs ===== */
body::before,
body::after {
  content: "";
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(80px);
  opacity: 0.25;
}
body::before {
  width: 600px;
  height: 600px;
  top: -200px;
  right: -200px;
  background: radial-gradient(circle, #7c3aed 0%, transparent 70%);
  animation: blob-drift 20s ease-in-out infinite alternate;
}
body::after {
  width: 500px;
  height: 500px;
  bottom: 20%;
  left: -150px;
  background: radial-gradient(circle, #2563eb 0%, transparent 70%);
  animation: blob-drift 25s ease-in-out infinite alternate-reverse;
}
[data-theme="dark"] body::before {
  opacity: 0.15;
}
[data-theme="dark"] body::after {
  opacity: 0.1;
}
@keyframes blob-drift {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(30px, 50px) scale(1.1);
  }
}
/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 999;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
  display: flex;
  align-items: center;
  transition:
    background 0.3s ease,
    box-shadow 0.3s ease,
    height 0.2s ease;
}
[data-theme="dark"] .header {
  background: rgba(15, 20, 35, 0.88);
}
.header.scrolled {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
  height: 56px;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}
/* ===== Logo ===== */
.logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  font-size: 22px;
  font-weight: 800;
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 50%, #ec4899 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -0.5px;
  position: relative;
  background-size: 200% 200%;
  animation: logo-shimmer 4s ease-in-out infinite;
}
@keyframes logo-shimmer {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}
.logo::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 2px;
  transition: width 0.3s ease;
}
.logo:hover::after {
  width: 100%;
}
/* ===== Header right controls ===== */
.header-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}
/* ===== Dark Mode Toggle ===== */
.theme-toggle {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface2);
  color: var(--text2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all var(--transition);
  flex-shrink: 0;
}
.theme-toggle:hover {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: rgba(37, 99, 235, 0.2);
  transform: rotate(15deg) scale(1.05);
}
/* ===== Search Box ===== */
.search-box.search {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  max-width: 420px;
  height: 40px;
  padding: 4px 4px 4px 14px;
  border-radius: 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition:
    box-shadow var(--transition),
    transform var(--transition),
    border-color var(--transition),
    background var(--transition);
}
.search-box.search:focus-within {
  box-shadow:
    0 0 0 3px rgba(37, 99, 235, 0.15),
    var(--shadow-md);
  border-color: var(--accent);
  transform: translateY(-1px);
  background: var(--surface);
}
.search-input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  height: 100%;
}
.search-input::placeholder {
  color: var(--text3);
}
.search-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  border: none;
  border-radius: 8px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  transition: all var(--transition);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}
.search-btn:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-accent);
}
.search-btn:active {
  transform: scale(0.94);
}
.clear-btn {
  background: transparent;
  border: none;
  color: var(--text3);
  cursor: pointer;
  font-size: 14px;
  padding: 4px;
  border-radius: 6px;
  opacity: 0;
  display: flex;
  align-items: center;
  transition: all var(--transition);
  pointer-events: none;
}
.clear-btn.visible {
  opacity: 1;
  pointer-events: auto;
}
.clear-btn:hover {
  color: var(--text);
  background: var(--accent-soft);
}
.search-count {
  font-size: 12px;
  color: var(--text3);
  white-space: nowrap;
  padding-right: 2px;
  transition: all 0.2s ease;
}
.search-count.has-results {
  color: var(--accent);
  font-weight: 600;
}
/* ===== Category Nav ===== */
.category-nav {
  position: sticky;
  top: var(--header-h);
  z-index: 998;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
  transition:
    top 0.2s ease,
    background 0.3s ease;
}
.header.scrolled ~ .category-nav {
  top: 56px;
}
[data-theme="dark"] .category-nav {
  background: rgba(15, 20, 35, 0.9);
}
.category-nav .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}
.category-list {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  padding: 6px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  white-space: nowrap;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.category-list::-webkit-scrollbar {
  height: 3px;
}
.category-list::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}
.category-list li a {
  display: inline-flex;
  align-items: center;
  padding: 5px 14px;
  border-radius: 20px;
  text-decoration: none;
  color: var(--text2);
  font-size: 13px;
  font-weight: 500;
  transition: all var(--transition);
  white-space: nowrap;
  border: 1px solid transparent;
}
.category-list li a:hover {
  color: var(--accent);
  background: var(--accent-soft);
}
.category-list li a.active {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: rgba(37, 99, 235, 0.15);
  font-weight: 600;
}
/* ===== Region Toggle ===== */
.region-toggle {
  margin: 10px 0 0;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 15px;
  padding-right: 15px;
  box-sizing: border-box;
}
.region-toggle-inner {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 0;
  flex-wrap: wrap;
}
.region-btn {
  padding: 7px 20px;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--surface);
  color: var(--text2);
  position: relative;
  overflow: hidden;
}
.region-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  opacity: 0;
  transition: opacity var(--transition);
  border-radius: inherit;
}
.region-btn span {
  position: relative;
  z-index: 1;
}
.region-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12);
}
.region-btn.active {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-color: transparent;
  color: white;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}
.region-btn.active:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}
.region-btn:active {
  transform: scale(0.96);
}
/* Donate logo */
.donate-logo {
  margin-left: auto;
  opacity: 0.6;
  transition:
    opacity var(--transition),
    transform var(--transition);
  display: inline-flex;
  align-items: center;
}
.donate-logo:hover {
  opacity: 1;
  transform: scale(1.12);
}
.donate-link {
  text-decoration: none;
  color: inherit;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text2);
}

.fas.fa-heart {
  color: red;
}
/* ===== Main Content ===== */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 15px 40px;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
}
/* ===== Tool Section ===== */
.tool-section {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  padding: 22px;
  margin-bottom: 18px;
  scroll-margin-top: 130px;
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.5s ease,
    transform 0.5s ease,
    box-shadow var(--transition);
}
.tool-section.visible {
  opacity: 1;
  transform: translateY(0);
}
.tool-section:hover {
  box-shadow: var(--shadow-lg);
}
/* Section focus flash (search jump) */
.section-focus {
  box-shadow:
    0 0 0 3px rgba(37, 99, 235, 0.2),
    var(--shadow-lg) !important;
  border-color: rgba(37, 99, 235, 0.25) !important;
}
/* ===== Section Title ===== */
.section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
  margin-left: 4px;
}
/* ===== Tool List Grid ===== */
.tool-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 10px;
}
/* ===== Tool Item ===== */
.tool-item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 11px 8px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  background: var(--surface2);
  border: 1px solid var(--border);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  /* Stagger set by JS */
  opacity: 0;
  transform: translateY(10px);
}
.tool-item.item-visible {
  opacity: 1;
  transform: translateY(0);
}
/* Shimmer overlay on hover */
.tool-item::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  opacity: 0;
  transition: opacity var(--transition);
  border-radius: inherit;
}
.tool-item:hover::before {
  opacity: 0.07;
}
.tool-item:hover {
  border-color: rgba(37, 99, 235, 0.25);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.12);
  transform: translateY(-4px) scale(1.02);
  color: var(--accent);
}
.tool-item:active {
  transform: scale(0.97) !important;
}
/* Ripple effect */
.tool-item .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.25);
  transform: scale(0);
  animation: ripple-anim 0.5s linear;
  pointer-events: none;
}
@keyframes ripple-anim {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Text highlight in search */
.highlight {
  background: linear-gradient(90deg, #fde68a, #fef08a);
  padding: 1px 3px;
  border-radius: 3px;
  color: #0f172a;
  font-weight: 700;
}
[data-theme="dark"] .highlight {
  color: #0f172a;
}
/* ===== Footer ===== */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 28px 0;
  margin-top: 20px;
  position: relative;
  z-index: 1;
}
.footer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}
.footer p {
  font-size: 13px;
  color: var(--text3);
}
.footer-links {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: center;
}
.footer-links a {
  text-decoration: none;
  color: var(--text2);
  font-size: 13px;
  padding: 4px 10px;
  border-radius: 6px;
  transition: all var(--transition);
}
.footer-links a:hover {
  color: var(--accent);
  background: var(--accent-soft);
}
.footer-links a.active {
  color: var(--accent);
  font-weight: 600;
}
/* ===== Back to top button ===== */
#back-to-top {
  position: fixed;
  bottom: 32px;
  right: 28px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.35);
  opacity: 0;
  transform: translateY(20px) scale(0.9);
  pointer-events: none;
  transition:
    opacity 0.3s ease,
    transform 0.3s ease,
    box-shadow 0.2s ease;
  z-index: 1000;
}
#back-to-top.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
#back-to-top:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 28px rgba(37, 99, 235, 0.45);
}
#back-to-top:active {
  transform: scale(0.95);
}
/* ===== Keyboard shortcut hint ===== */
#kb-hint {
  position: fixed;
  bottom: 84px;
  right: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 12px;
  color: var(--text2);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
  z-index: 999;
  line-height: 1.8;
  min-width: 170px;
}
#kb-hint.show {
  opacity: 1;
  transform: translateY(0);
}
#kb-hint kbd {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 11px;
  font-family: monospace;
  color: var(--text);
}
/* ===== Search count badge animation ===== */
@keyframes badge-pop {
  0% {
    transform: scale(0.7);
    opacity: 0;
  }
  60% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}
.search-count.pop {
  animation: badge-pop 0.25s ease forwards;
}
/* ===== Contact / About page helpers (preserved) ===== */
.about-content,
.cooperate-content,
.contact-content {
  line-height: 1.8;
  color: var(--text);
  font-size: 15px;
}
.about-content h3,
.cooperate-content h3,
.contact-content h3 {
  font-size: 18px;
  margin: 20px 0 10px;
  background-clip: text;
  background: linear-gradient(90deg, #0f3460, #059669);
  -webkit-background-clip: text;
  color: transparent;
  font-weight: 700;
}
.package-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin: 20px 0;
}
.package-item {
  background: var(--surface2);
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  border: 1px solid var(--border);
  transition: all var(--transition);
}
.package-item:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
}
.package-item h4 {
  font-size: 18px;
  color: var(--accent);
  margin-bottom: 15px;
}
.package-item .price {
  font-size: 20px;
  font-weight: bold;
  color: #ef4444;
  margin-top: 15px;
}
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin: 20px 0;
}
.contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
}
.contact-form {
  max-width: 600px;
  margin: 20px 0;
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.form-group label {
  font-weight: 600;
  color: var(--text);
}
.form-group input,
.form-group textarea {
  padding: 12px 15px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  background: var(--surface2);
  color: var(--text);
  transition: border-color var(--transition);
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
}
.submit-btn {
  padding: 12px 20px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  transition: all var(--transition);
}
.submit-btn:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: var(--shadow-accent);
}
.delete-ai {
  text-decoration: line-through;
  text-decoration-color: red;
}
.weixin-qrcode {
  width: 50px;
  height: 50px;
}
/* ===== Responsive ===== */
@media (max-width: 768px) {
  :root {
    --header-h: 60px;
  }
  .category-nav {
    top: var(--header-h) !important;
  }
  .category-list li a {
    padding: 5px 11px;
    font-size: 12px;
  }
  .tool-list {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
  }
  .tool-section {
    padding: 16px;
  }
  #back-to-top {
    bottom: 20px;
    right: 16px;
  }
}
@media (max-width: 480px) {
  .logo {
    font-size: 18px;
  }
  .tool-item {
    padding: 9px 6px;
    font-size: 12px;
  }
  .section-title {
    font-size: 14px;
  }
  .search-box.search {
    max-width: 200px;
  }
}
