:root {
  --footer-bg: #0f111a;
  --footer-text: #d9dee7;
  --footer-muted: #9aa3b6;
  --footer-accent: #ff6a00;
  --footer-border: rgba(255, 255, 255, 0.12);
}

.site-footer {
  background: linear-gradient(135deg, #0b0f17, #141b29);
  color: var(--footer-text);
  padding: 48px 24px 32px;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  position: relative;
  overflow: hidden;
}

/* 分子结构科技感背景装饰 */
.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(circle at 15% 25%, rgba(255, 106, 0, 0.06) 0%, transparent 20%),
    radial-gradient(circle at 85% 75%, rgba(255, 106, 0, 0.05) 0%, transparent 20%),
    radial-gradient(circle at 50% 50%, rgba(255, 106, 0, 0.04) 0%, transparent 25%);
  background-size: 100% 100%;
  pointer-events: none;
  z-index: 0;
}

.site-footer::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(30deg, transparent 48%, rgba(255, 106, 0, 0.05) 49%, rgba(255, 106, 0, 0.05) 51%, transparent 52%),
    linear-gradient(150deg, transparent 48%, rgba(255, 106, 0, 0.05) 49%, rgba(255, 106, 0, 0.05) 51%, transparent 52%);
  background-size: 150px 150px;
  background-position: 0 0, 75px 75px;
  opacity: 0.4;
  pointer-events: none;
  z-index: 0;
}

.footer-top {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.footer-block {
  flex: 1;
  min-width: 240px;
  position: relative;
  z-index: 1;
}

.footer-block h2 {
  margin: 0 0 16px;
  font-size: 1.5rem;
  letter-spacing: 0.05em;
}

.footer-block p {
  margin: 0;
  line-height: 1.8;
  color: var(--footer-muted);
}

.contact-label {
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--footer-accent);
  margin-bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.qr-wrap {
  display: flex;
  gap: 16px;
}

.qr-card {
  width: 120px;
  height: 140px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 16px;
  padding: 10px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: visible;
}

.qr-card img {
  width: 100%;
  height: 100px;
  object-fit: contain;
  border-radius: 12px;
  transition: transform 0.3s ease;
}

.qr-card figcaption {
  font-size: 0.85rem;
  color: var(--footer-text);
}

.qr-card:hover {
  z-index: 10;
}

.qr-card:hover img {
  transform: scale(2.5);
  z-index: 10;
  position: relative;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  background: #fff;
  padding: 8px;
  border-radius: 12px;
}

.qr-card--focus {
  outline: 2px solid var(--footer-accent);
  outline-offset: 4px;
  z-index: 10;
}

.qr-card--focus img {
  transform: scale(2.5);
  z-index: 10;
  position: relative;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  background: #fff;
  padding: 8px;
  border-radius: 12px;
}

.tip {
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--footer-muted);
}

.links ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.links a {
  color: var(--footer-text);
  text-decoration: none;
  position: relative;
  padding-left: 16px;
  transition: color 0.2s ease, padding-left 0.2s ease;
  display: inline-block;
}

.links a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 6px;
  height: 6px;
  background: var(--footer-accent);
  border-radius: 50%;
  transform: translateY(-50%);
  transition: transform 0.2s ease, width 0.2s ease, height 0.2s ease;
}

.links a:hover {
  color: var(--footer-accent);
  padding-left: 20px;
}

.links a:hover::before {
  width: 8px;
  height: 8px;
  transform: translateY(-50%) scale(1.2);
}

.footer-divider {
  max-width: 1200px;
  margin: 32px auto;
  border-bottom: 1px solid var(--footer-border);
  position: relative;
  z-index: 1;
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  position: relative;
  z-index: 1;
}

.footer-bottom a {
  color: var(--footer-text);
  text-decoration: none;
  font-weight: 500;
}

.footer-bottom a:hover {
  color: var(--footer-accent);
}

.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin: 0;
}

[data-footer-year] {
  margin-right: 16px;
}

.qr-popover {
  position: fixed;
  width: 180px;
  height: 200px;
  padding: 12px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.qr-popover.visible {
  display: flex;
}

.qr-popover img {
  width: 100%;
  height: 150px;
  object-fit: contain;
  border-radius: 12px;
}

.qr-popover p {
  margin: 8px 0 0;
  color: #0f0f0f;
  font-weight: 600;
}

.footer-fab {
  position: fixed;
  right: 36px;
  bottom: 120px;
  display: flex;
  flex-direction: column;
  background: rgba(255, 140, 55, 0.95);
  border-radius: 12px;
  padding: 0;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  z-index: 1500;
  overflow: hidden;
  min-width: 64px;
}

.fab-item {
  width: 64px;
  min-height: 56px;
  border: none;
  background: transparent;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 0.85rem;
  padding: 8px 4px;
}

/* SVG 图标样式 */
.fab-icon {
  width: 24px;
  height: 24px;
  display: block;
  fill: currentColor;
  transition: transform 0.2s ease;
}

.fab-item:hover .fab-icon {
  transform: scale(1.1);
}

.fab-item[data-fab="top"] .fab-icon {
  width: 20px;
  height: 20px;
}

.fab-item span {
  font-size: 0.75rem;
}

.fab-item + .fab-item::after {
  content: "";
  position: absolute;
  top: 0;
  left: 8px;
  right: 8px;
  height: 1px;
  background: rgba(255, 255, 255, 0.3);
}

.fab-item:hover {
  background: rgba(255, 255, 255, 0.15);
}

.fab-top {
  color: #fff;
}

.fab-qr-popover {
  position: fixed;
  width: 200px;
  height: 240px;
  padding: 16px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  pointer-events: auto;
}

.fab-qr-popover.visible {
  display: flex;
}

.fab-qr-popover img {
  width: 100%;
  height: 180px;
  object-fit: contain;
  border-radius: 12px;
}

.fab-qr-popover p {
  margin: 12px 0 0;
  color: #0f0f0f;
  font-weight: 600;
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .site-footer {
    padding: 32px 16px;
  }
  .footer-top {
    flex-direction: column;
  }
  .qr-wrap {
    justify-content: flex-start;
  }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
  .footer-fab {
    right: 16px;
    bottom: 40px;
  }
}

