@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@600;800;900&display=swap');

:root {
  --primary-rgb: 255, 255, 255;
  --primary-soft: rgba(255, 255, 255, 0.4);
  --primary-soft-rgb: 255, 255, 255;

  --surface: #171325;
  --surface-border: rgba(255, 255, 255, 0.06);
  --text-muted: #C4BEDA;
  --text-white: #FFFFFF;

  --green: #3FE08C;
  --green-bg: rgba(63, 224, 140, 0.12);
  --gold: #FFC55C;
  --gold-bg: rgba(255, 197, 92, 0.12);

  --brand-rgb: 138, 92, 246;
  --brand: #8A5CF6;
}

html {
  scrollbar-gutter: stable;
}

body {
  font-family: 'Montserrat', sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: #100d1a;
  min-height: 100vh;
}

/* ===== Site header / navbar ===== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  width: 100%;
  background: var(--surface);
  border-bottom: 1px solid var(--surface-border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.nav-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 42px;
  padding: 0 14px;
  border-radius: 8px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 800;
  font-size: 16px;
  white-space: nowrap;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.nav-pill:hover {
  color: var(--text-white);
  background: rgba(255, 255, 255, 0.06);
}

.nav-pill svg {
  flex-shrink: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* icon-only pills (Rewards / Leaderboard / Affiliates) don't need the
   text-driven horizontal padding the labeled pills get */
.nav-pill-green,
.nav-pill-gold,
.nav-pill-primary {
  width: 42px;
  padding: 0;
  justify-content: center;
}

.nav-pill-green {
  color: var(--green);
  background: var(--green-bg);
}

.nav-pill-green:hover {
  color: var(--green);
  background: var(--green-bg);
  filter: brightness(1.15);
}

.nav-pill-gold {
  color: var(--gold);
  background: var(--gold-bg);
}

.nav-pill-gold:hover {
  color: var(--gold);
  background: var(--gold-bg);
  filter: brightness(1.15);
}

.nav-pill-primary {
  color: var(--brand);
  background: rgba(var(--brand-rgb), 0.12);
}

.nav-pill-primary:hover {
  color: var(--brand);
  background: rgba(var(--brand-rgb), 0.12);
  filter: brightness(1.15);
}

.sign-in-btn {
  flex-shrink: 0;
  height: 42px;
  padding: 0 22px;
  border: none;
  border-radius: 5px;
  background: var(--brand);
  color: var(--text-white);
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 16px;
  cursor: pointer;
  transition: filter 0.15s ease;
}

.sign-in-btn:hover {
  filter: brightness(1.08);
}

.sign-in-btn:active {
  filter: brightness(0.95);
}

@media (max-width: 900px) {
  .primary-nav span {
    display: none;
  }
  .nav-pill {
    padding: 0 10px;
  }
}

@media (max-width: 640px) {
  .header-inner {
    gap: 12px;
    padding: 0 12px;
  }
  .primary-nav {
    gap: 4px;
  }
}

.hero {
  position: relative;
  width: 100%;
  height: 268px;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(16, 13, 26, 0) 0%,
    rgba(16, 13, 26, 0) 45%,
    #100d1a 100%
  );
}

.absolute {
  position: absolute;
}

.inset-0 {
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

.h-full {
  height: 100%;
}

.w-full {
  width: 100%;
}

.pointer-events-none {
  pointer-events: none;
}

/* ===== Sign-in modal ===== */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(8, 6, 14, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.modal-panel {
  position: relative;
  width: 100%;
  max-width: 640px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 12px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
  transform: scale(0.94) translateY(12px);
  opacity: 0;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.22s ease;
}

.modal-overlay.is-open .modal-panel {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: filter 0.15s ease;
}

.modal-close:hover {
  filter: brightness(1.25);
}

.modal-close .bar {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 3px;
  border-radius: 99px;
  background: var(--text-white);
  transform: translate(-50%, -50%) rotate(45deg);
}

.modal-close .bar:last-child {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.modal-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 36px 24px 28px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.modal-diamonds {
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-diamonds.reverse {
  flex-direction: row-reverse;
}

.diamond {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--brand);
  transform: rotate(45deg);
}

.diamond.d2 {
  width: 8px;
  height: 8px;
  opacity: 0.48;
}

.diamond.d3 {
  width: 5px;
  height: 5px;
  opacity: 0.24;
}

.modal-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 1px;
  color: var(--text-white);
  white-space: nowrap;
  text-shadow: 0 0 22px rgba(var(--brand-rgb), 0.55);
}

.oauth-grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  width: 100%;
}

.oauth-btn {
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: none;
  border-radius: 4px;
  color: var(--text-white);
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 16px;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: filter 0.15s ease;
}

.oauth-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.oauth-btn:hover {
  filter: brightness(1.05);
}

.oauth-btn:active {
  filter: brightness(0.95);
}

.oauth-btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.oauth-btn:disabled:hover {
  filter: none;
}

.oauth-btn-google {
  background: #FF4D6A;
  box-shadow: inset 0 0 10px 0 rgba(189, 0, 0, 0.86);
}

.oauth-btn-discord {
  background: #5865F2;
  box-shadow: inset 0 0 10px 0 rgba(48, 63, 225, 0.86);
}

.modal-footer {
  width: 100%;
  padding: 16px 24px;
  text-align: center;
  font-size: 14px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.56);
  border-top: 1px solid var(--surface-border);
}

.modal-footer a {
  color: inherit;
  text-decoration: none;
}

.modal-footer a:hover {
  color: var(--text-white);
}

@media (min-width: 640px) {
  .modal-body {
    padding: 40px 40px 28px;
  }
  .modal-title {
    font-size: 36px;
  }
  .oauth-grid {
    grid-template-columns: 1fr 1fr;
  }
  .modal-footer {
    padding: 16px 40px;
  }
}
