/* css/icerank-shell.css */
/* IceRank shared shell: background, nav, footer, legal modal, auth UI */
/* Version: 20260525-shell-1 */

:root {
  --bg: #020617;
  --bg2: #07111f;
  --text: #f8fafc;
  --muted: #94a3b8;
  --dim: #64748b;
  --accent: #38bdf8;
  --good: #34d399;
  --bad: #fb7185;
  --font-display: 'Barlow Condensed', sans-serif;
  --font-body: 'Barlow', sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #020617 !important;
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  overflow-x: hidden;
  color: var(--text);
  font-family: var(--font-body);
  background:
    radial-gradient(circle at 18% 0%, rgba(56,189,248,0.11), transparent 34%),
    radial-gradient(circle at 84% 16%, rgba(59,130,246,0.075), transparent 31%),
    radial-gradient(circle at 50% 100%, rgba(14,165,233,0.045), transparent 42%),
    linear-gradient(180deg, #07111f 0%, #06101d 42%, #020617 100%) !important;
  background-attachment: fixed !important;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.022) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.52), transparent 82%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.52), transparent 82%);
}

main,
header,
section,
.site-footer {
  position: relative;
  z-index: 2;
}

/* -------------------------------
   Shared top nav
-------------------------------- */

.nav-bar {
  position: sticky;
  top: 0;
  z-index: 99999;
  min-height: calc(56px + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) 14px 6px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(2, 6, 23, 0.94);
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.nav-logo-link {
  width: 42px;
  height: 42px;
  min-width: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.nav-logo-link img {
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 1px solid rgba(56, 189, 248, 0.34);
}

.nav-links {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 3px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.nav-links::-webkit-scrollbar {
  display: none;
}

.nav-links a {
  flex: 0 0 auto;
  color: #64748b;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1;
  padding: 9px 11px;
  border-radius: 11px;
  white-space: nowrap;
  transition: color 0.15s ease, background 0.15s ease;
}

.nav-links a:hover {
  color: #f8fafc;
  background: rgba(255,255,255,0.06);
}

.nav-links a.active {
  color: #38bdf8;
  background: rgba(56,189,248,0.11);
}

.nav-auth {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.nav-username {
  display: none !important;
}

.nav-avatar-btn {
  position: relative;
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 50%;
  border: none;
  background: rgba(30,41,59,0.8);
  cursor: pointer;
  padding: 0;
  display: none;
}

.nav-avatar-img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 1.5px solid #38bdf8;
}

.nav-avatar-signout {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.52rem;
  font-weight: 900;
  color: #fff;
  opacity: 0;
  background: rgba(239,68,68,0.88);
  transition: opacity 0.2s ease;
}

.nav-avatar-btn:hover .nav-avatar-img {
  opacity: 0.38;
}

.nav-avatar-btn:hover .nav-avatar-signout {
  opacity: 1;
}

.nav-signin-btn {
  display: none;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 10px;
  background: rgba(56,189,248,0.07);
  border: 1px solid rgba(56,189,248,0.30);
  color: #38bdf8;
  font-size: 0.72rem;
  font-weight: 900;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

/* -------------------------------
   Shared footer + legal
-------------------------------- */

.site-footer {
  width: 100%;
  margin-top: 56px;
  padding: 26px 16px 34px;
  border-top: 1px solid rgba(125, 211, 252, 0.12);
  background:
    radial-gradient(circle at top, rgba(56, 189, 248, 0.08), transparent 42%),
    rgba(2, 8, 23, 0.42);
  text-align: center;
}

.footer-inner {
  width: min(780px, 100%);
  margin: 0 auto;
  padding: 18px 16px;
  border: 1px solid rgba(125, 211, 252, 0.12);
  border-radius: 22px;
  background: rgba(8, 18, 34, 0.42);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
}

.footer-brand-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: rgba(248, 251, 255, 0.9);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.footer-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #38bdf8;
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.85);
}

.footer-brand {
  color: rgba(248, 251, 255, 0.94);
}

.footer-copy {
  color: rgba(148, 163, 184, 0.82);
  font-weight: 800;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 10px;
  margin-top: 10px;
  color: rgba(148, 163, 184, 0.65);
  font-size: 13px;
}

.footer-links a {
  color: rgba(125, 211, 252, 0.92);
  text-decoration: none;
  font-weight: 900;
}

.footer-links a:hover {
  color: rgba(186, 230, 253, 1);
  text-decoration: underline;
}

.footer-disclaimer {
  max-width: 520px;
  margin: 12px auto 0;
  color: rgba(203, 213, 225, 0.56);
  font-size: 11px;
  line-height: 1.45;
}

.legal-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(0, 8, 18, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.legal-overlay.active {
  display: flex;
}

.legal-box {
  position: relative;
  width: min(860px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  border: 1px solid rgba(125, 211, 252, 0.24);
  border-radius: 22px;
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(9, 20, 38, 0.98), rgba(2, 8, 20, 0.98));
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  padding: 24px;
  color: rgba(232, 244, 255, 0.92);
  text-align: left;
}

.legal-close {
  position: sticky;
  top: 0;
  float: right;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.88);
  color: rgba(232, 244, 255, 0.9);
  font-size: 24px;
  line-height: 28px;
  cursor: pointer;
}

.legal-close:hover {
  border-color: rgba(125, 211, 252, 0.65);
  background: rgba(15, 23, 42, 1);
}

.legal-title {
  margin: 2px 42px 18px 0;
  font-family: var(--font-display, "Barlow Condensed", system-ui, sans-serif);
  font-size: 24px;
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #f8fbff;
}

.legal-intro {
  margin: -6px 0 18px;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(203, 213, 225, 0.82);
}

.legal-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.legal-section-title {
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: rgba(125, 211, 252, 0.95);
}

.legal-section-body {
  font-size: 13px;
  line-height: 1.62;
  color: rgba(226, 232, 240, 0.84);
}

.legal-section-body a {
  color: rgba(125, 211, 252, 0.95);
  font-weight: 800;
  text-decoration: none;
}

.legal-section-body a:hover {
  text-decoration: underline;
}

.legal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.legal-action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(125, 211, 252, 0.28);
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.1);
  color: rgba(232, 244, 255, 0.94);
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.legal-action-link:hover {
  background: rgba(14, 165, 233, 0.18);
  border-color: rgba(125, 211, 252, 0.55);
  text-decoration: none;
}

.legal-last-updated {
  color: rgba(148, 163, 184, 0.9);
}

@media (max-width: 700px) {
  .nav-bar {
    gap: 8px;
    padding-left: 10px;
    padding-right: 10px;
  }

  .nav-logo-link,
  .nav-logo-link img {
    width: 38px;
    height: 38px;
    min-width: 38px;
  }

  .nav-links {
    gap: 2px;
  }

  .nav-links a {
    font-size: 0.72rem;
    padding: 8px 8px;
  }

  .nav-avatar-btn,
  .nav-avatar-img {
    width: 36px;
    height: 36px;
    min-width: 36px;
  }
}

@media (max-width: 560px) {
  .site-footer {
    margin-top: 44px;
    padding: 22px 12px 30px;
  }

  .footer-inner {
    padding: 16px 14px;
    border-radius: 18px;
  }

  .footer-disclaimer {
    max-width: 310px;
    font-size: 10.5px;
  }

  .legal-overlay {
    align-items: flex-start;
    padding: 12px;
  }

  .legal-box {
    max-height: 92vh;
    border-radius: 18px;
    padding: 20px;
  }

  .legal-title {
    font-size: 21px;
  }
}

@media (max-width: 390px) {
  .nav-logo-link,
  .nav-logo-link img {
    width: 34px;
    height: 34px;
    min-width: 34px;
  }

  .nav-links a {
    font-size: 0.68rem;
    padding: 7px 7px;
  }

  .nav-avatar-btn,
  .nav-avatar-img {
    width: 34px;
    height: 34px;
    min-width: 34px;
  }
}
/* css/icerank-background-lock-v2.css */
/* Append to the BOTTOM of /css/icerank-shell.css or upload as its own CSS file after page CSS. */
/* Purpose: force every IceRank page to use the Scouting Room background. */

html {
  min-height: 100% !important;
  background: #020617 !important;
  color-scheme: dark !important;
  -webkit-text-size-adjust: 100% !important;
}

body {
  margin: 0 !important;
  min-height: 100vh !important;
  min-height: 100svh !important;
  overflow-x: hidden !important;
  color: var(--text, #f8fafc) !important;
  font-family: var(--font-body, 'Barlow', system-ui, sans-serif) !important;
  background:
    radial-gradient(circle at 18% 0%, rgba(56,189,248,0.11), transparent 34%),
    radial-gradient(circle at 84% 16%, rgba(59,130,246,0.075), transparent 31%),
    radial-gradient(circle at 50% 100%, rgba(14,165,233,0.045), transparent 42%),
    linear-gradient(180deg, #07111f 0%, #06101d 42%, #020617 100%) !important;
  background-attachment: fixed !important;
  background-color: #020617 !important;
}

/* Shared subtle grid overlay used by Scouting Room. */
body::before {
  content: '' !important;
  position: fixed !important;
  inset: 0 !important;
  z-index: 0 !important;
  pointer-events: none !important;
  background-image:
    linear-gradient(rgba(255,255,255,0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.022) 1px, transparent 1px) !important;
  background-size: 44px 44px !important;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.52), transparent 82%) !important;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.52), transparent 82%) !important;
}

