/* ============================================
   UPDATES PAGE — Did You Get Sniped
   ============================================ */

:root {
  --bg-0: #06060b;
  --bg-1: #0c0c14;
  --bg-2: #13131f;
  --bg-card: #16162280;
  --bg-card-hover: #1c1c2e;
  --bg-card-border: rgba(139, 92, 246, 0.12);
  --bg-card-border-hover: rgba(139, 92, 246, 0.35);

  --text-0: #f0f0f5;
  --text-1: #b0b0c0;
  --text-2: #6e6e85;

  --purple-400: #a78bfa;
  --purple-500: #8b5cf6;
  --purple-600: #7c3aed;
  --purple-700: #6d28d9;
  --purple-glow: rgba(139, 92, 246, 0.45);

  --green: #34d399;
  --blue: #60a5fa;
  --red: #f87171;

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", monospace;

  --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ---- Reset ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-0);
  color: var(--text-0);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  isolation: isolate;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: -2;
  background-image: var(--background-image-url);
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  filter: blur(8px) brightness(0.33);
  transform: scale(1.05);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 55% at 50% 10%, rgba(124, 58, 237, 0.2) 0%, transparent 60%),
    linear-gradient(180deg, rgba(6, 6, 11, 0.55) 0%, rgba(6, 6, 11, 0.72) 100%);
}

::selection {
  background: var(--purple-600);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--purple-500);
  outline-offset: 3px;
}

/* ---- Utilities ---- */
.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;
}

/* ---- Animations ---- */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.5);
  }
  50% {
    opacity: 0.7;
    box-shadow: 0 0 0 6px rgba(52, 211, 153, 0);
  }
}

/* ============================================
   NAVIGATION
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.navbar.scrolled {
  background: rgba(6, 6, 11, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--bg-card-border);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1000px;
  margin: 0 auto;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-0);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-logo:hover {
  color: var(--purple-400);
}

.logo-icon {
  font-size: 1.35rem;
}

.logo-text {
  font-family: var(--font-mono);
  letter-spacing: -0.03em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1rem;
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.2s var(--ease-out);
}

.nav-back {
  color: var(--text-1);
  background: transparent;
  border: 1px solid var(--bg-card-border);
}

.nav-back:hover {
  background: var(--bg-card);
  border-color: var(--bg-card-border-hover);
  color: var(--text-0);
}

.nav-discord {
  color: #fff;
  background: var(--purple-600);
  border: 1px solid var(--purple-500);
}

.nav-discord:hover {
  background: var(--purple-700);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px var(--purple-glow);
}

.discord-icon {
  width: 18px;
  height: 18px;
}

/* ============================================
   HERO
   ============================================ */
.hero {
  padding: calc(72px + 4rem) 1.5rem 2rem;
  text-align: center;
}

.hero-content {
  max-width: 560px;
  margin: 0 auto;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--purple-400);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  animation: fadeUp 0.6s var(--ease-out) both;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

.hero-title {
  margin-bottom: 1rem;
  font-size: clamp(3rem, 10vw, 5.5rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.04em;
}

.title-line {
  display: block;
  animation: fadeUp 0.6s var(--ease-out) 0.1s both;
}

.title-accent {
  background: linear-gradient(135deg, var(--purple-400) 0%, var(--purple-600) 60%, #c084fc 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation-delay: 0.2s;
}

.hero-subtitle {
  margin-bottom: 2rem;
  font-size: 1.05rem;
  color: var(--text-1);
  animation: fadeUp 0.6s var(--ease-out) 0.3s both;
}

.stats-row {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  animation: fadeUp 0.6s var(--ease-out) 0.4s both;
}

.stat-chip {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  font-size: 0.82rem;
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: 999px;
}

.stat-value {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--purple-400);
}

.stat-key {
  font-weight: 500;
  color: var(--text-2);
}

/* ============================================
   TOOLBAR
   ============================================ */
.toolbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: 720px;
  margin: 0 auto 2rem;
  padding: 0 1.5rem;
}

.search-box {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: 10px;
  transition: border-color 0.2s;
}

.search-box:focus-within {
  border-color: var(--purple-500);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

.search-box svg {
  flex-shrink: 0;
  color: var(--text-2);
}

.search-box input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  color: var(--text-0);
}

.search-box input::placeholder {
  color: var(--text-2);
}

