/*
 * Global Site Styles
 *
 * Provides shared styling across the CMS. Includes scrollbar theming, base body
 * background/typography, shared buttons/cards/forms/tables, toast notifications,
 * utility classes, responsive defaults, and legacy compatibility styles used by
 * multiple public and GM pages.
 */

/* =============================================================================
   CUSTOM SCROLLBAR STYLES
   ============================================================================= */

/* WebKit browsers (Chrome, Safari, Edge) */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: linear-gradient(
    180deg,
    rgba(2, 9, 18, 0.98),
    rgba(4, 17, 30, 0.97)
  );
  border-left: 1px solid rgba(45, 110, 166, 0.18);
  box-shadow: inset 1px 0 rgba(255, 255, 255, 0.012);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(
    180deg,
    rgba(42, 171, 218, 0.9),
    rgba(17, 91, 139, 0.92)
  );
  border: 2px solid rgba(2, 11, 21, 0.98);
  border-radius: 3px;
  box-shadow:
    inset 0 1px 0 rgba(180, 239, 255, 0.2),
    0 0 8px rgba(32, 191, 243, 0.18);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(
    180deg,
    rgba(65, 207, 226, 0.98),
    rgba(25, 128, 174, 0.98)
  );
  box-shadow:
    inset 0 1px 0 rgba(216, 250, 255, 0.3),
    0 0 12px rgba(35, 201, 213, 0.3);
}

::-webkit-scrollbar-thumb:active {
  background: linear-gradient(
    180deg,
    rgba(38, 186, 209, 1),
    rgba(13, 103, 146, 1)
  );
}

::-webkit-scrollbar-corner {
  background: #020b15;
}

/* Firefox browser */
* {
  scrollbar-width: thin;
  scrollbar-color: #176d9d #030e1b;
}

/* Optional: Smooth scrolling for the whole page */
html {
  scroll-behavior: smooth;
}

/* =============================================================================
   GLOBAL BACKGROUND STYLES
   ============================================================================= */

/* Main body background with overlay */
body {
  position: relative;
  background: url("/assets/img/background.jpg") no-repeat center center fixed;
  background-size: cover;
  background-color: #0f111a;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.55);
  pointer-events: none;
  z-index: -1;
}

.report-page::before,
.report-page::after,
.armory-page::before,
.armory-page::after,
.players-page::before,
.players-page::after,
.vote-page::before,
.vote-page::after,
.voteshop-page::before,
.voteshop-page::after,
.legal-page::before,
.legal-page::after,
.cookie-page::before,
.cookie-page::after,
.profile-page::before,
.profile-page::after,
.daily-login-page::before,
.daily-login-page::after,
.downloads-page::before,
.downloads-page::after,
.leaderboards-page::before,
.leaderboards-page::after,
.my-reports-page::before,
.my-reports-page::after,
.my-report-view-page::before,
.my-report-view-page::after,
.report-view-page::before,
.report-view-page::after,
.security-center-page::before,
.security-center-page::after,
.security-page::before,
.security-page::after {
  content: none !important;
  display: none !important;
}

/* =============================================================================
   GLOBAL FOOTER
   ============================================================================= */

/* Sticky Footer */
html,
body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
}

html.reduced-motion *,
html.reduced-motion *::before,
html.reduced-motion *::after {
  scroll-behavior: auto !important;
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
}

html[data-effects="low"] .header-glow,
html[data-effects="low"] .header-bg-blur {
  opacity: 0.35;
}

html[data-effects="full"] .header-glow {
  opacity: 1;
  filter: saturate(1.2);
}

.content-wrapper {
  flex: 1 0 auto;
}

.frost-footer {
  flex-shrink: 0;
}

/* FROST FOOTER */
.frost-footer {
  position: relative;
  margin-top: 52px;
  padding: 20px 0 16px;
  overflow: hidden;
  color: #aebfd1;
  background:
    linear-gradient(180deg, rgba(5, 21, 38, 0.95), rgba(2, 10, 22, 0.97)),
    linear-gradient(
      90deg,
      rgba(2, 9, 20, 0.99),
      rgba(4, 17, 31, 0.98) 48%,
      rgba(1, 8, 18, 0.99)
    );
  border-top: 1px solid rgba(45, 110, 166, 0.34);
  box-shadow:
    inset 0 1px 0 rgba(91, 175, 231, 0.08),
    0 -16px 38px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(18px) saturate(125%);
}

.frost-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 3%,
    rgba(44, 130, 191, 0.22) 16%,
    rgba(35, 201, 213, 0.42) 52%,
    rgba(44, 130, 191, 0.22) 84%,
    transparent 97%
  );
  box-shadow: 0 2px 13px rgba(32, 191, 243, 0.13);
}

.frost-footer::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.16;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(105, 181, 238, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(105, 181, 238, 0.022) 1px, transparent 1px);
  background-size: 26px 26px;
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent,
    #000 12%,
    #000 88%,
    transparent
  );
  mask-image: linear-gradient(
    90deg,
    transparent,
    #000 12%,
    #000 88%,
    transparent
  );
}

