/* ==========================================================================
   footer.css - 底部 widget + 抽屉 + 移动端 tab + 悬浮工具栏（Binance 深色）
   ========================================================================== */

/* --------------------------------------------------------------------------
   .site-footer
   -------------------------------------------------------------------------- */
[data-child-theme="binance"] .site-footer {
  background: linear-gradient(180deg, #0B0E11 0%, #06080A 100%);
  border-top: 1px solid var(--ri-border-color);
  margin-top: 3rem;
  padding: 2.5rem 0 1.5rem;
  position: relative;
  overflow: hidden;
  color: var(--ri-body-color);
}

[data-child-theme="binance"] .site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--ri-gold-gradient);
  opacity: 0.8;
}

/* 装饰光晕 */
[data-child-theme="binance"] .site-footer::after {
  content: '';
  position: absolute;
  bottom: -80px;
  right: -80px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(252, 213, 53, 0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
[data-child-theme="binance"] .site-footer .container {
  position: relative;
  z-index: 1;
}

/* --------------------------------------------------------------------------
   .site-footer 第一行 widget 区
   -------------------------------------------------------------------------- */
[data-child-theme="binance"] .site-footer .row {
  --bs-gutter-x: 1.5rem;
  --bs-gutter-y: 1.5rem;
}

[data-child-theme="binance"] .site-footer .logo-wrapper {
  margin-bottom: 1rem;
}
[data-child-theme="binance"] .site-footer .logo-wrapper img.logo {
  height: 36px;
  width: auto;
  max-width: 180px;
  filter: brightness(0) invert(1);
}

[data-child-theme="binance"] .site-footer .small {
  color: var(--ri-tertiary-color);
  line-height: 1.7;
}

[data-child-theme="binance"] .site-footer .widget-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
[data-child-theme="binance"] .site-footer .widget-links a {
  color: var(--ri-secondary-color);
  font-size: 0.875rem;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
[data-child-theme="binance"] .site-footer .widget-links a::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--ri-primary);
  opacity: 0;
  transition: opacity 0.2s ease;
}
[data-child-theme="binance"] .site-footer .widget-links a:hover {
  color: var(--ri-primary);
  transform: translateX(4px);
}
[data-child-theme="binance"] .site-footer .widget-links a:hover::before {
  opacity: 1;
}

/* 联系我们区 */
[data-child-theme="binance"] .site-footer .col-md-4:last-child > div {
  font-size: 0.875rem;
  color: var(--ri-body-color);
  line-height: 1.8;
}

/* --------------------------------------------------------------------------
   版权/IPC
   -------------------------------------------------------------------------- */
[data-child-theme="binance"] .site-footer .text-center.w-100 {
  padding-top: 1.5rem;
  border-top: 1px solid var(--ri-border-color);
  margin-top: 1.5rem;
  color: var(--ri-tertiary-color);
  font-size: 0.8rem;
}
[data-child-theme="binance"] .site-footer .text-center.w-100 a {
  color: var(--ri-primary);
}

/* 友情链接 */
[data-child-theme="binance"] .footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  padding: 1rem 0;
  border-top: 1px dashed var(--ri-border-color);
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--ri-tertiary-color);
}
[data-child-theme="binance"] .footer-links > span {
  font-weight: 600;
  color: var(--ri-body-color);
}
[data-child-theme="binance"] .footer-links ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}
[data-child-theme="binance"] .footer-links a {
  color: var(--ri-tertiary-color);
  transition: color 0.2s ease;
}
[data-child-theme="binance"] .footer-links a:hover {
  color: var(--ri-primary);
}

/* --------------------------------------------------------------------------
   移动端 footer 折叠
   -------------------------------------------------------------------------- */
[data-child-theme="binance"] .site-footer .footer-collapse {
  display: none;
}