.toolbar-info {
  font-size: 0.78rem;
  color: var(--text-2);
  white-space: nowrap;
}

/* ============================================
   UPDATES LIST
   ============================================ */
.main-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

.updates-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  list-style: none;
}

.updates-list > li[hidden] {
  display: none;
}

/* ---- Card ---- */
.update-card {
  padding: 1.25rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: 14px;
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.5s var(--ease-out),
    transform 0.5s var(--ease-out),
    border-color 0.3s,
    box-shadow 0.3s;
}

.update-card.in-view {
  opacity: 1;
  transform: translateY(0);
}

.update-card:hover {
  border-color: var(--bg-card-border-hover);
  box-shadow: 0 8px 40px rgba(139, 92, 246, 0.08);
}

.update-card.in-view:hover {
  transform: translateY(-2px);
}

.updates-list > li:first-child .update-card {
  border-color: var(--purple-600);
  background: linear-gradient(160deg, rgba(139, 92, 246, 0.12) 0%, var(--bg-card) 60%);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.update-time {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--purple-400);
  letter-spacing: -0.01em;
}

.change-count {
  padding: 0.2rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-2);
  background: rgba(139, 92, 246, 0.08);
  border-radius: 999px;
}

/* ---- Changes ---- */
.changes-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  list-style: none;
}

.changes-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text-1);
  transition: color 0.15s;
}

.changes-list li:hover {
  color: var(--text-0);
}

/* ---- Tags ---- */
.tag {
  flex-shrink: 0;
  display: inline-block;
  margin-top: 0.2rem;
  padding: 0.1rem 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 4px;
}

.tag-feature {
  background: rgba(52, 211, 153, 0.12);
  color: var(--green);
}

.tag-fix {
  background: rgba(96, 165, 250, 0.12);
  color: var(--blue);
}

.tag-update {
  background: rgba(139, 92, 246, 0.12);
  color: var(--purple-400);
}

.tag-remove {
  background: rgba(248, 113, 113, 0.12);
  color: var(--red);
}

/* ============================================
   BACK TO TOP
   ============================================ */
.back-to-top {
  position: fixed;
  right: 2rem;
  bottom: 2rem;
  z-index: 900;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: 12px;
  color: var(--text-1);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: all 0.3s var(--ease-out);
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover {
  background: var(--purple-600);
  border-color: var(--purple-500);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px var(--purple-glow);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  padding: 2rem 1.5rem;
  border-top: 1px solid var(--bg-card-border);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 720px;
  margin: 0 auto;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-logo {
  font-size: 1.5rem;
}

.footer-brand {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-0);
}

.footer-sub {
  font-size: 0.78rem;
  color: var(--text-2);
}

.footer-discord {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 1rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--purple-400);
  text-decoration: none;
  border: 1px solid var(--bg-card-border);
  border-radius: 8px;
  transition: all 0.2s var(--ease-out);
}

.footer-discord:hover {
  background: var(--bg-card);
  border-color: var(--purple-500);
  color: var(--text-0);
}

.footer-discord .discord-icon {
  width: 16px;
  height: 16px;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 640px) {
  body::before {
    background-attachment: scroll;
    filter: blur(6px) brightness(0.32);
    transform: none;
  }

  .navbar {
    padding: 0.6rem 1rem;
  }

  .nav-link {
    padding: 0.5rem;
  }

  .nav-link span {
    display: none;
  }

  .hero {
    padding: calc(60px + 2.5rem) 1rem 1.5rem;
  }

  .hero-title {
    font-size: 3rem;
  }

  .hero-subtitle {
    font-size: 0.95rem;
  }

  .toolbar {
    padding: 0 1rem;
  }

  .main-content {
    padding: 0 1rem 3rem;
  }

  .update-card {
    padding: 1rem 1.1rem;
  }

  .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
  }

  .changes-list li {
    font-size: 0.82rem;
  }

  .tag {
    font-size: 0.6rem;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-left {
    flex-direction: column;
  }

  .back-to-top {
    right: 1rem;
    bottom: 1rem;
    width: 40px;
    height: 40px;
  }
}

/* ============================================
   PRINT
   ============================================ */
@media print {
  .navbar,
  .footer,
  .back-to-top,
  .toolbar {
    display: none;
  }

  .hero {
    padding-top: 0;
  }

  .update-card {
    opacity: 1;
    transform: none;
    border: 1px solid #ccc;
    break-inside: avoid;
  }
}
