/* DREAMVFIA UNION global footer — stacked lockup + 5-track grid
   Source: site/_templates/global-footer.html
   Version: 20260914-sf3
*/

html[lang="en"] .site-footer .lang-zh,
html:not([lang="en"]) .site-footer .lang-en {
  display: none !important;
}

html[lang="en"] .site-footer .beian {
  display: none !important;
}

.site-footer {
  position: relative;
  z-index: 10;
  width: 100%;
  margin: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: #05070b;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.site-footer-inner,
.site-footer .footer-inner {
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
  width: 100%;
  max-width: var(--max, 1280px);
  margin: 0 auto;
  padding: clamp(48px, 6vw, 72px) clamp(20px, 4vw, 28px) clamp(28px, 4vw, 40px) !important;
  box-sizing: border-box;
  min-width: 0;
}

body:has(#rns-tactical-deck) .site-footer .footer-inner,
body:has(#rns-tactical-deck) .site-footer-inner,
body:has(#rnsTacticalPlayer) .site-footer .footer-inner,
body:has(#rnsTacticalPlayer) .site-footer-inner {
  padding-bottom: 108px !important;
}

@media (min-width: 1100px) and (max-width: 1560px) {
  body:has(#rns-tactical-deck.rns-deck-expanded) .sf-grid,
  body:has(#rns-tactical-deck.rns-deck-expanded) .sf-bottom,
  body:has(#rnsTacticalPlayer) .sf-grid,
  body:has(#rnsTacticalPlayer) .sf-bottom {
    padding-right: 228px;
  }
}

.sf-grid {
  display: grid;
  grid-template-columns: 200px repeat(4, minmax(0, 1fr));
  column-gap: clamp(20px, 2.8vw, 36px);
  row-gap: 32px;
  align-items: start;
  width: 100%;
  min-width: 0;
}

.sf-cols {
  display: contents;
}

.site-footer nav {
  display: flex !important;
  flex-wrap: nowrap !important;
  justify-content: flex-start !important;
  align-items: stretch !important;
  align-self: start !important;
  gap: 0 !important;
  text-transform: none !important;
  font-size: inherit !important;
  font-family: inherit !important;
  color: inherit !important;
  letter-spacing: inherit !important;
}

.sf-brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  max-width: 200px;
}

.sf-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}

.site-footer .footer-logo,
.site-footer .sf-mark {
  position: relative;
  width: 44px !important;
  height: 44px !important;
  flex: 0 0 44px !important;
  display: grid;
  place-items: center;
  isolation: isolate;
  border-radius: 9px;
  overflow: hidden;
  cursor: pointer;
  background: radial-gradient(circle at 50% 50%, rgba(255, 31, 61, 0.22) 0%, rgba(5, 7, 11, 0.7) 72%);
  border: 1px solid rgba(255, 31, 61, 0.38) !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45), inset 0 0 10px rgba(255, 31, 61, 0.16) !important;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
              border-color 0.3s ease,
              box-shadow 0.3s ease;
}

.site-footer .footer-logo:hover,
.site-footer .sf-lockup:hover .footer-logo {
  transform: translateY(-1px) scale(1.04);
  border-color: rgba(255, 31, 61, 0.7) !important;
  box-shadow: 0 8px 26px rgba(255, 31, 61, 0.28), inset 0 0 14px rgba(255, 31, 61, 0.22) !important;
}

.site-footer .footer-quantum-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  pointer-events: none;
}

.site-footer .footer-mark-crystal {
  width: 30px !important;
  height: 30px !important;
  object-fit: contain;
  position: relative;
  z-index: 1;
  display: block;
  opacity: 0.92 !important;
  filter: drop-shadow(0 0 8px rgba(255, 31, 61, 0.55));
  transition: opacity 0.3s ease, filter 0.3s ease;
}

.site-footer .footer-logo:hover .footer-mark-crystal,
.site-footer .sf-lockup:hover .footer-mark-crystal {
  opacity: 1 !important;
  filter: drop-shadow(0 0 12px rgba(255, 31, 61, 0.85))
          drop-shadow(0 0 6px rgba(0, 243, 255, 0.28));
}

.sf-wordmark {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  min-width: 0;
  max-width: 140px;
}

.sf-primary {
  display: block;
  margin: 0;
  font-family: var(--font-display, "Venus Rising", "Arial Black", sans-serif);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.05;
  color: #ff1f3d;
  text-shadow: 0 0 16px rgba(255, 31, 61, 0.42);
  white-space: nowrap;
}

html:not([lang="en"]) .sf-primary.lang-zh {
  font-family: var(--font-cn-title, "Shizuka-Glitch-Mincho", serif);
  font-size: 18px;
  letter-spacing: 0.12em;
}

.sf-secondary {
  display: block;
  margin: 0;
  font-family: var(--font-hud, var(--font-control, "Consolas", monospace));
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.34em;
  line-height: 1;
  text-transform: uppercase;
  color: rgba(0, 243, 255, 0.82);
  text-shadow: 0 0 8px rgba(0, 243, 255, 0.28);
  white-space: nowrap;
}

html:not([lang="en"]) .sf-secondary.lang-zh {
  letter-spacing: 0.18em;
}

.sf-lockup:hover .sf-primary {
  text-shadow: 0 0 22px rgba(255, 31, 61, 0.7), 0 0 8px rgba(0, 243, 255, 0.22);
}

.site-footer p {
  margin: 0 !important;
  max-width: none !important;
  color: inherit;
  line-height: inherit;
}

.sf-tagline {
  margin: 0 !important;
  max-width: 200px !important;
  font-family: var(--font-control, -apple-system, sans-serif);
  font-size: 12px;
  line-height: 1.55;
  color: rgba(148, 163, 184, 0.72);
  letter-spacing: 0.01em;
}

.sf-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.sf-col-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sf-col-index {
  font-family: var(--font-hud, var(--font-mono, "JetBrains Mono", monospace));
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: rgba(148, 163, 184, 0.55);
}

.sf-col-title {
  font-family: var(--font-hud, var(--font-mono, "JetBrains Mono", monospace));
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(0, 243, 255, 0.88);
  text-shadow: 0 0 8px rgba(0, 243, 255, 0.28);
  line-height: 1.2;
}

.sf-col-nav {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  justify-content: flex-start !important;
}

.sf-col-nav a {
  display: block !important;
  min-width: 0;
  padding: 1px 0 1px 0 !important;
  font-family: var(--font-sans, var(--font-body, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif));
  font-size: 13px !important;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0.02em !important;
  color: rgba(226, 232, 240, 0.72) !important;
  text-decoration: none !important;
  text-transform: none !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border: 0 !important;
  border-left: 2px solid transparent !important;
  background: none !important;
  box-shadow: none !important;
  transform: none !important;
  transition: color 0.2s ease, border-color 0.2s ease, padding-left 0.2s ease, text-shadow 0.2s ease;
}

.sf-col-nav a::before,
.sf-col-nav a::after {
  content: none !important;
  display: none !important;
  width: 0 !important;
  margin: 0 !important;
}

.sf-col-nav a:hover,
.sf-col-nav a:focus-visible {
  color: #ff2a4a;
  text-shadow: 0 0 10px rgba(255, 42, 74, 0.45);
  border-left-color: #ff2a4a;
  padding-left: 8px;
}

.sf-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  width: 100%;
  margin-top: clamp(32px, 4.5vw, 48px);
  padding-top: clamp(20px, 3vw, 28px);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.sf-legal {
  margin: 0;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  color: rgba(220, 228, 240, 0.72);
  font-size: 12px;
  line-height: 1.4;
}

.sf-legal-nav {
  display: inline-flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 4px 0 !important;
  text-transform: none !important;
}

.sf-legal-nav a {
  color: rgba(163, 173, 186, 0.88) !important;
  font-size: 12px !important;
  text-decoration: none !important;
  text-transform: none !important;
  letter-spacing: 0.02em !important;
  padding: 0 10px !important;
  border: 0 !important;
  border-left: 1px solid rgba(255, 255, 255, 0.1) !important;
  background: none !important;
  transition: color 0.2s ease;
}

.sf-legal-nav a:first-child {
  border-left: 0;
  padding-left: 0;
}

.sf-legal-nav a:hover,
.sf-legal-nav a:focus-visible {
  color: #ff4d66;
}

.site-footer .footer-version-badge,
.site-footer .version-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border: 1px solid rgba(255, 31, 61, 0.35);
  border-radius: 999px;
  background: rgba(255, 31, 61, 0.08);
  font-family: var(--font-hud, var(--font-mono, monospace));
  font-size: 10px;
  font-weight: 600;
  color: #ff4d66;
  letter-spacing: 0.08em;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.site-footer .footer-version-badge:hover,
.site-footer .version-badge:hover {
  border-color: rgba(255, 31, 61, 0.65);
  background: rgba(255, 31, 61, 0.16);
  color: #fff;
}

.site-footer .serial-status-led {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #00ff66;
  box-shadow: 0 0 6px #00ff66;
  animation: sfPulseLed 2s infinite ease-in-out;
  flex-shrink: 0;
}

@keyframes sfPulseLed {
  0%, 100% { opacity: 1; box-shadow: 0 0 6px #00ff66; }
  50% { opacity: 0.4; box-shadow: 0 0 2px #00ff66; }
}

.site-footer .beian {
  margin-left: auto;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  color: rgba(148, 163, 184, 0.6);
  font-family: var(--font-control, Consolas, monospace);
  font-size: 12px;
  line-height: 1.4;
}

.site-footer .beian a {
  color: #e2e8f0;
  text-decoration: none;
  border-bottom: 1px solid rgba(99, 211, 255, 0.42);
}

.site-footer .beian-sep {
  color: rgba(163, 173, 186, 0.4);
  user-select: none;
}

@media (max-width: 1099px) {
  .sf-grid {
    grid-template-columns: 1fr;
  }

  .sf-cols {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 24px;
  }

  .sf-brand {
    max-width: none;
  }

  .sf-tagline {
    max-width: 36ch;
  }
}

@media (max-width: 640px) {
  .sf-cols {
    gap: 22px 16px;
  }

  .sf-primary {
    font-size: 14px;
  }

  .sf-col-nav a {
    font-size: 13px;
  }

  .sf-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-footer .beian {
    margin-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-footer .footer-logo,
  .site-footer .footer-mark-crystal,
  .site-footer .serial-status-led,
  .sf-col-nav a {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }
}
