/* ============================================================
   APEX FOOTER v2 — editorial, watermark, IP pill, status indicator
   ============================================================ */

/* Hide all old footer variants */
.gaming-footer { display: none !important; }

.apex-footer {
  position: relative;
  z-index: 2;
  background:
    linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.4)),
    linear-gradient(165deg, #0a0805 0%, #050308 100%);
  border-top: 1px solid rgba(var(--theme-primary-rgb), 0.18);
  overflow: hidden;
  font-family: var(--font-body);
}

/* Decorative gradient strip on top */
.apex-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--theme-primary) 50%, transparent);
}

.apex-footer__top {
  position: relative;
  padding: 80px 28px 50px;
}

/* Huge watermark behind */
.apex-footer__watermark {
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(8rem, 22vw, 22rem);
  letter-spacing: -0.05em;
  color: transparent;
  -webkit-text-stroke: 2px rgba(var(--theme-primary-rgb), 0.07);
  white-space: nowrap;
  pointer-events: none;
  z-index: 0;
  line-height: 1;
}

.apex-footer__inner {
  max-width: 1440px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1fr 1.4fr;
  gap: 3rem;
  position: relative;
  z-index: 1;
}

/* BRAND */
.apex-footer__brand { display: flex; flex-direction: column; gap: 1.25rem; }
.apex-footer__logo {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: #fff;
}
.apex-footer__logo img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  filter: drop-shadow(0 6px 24px rgba(var(--theme-primary-rgb), 0.4));
}
.apex-footer__logo span {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 2rem;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  background: linear-gradient(180deg, #fff 30%, var(--theme-primary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
}
.apex-footer__about {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.92rem;
  line-height: 1.65;
  margin: 0;
  max-width: 340px;
}

.apex-footer__ip {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.apex-footer__ip-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
}
.apex-footer__ip-pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  background: #000;
  border: 1px solid rgba(var(--theme-primary-rgb), 0.4);
  border-radius: 999px;
  cursor: pointer;
  color: #fff;
  font-family: inherit;
  width: fit-content;
  transition: all 0.25s ease;
}
.apex-footer__ip-pill code {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
}
.apex-footer__ip-pill i {
  color: var(--theme-primary);
  font-size: 0.85rem;
}
.apex-footer__ip-pill:hover {
  border-color: var(--theme-primary);
  background: rgba(var(--theme-primary-rgb), 0.06);
  transform: translateX(2px);
}
.apex-footer__ip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 10px #10b981, 0 0 0 3px rgba(16, 185, 129, 0.18);
  animation: footerPulse 1.6s ease-in-out infinite;
}
@keyframes footerPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

/* COLUMNS */
.apex-footer__col h4 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--theme-primary);
  margin: 0 0 1.25rem;
  position: relative;
  padding-bottom: 0.75rem;
}
.apex-footer__col h4::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 24px;
  height: 2px;
  background: linear-gradient(90deg, var(--theme-primary), transparent);
}
.apex-footer__col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.apex-footer__col a {
  font-family: var(--font-body);
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.25s ease;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.apex-footer__col a::before {
  content: "";
  width: 0;
  height: 1px;
  background: var(--theme-primary);
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.apex-footer__col a:hover {
  color: var(--theme-primary);
}
.apex-footer__col a:hover::before { width: 12px; }
.apex-footer__discord-link i { color: #5865F2 !important; }

/* CTA column */
.apex-footer__cta {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-start;
}
.apex-footer__status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #34d399;
}
.apex-footer__status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: footerPulse 1.6s ease-in-out infinite;
}

.apex-footer__socials {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.apex-footer__social {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  font-size: 1.05rem;
  position: relative;
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
}
.apex-footer__social::before {
  content: "";
  position: absolute; inset: 0;
  background: var(--social-grad, linear-gradient(135deg, var(--theme-primary), var(--theme-accent)));
  opacity: 0;
  transition: opacity 0.35s;
  z-index: 0;
}
.apex-footer__social i { position: relative; z-index: 1; transition: transform 0.35s; }
.apex-footer__social:hover {
  transform: translateY(-4px) scale(1.06);
  border-color: var(--social-color, var(--theme-primary));
  color: #fff;
  box-shadow: 0 12px 28px var(--social-shadow, rgba(250, 204, 21, 0.35));
}
.apex-footer__social:hover::before { opacity: 1; }
.apex-footer__social:hover i { transform: scale(1.15); }
.apex-footer__social--discord { --social-grad: linear-gradient(135deg, #5865F2, #404eed); --social-color: #5865F2; --social-shadow: rgba(88,101,242,0.45); }
.apex-footer__social--youtube { --social-grad: linear-gradient(135deg, #ff0000, #cc0000); --social-color: #ff0000; --social-shadow: rgba(255,0,0,0.45); }
.apex-footer__social--ig      { --social-grad: linear-gradient(135deg, #fcaf45, #e1306c 50%, #833ab4); --social-color: #e1306c; --social-shadow: rgba(225,48,108,0.45); }
.apex-footer__social--tt      { --social-grad: linear-gradient(135deg, #25f4ee, #fe2c55); --social-color: #fe2c55; --social-shadow: rgba(254,44,85,0.45); }
.apex-footer__social--twitch  { --social-grad: linear-gradient(135deg, #9146ff, #6441a5); --social-color: #9146ff; --social-shadow: rgba(145,70,255,0.45); }

.apex-footer__join {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--theme-primary), var(--theme-accent));
  color: #0a0805;
  text-decoration: none;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 400;
  box-shadow: 0 14px 30px -8px rgba(var(--theme-primary-rgb), 0.5);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.apex-footer__join:hover { transform: translateY(-2px) translateX(2px); }

/* BOTTOM BAR */
.apex-footer__bottom {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.apex-footer__bottom-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.04em;
}
.apex-footer__copy {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.apex-footer__copy strong {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  color: #fff;
}
.apex-footer__year {
  font-family: var(--font-mono);
  color: var(--theme-primary);
  font-weight: 700;
}
.apex-footer__sep { opacity: 0.4; }
.apex-footer__made { color: rgba(255, 255, 255, 0.35); }
.apex-footer__brandlink {
  font-weight: 700;
  color: var(--theme-primary);
  text-decoration: none;
  background:
    linear-gradient(135deg, var(--theme-primary), var(--theme-accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
  transition: all 0.3s ease;
}
.apex-footer__brandlink::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: linear-gradient(90deg, var(--theme-primary), var(--theme-accent));
  transform: scaleX(0);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.apex-footer__brandlink:hover::after { transform: scaleX(1); }

/* RESPONSIVE */
@media (max-width: 1100px) {
  .apex-footer__inner { grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
  .apex-footer__cta { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: center; }
}
@media (max-width: 760px) {
  .apex-footer__top { padding: 60px 20px 40px; }
  .apex-footer__inner { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .apex-footer__brand { grid-column: 1 / -1; }
  .apex-footer__cta { grid-column: 1 / -1; }
  .apex-footer__bottom-inner { padding: 18px 20px; flex-direction: column; text-align: center; gap: 0.5rem; }
}
@media (max-width: 480px) {
  .apex-footer__inner { grid-template-columns: 1fr; }
  .apex-footer__cta { flex-direction: column; align-items: flex-start; }
  .apex-footer__about { max-width: none; }
  .apex-footer__watermark { font-size: 7rem; }
}