@media (max-width: 991.98px) {
  [data-child-theme="binance"] .site-footer {
    padding: 1.5rem 0 1rem;
    margin-top: 1.5rem;
  }
  [data-child-theme="binance"] .site-footer .row.d-none.d-lg-flex {
    display: none !important;
  }
  [data-child-theme="binance"] .site-footer .footer-collapse {
    display: block;
  }
  [data-child-theme="binance"] .footer-collapse-item {
    border-bottom: 1px solid var(--ri-border-color);
    padding: 0.85rem 0;
  }
  [data-child-theme="binance"] .footer-collapse-item:first-child {
    border-top: 1px solid var(--ri-border-color);
  }
  [data-child-theme="binance"] .footer-collapse-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    color: var(--ri-emphasis-color);
    font-size: 0.95rem;
  }
  [data-child-theme="binance"] .footer-collapse-header::after {
    content: '\f107';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    transition: transform 0.2s ease;
    color: var(--ri-primary);
  }
  [data-child-theme="binance"] .footer-collapse-item.open .footer-collapse-header::after {
    transform: rotate(180deg);
  }
  [data-child-theme="binance"] .footer-collapse-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  [data-child-theme="binance"] .footer-collapse-item.open .footer-collapse-body {
    max-height: 600px;
    padding-top: 0.75rem;
  }
  [data-child-theme="binance"] .footer-collapse-body .widget-links {
    flex-direction: column;
    gap: 0.5rem;
  }
  [data-child-theme="binance"] .footer-collapse-body .widget-links a:hover {
    transform: none;
  }
  [data-child-theme="binance"] .site-footer .logo-wrapper {
    text-align: center;
  }
  [data-child-theme="binance"] .site-footer .footer-mobile-intro {
    text-align: center;
    margin-top: 1rem;
    color: var(--ri-tertiary-color);
    font-size: 0.85rem;
    line-height: 1.7;
  }
  [data-child-theme="binance"] .site-footer .footer-mobile-intro img.logo {
    display: block;
    margin: 0 auto 0.75rem;
  }
  [data-child-theme="binance"] .footer-links {
    justify-content: center;
    text-align: center;
  }
  [data-child-theme="binance"] .footer-links ul {
    justify-content: center;
  }
}

/* --------------------------------------------------------------------------
   .back-top 返回顶部
   -------------------------------------------------------------------------- */
[data-child-theme="binance"] .back-top {
  position: fixed;
  right: 1rem;
  bottom: 5.5rem;
  width: 44px;
  height: 44px;
  border-radius: var(--ri-border-radius);
  background: var(--ri-gold-gradient);
  color: #0B0E11;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.2s ease;
  z-index: 999;
  box-shadow: 0 6px 20px rgba(252, 213, 53, 0.4);
}
[data-child-theme="binance"] .back-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
[data-child-theme="binance"] .back-top:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(252, 213, 53, 0.6);
}

@media (max-width: 575.98px) {
  [data-child-theme="binance"] .back-top {
    right: 0.75rem;
    bottom: 5rem;
    width: 40px;
    height: 40px;
  }
}

/* --------------------------------------------------------------------------
   .rollbar 右侧悬浮工具栏（PC）
   -------------------------------------------------------------------------- */
[data-child-theme="binance"] .rollbar {
  position: fixed;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: var(--ri-secondary-bg);
  border-radius: var(--ri-border-radius-xl);
  padding: 0.5rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  border: 1px solid var(--ri-border-color);
  z-index: 99;
}
[data-child-theme="binance"] .rollbar .actions {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
[data-child-theme="binance"] .rollbar .actions li a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  width: 48px;
  padding: 0.45rem 0.25rem;
  border-radius: var(--ri-border-radius);
  font-size: 0.7rem;
  color: var(--ri-body-color);
  text-decoration: none;
  transition: all 0.2s ease;
}
[data-child-theme="binance"] .rollbar .actions li a i {
  font-size: 1rem;
  color: var(--ri-primary);
}
[data-child-theme="binance"] .rollbar .actions li a:hover {
  background: var(--ri-primary-soft);
  color: var(--ri-primary);
  transform: translateX(-2px);
}

@media (max-width: 991.98px) {
  [data-child-theme="binance"] .rollbar {
    display: none !important;
  }
}

/* --------------------------------------------------------------------------
   .dimmer 抽屉遮罩
   -------------------------------------------------------------------------- */
[data-child-theme="binance"] .dimmer {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
  z-index: 1040;
}
[data-child-theme="binance"] .dimmer.active {
  opacity: 1;
  visibility: visible;
}

/* --------------------------------------------------------------------------
   .off-canvas 移动端抽屉
   -------------------------------------------------------------------------- */