/* Keep all real page content above the fixed grid overlay. */
main,
header,
section,
.site-footer,
.page-shell,
.content-shell {
  position: relative;
  z-index: 2;
}

/* Keep nav above every page layer. */
.nav-bar {
  position: sticky;
  top: 0;
  z-index: 99999;
}

/* Prevent random page pseudo-elements from creating a top strip. */
html::before,
html::after,
body::after {
  display: none !important;
  content: none !important;
}

/* Optional iOS fallback:
   Leave fixed on by default because Scouting Room currently looks good.
   If a page still flashes on iPhone, uncomment this block.
*/
/*
@supports (-webkit-touch-callout: none) {
  body {
    background-attachment: scroll !important;
  }
}
*/
/* =========================================================
   IceRank shared background system
   Mobile-safe replacement for background-attachment: fixed
   ========================================================= */

html {
  background: #020617 !important;
  color-scheme: dark;
}

body {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  background: transparent !important;
  background-attachment: scroll !important;
  overflow-x: hidden;
}

/* Main IceRank gradient layer */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100svh;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(circle at 18% 0%, rgba(56,189,248,0.11), transparent 34%),
    radial-gradient(circle at 84% 16%, rgba(59,130,246,0.075), transparent 31%),
    radial-gradient(circle at 50% 100%, rgba(14,165,233,0.045), transparent 42%),
    linear-gradient(180deg, #07111f 0%, #06101d 42%, #020617 100%);
  transform: translateZ(0);
}

/* Subtle grid texture layer */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image:
    linear-gradient(rgba(255,255,255,0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.022) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.52), transparent 82%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.52), transparent 82%);
}

/* Keep all actual page content above the shared background layers */
.nav-bar,
.home-hero,
.section-wrap,
.pulse-shell,
.home-closing,
.install-bar,
.about-hero,
.about-wrap,
.rankings-shell,
.leaderboard-shell,
.vote-shell,
.compare-shell,
.pulse-page,
.pulse-wrap,
.page-shell,
.site-footer {
  position: relative;
  z-index: 2;
}
