.footer-modern {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.15rem;
}

.footer-social {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.62rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: rgba(255, 255, 255, 0.82) !important;
  text-decoration: none;
  margin: 0 !important;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.footer-social a:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.24);
  transform: translateY(-1px);
}

.footer-social span {
  color: rgba(255, 255, 255, 0.44);
  font-size: 0.72em;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem 1rem;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.footer-legal button,
.footer-legal a {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  color: rgba(255, 255, 255, 0.48) !important;
  font: inherit;
  font-size: 0.78rem;
  text-decoration: none;
  cursor: pointer;
}

.footer-legal button:hover,
.footer-legal a:hover {
  color: rgba(255, 255, 255, 0.76) !important;
  text-decoration: underline;
  text-underline-offset: 0.28em;
}

.footer-copy {
  color: rgba(255, 255, 255, 0.34);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
}

.legal-inline-link {
  color: #7a60c0;
  text-decoration: none;
  cursor: pointer;
}

.legal-inline-link:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.legal-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(18, 15, 31, 0.58);
  backdrop-filter: blur(8px);
}

.legal-popup-overlay.open {
  display: flex;
}

.legal-popup {
  width: min(760px, 100%);
  max-height: min(82vh, 760px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin: 0;
  padding: 0 !important;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 28px 80px rgba(15, 12, 30, 0.32);
}

.legal-popup-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.05rem 1.25rem;
  border-bottom: 1px solid rgba(93, 80, 120, 0.14);
}

.legal-popup-kicker {
  color: #7a60c0;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.legal-popup-title {
  margin-top: 0.15rem;
  color: #1f1b2d;
  font-size: 1.15rem;
  font-weight: 700;
}

.legal-popup-close {
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  border-radius: 999px;
  background: rgba(122, 96, 192, 0.1);
  color: #4b4169;
  cursor: pointer;
  font-size: 1.3rem;
  line-height: 1;
}

.legal-popup-close:hover {
  background: rgba(122, 96, 192, 0.18);
}

.legal-popup-body {
  overflow: auto;
  padding: 1.25rem;
  color: #3f394c;
  font-size: 0.92rem;
  line-height: 1.8;
}

.legal-popup-body h3 {
  margin: 1.3rem 0 0.35rem;
  color: #1f1b2d;
  font-size: 0.98rem;
}

.legal-popup-body h3:first-child {
  margin-top: 0;
}

.legal-popup-body p {
  margin: 0 0 0.75rem;
}

.legal-popup-body ul {
  margin: 0.35rem 0 0.85rem;
  padding-left: 1.1rem;
}

@media (max-width: 640px) {
  .footer-social {
    flex-direction: column;
    width: min(320px, 100%);
  }

  .footer-social a {
    justify-content: center;
  }

  .footer-legal {
    width: min(320px, 100%);
  }

  .legal-popup-overlay {
    align-items: flex-end;
    padding: 0.75rem;
  }

  .legal-popup {
    max-height: 86vh;
    border-radius: 18px 18px 12px 12px;
  }
}