[data-child-theme="binance"] .off-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 85%;
  max-width: 320px;
  height: 100vh;
  background: var(--ri-secondary-bg);
  z-index: 1050;
  padding: 1.25rem;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  box-shadow: 8px 0 30px rgba(0, 0, 0, 0.5);
  border-right: 1px solid var(--ri-border-color);
}
[data-child-theme="binance"] .off-canvas.active {
  transform: translateX(0);
}

[data-child-theme="binance"] .off-canvas .canvas-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--ri-border-radius);
  background: var(--ri-tertiary-bg);
  color: var(--ri-body-color);
  cursor: pointer;
  transition: all 0.2s ease;
}
[data-child-theme="binance"] .off-canvas .canvas-close:hover {
  background: var(--ri-primary);
  color: #0B0E11;
}

[data-child-theme="binance"] .off-canvas .logo-wrapper {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--ri-border-color);
}
[data-child-theme="binance"] .off-canvas .logo-wrapper img.logo {
  height: 32px;
  filter: brightness(0) invert(1);
}

[data-child-theme="binance"] .off-canvas .mobile-menu {
  margin-top: 0.5rem;
}
[data-child-theme="binance"] .off-canvas .mobile-menu > ul,
[data-child-theme="binance"] .off-canvas .mobile-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
[data-child-theme="binance"] .off-canvas .mobile-menu li a {
  display: flex;
  align-items: center;
  padding: 0.75rem 0.5rem;
  color: var(--ri-body-color);
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: var(--ri-border-radius);
  transition: all 0.2s ease;
}
[data-child-theme="binance"] .off-canvas .mobile-menu li a:hover,
[data-child-theme="binance"] .off-canvas .mobile-menu li.current-menu-item a {
  background: var(--ri-primary-soft);
  color: var(--ri-primary);
  padding-left: 1rem;
}
[data-child-theme="binance"] .off-canvas .mobile-menu .sub-menu {
  padding-left: 0.85rem;
  border-left: 1px solid var(--ri-border-color);
  margin-left: 0.5rem;
  margin-top: 0.25rem;
}
[data-child-theme="binance"] .off-canvas .mobile-menu .sub-menu a {
  font-size: 0.875rem;
  padding: 0.5rem 0.4rem;
}

/* --------------------------------------------------------------------------
   .m-navbar 移动端底部 Tab 栏
   -------------------------------------------------------------------------- */
[data-child-theme="binance"] .m-navbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(11, 14, 17, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--ri-border-color);
  z-index: 1020;
  padding: 0.4rem 0 max(0.4rem, env(safe-area-inset-bottom));
  display: none;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
}

@media (max-width: 991.98px) {
  [data-child-theme="binance"] .m-navbar {
    display: block;
  }
  [data-child-theme="binance"] body.has-m-navbar {
    padding-bottom: 70px;
  }
}

[data-child-theme="binance"] .m-navbar ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: space-around;
  align-items: stretch;
}
[data-child-theme="binance"] .m-navbar ul li {
  flex: 1;
  text-align: center;
}
[data-child-theme="binance"] .m-navbar ul li a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  padding: 0.35rem 0.25rem;
  color: var(--ri-secondary-color);
  font-size: 0.7rem;
  text-decoration: none;
  transition: all 0.2s ease;
  border-radius: var(--ri-border-radius);
}
[data-child-theme="binance"] .m-navbar ul li a i {
  font-size: 1.15rem;
  color: var(--ri-secondary-color);
  transition: all 0.2s ease;
}
[data-child-theme="binance"] .m-navbar ul li a:hover i,
[data-child-theme="binance"] .m-navbar ul li a.active i,
[data-child-theme="binance"] .m-navbar ul li.current-menu-item a i {
  color: var(--ri-primary);
  transform: translateY(-1px);
}
[data-child-theme="binance"] .m-navbar ul li a:hover,
[data-child-theme="binance"] .m-navbar ul li a.active,
[data-child-theme="binance"] .m-navbar ul li.current-menu-item a {
  color: var(--ri-primary);
}

@media (max-width: 575.98px) {
  [data-child-theme="binance"] .m-navbar ul li a {
    font-size: 0.65rem;
  }
  [data-child-theme="binance"] .m-navbar ul li a i {
    font-size: 1.05rem;
  }
}