.footer-inner {
  position: relative;
  z-index: 1;
  width: min(1760px, 100%);
  margin: 0 auto;
  padding: 0 48px;
}

.footer-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 36px;
}

.footer-identity {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 24px;
}

.footer-actions {
  display: grid;
  justify-items: end;
  gap: 10px;
}

.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 122px;
  height: 45px;
  text-decoration: none;
  transition:
    transform 180ms ease,
    filter 180ms ease;
}

.footer-brand:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
}

.footer-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 14px rgba(44, 158, 235, 0.22))
    drop-shadow(0 7px 12px rgba(0, 0, 0, 0.48));
}

/* Links as Buttons */
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.footer-btn {
  min-width: 84px;
  min-height: 30px;
  padding: 0 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #aab8ca;
  border: 1px solid rgba(65, 112, 153, 0.38);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(12, 31, 50, 0.52), rgba(6, 19, 34, 0.64)),
    rgba(4, 13, 25, 0.72);
  text-decoration: none;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  box-shadow:
    inset 0 1px 0 rgba(145, 198, 255, 0.06),
    0 0 0 1px rgba(3, 12, 24, 0.22);
  transition:
    color 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.footer-btn:hover,
.footer-btn:focus-visible {
  color: #e5f3ff;
  border-color: rgba(65, 166, 220, 0.62);
  background: rgba(15, 57, 87, 0.5);
  box-shadow: 0 0 18px rgba(27, 130, 190, 0.14);
  transform: translateY(-1px);
}

.footer-btn:focus-visible,
.footer-accent:focus-visible {
  outline: 2px solid rgba(79, 195, 239, 0.9);
  outline-offset: 3px;
}

.footer-btn.discord {
  color: #9caaff;
  border-color: rgba(88, 101, 242, 0.42);
  background:
    radial-gradient(
      circle at 50% 120%,
      rgba(88, 101, 242, 0.18),
      transparent 58%
    ),
    rgba(22, 25, 67, 0.24);
}

.footer-btn.discord:hover,
.footer-btn.discord:focus-visible {
  color: #cbd2ff;
  border-color: rgba(108, 122, 255, 0.72);
  background: rgba(45, 54, 139, 0.22);
  box-shadow: 0 0 18px rgba(88, 101, 242, 0.18);
}

.footer-btn i {
  margin-right: 6px;
  font-size: 0.86rem;
}

/* Powered By */
.footer-powered {
  color: #758ba1;
  font-size: 0.76rem;
}

.footer-accent {
  color: #4fc6ee;
  font-weight: 800;
  text-decoration: none;
  text-shadow: 0 0 12px rgba(39, 180, 235, 0.22);
  transition:
    color 180ms ease,
    text-shadow 180ms ease;
}

.footer-accent:hover,
.footer-accent:focus-visible {
  color: #a2ffed;
  text-shadow: 0 0 14px rgba(33, 206, 177, 0.28);
}

/* Copyright */
.footer-copy {
  color: #71869c;
  min-width: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.025em;
  line-height: 1.35;
  text-transform: uppercase;
}

/* Shared Toasts */
.site-toast-region {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 5000;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}

.site-toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 15px;
  border-radius: 14px;
  border: 1px solid rgba(125, 180, 255, 0.2);
  background: rgba(6, 18, 32, 0.96);
  color: #eaf4ff;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.42);
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
  pointer-events: auto;
}

.site-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.site-toast-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  color: #86efac;
  background: rgba(34, 197, 94, 0.14);
}

.site-toast.error .site-toast-icon {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.14);
}

.site-toast.warning .site-toast-icon {
  color: #fcd34d;
  background: rgba(245, 158, 11, 0.14);
}

.site-toast-message {
  min-width: 0;
  color: #dbeafe;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.35;
}

.footer-meta {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  justify-content: flex-end;
  color: #667b90;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.footer-meta span + span {
  position: relative;
}

.footer-meta span + span::before {
  content: "";
  position: absolute;
  left: -9px;
  top: 50%;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #257ca8;
  box-shadow: 0 0 7px rgba(37, 124, 168, 0.5);
  transform: translateY(-50%);
}

/* Responsive */
@media (max-width: 860px) {
  .footer-inner {
    padding: 0 20px;
  }

  .footer-main {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 16px;
  }

  .footer-identity {
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px 18px;
  }

  .footer-actions {
    justify-items: center;
  }

  .footer-links {
    justify-content: center;
  }

  .footer-meta {
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 576px) {
  .frost-footer {
    margin-top: 36px;
    padding: 20px 0 16px;
  }

  .footer-inner {
    padding: 0 14px;
  }

  .footer-links {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-btn {
    width: 100%;
    min-width: 0;
    min-height: 34px;
    padding: 0 10px;
    font-size: 0.68rem;
  }

  .footer-brand {
    width: 118px;
    height: 44px;
  }

  .footer-copy,
  .footer-meta {
    font-size: 0.64rem;
  }
}
