/* Sovetic black + red minimal theme (only effective rules kept) */

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --nav-height: 72px; /* enlarged navbar height */
  --fs-h1: clamp(1.4rem, 2vw + 1.2rem, 2.2rem);
  --fs-p: clamp(1rem, 1.2vw + 0.8rem, 1.05rem);
  --text: #e8e8e8;
  --subtext: #bdbdbd;
  --accent: #cc0000;
  --accent-weak: rgba(204, 0, 0, 0.18);
  --accent-strong: #e10000;
  --card: #141414;
  --card-border: #1f1f1f;
  --radius: 8px;
  --transition: 180ms ease;
  /* Subtler navbar visuals */
  --nav-gradient: linear-gradient(
    135deg,
    #160000 0%,
    #1c0b0b 45%,
    #121212 100%
  );
  --nav-shine: radial-gradient(
      circle at 20% 30%,
      rgba(255, 40, 40, 0.08) 0%,
      rgba(255, 0, 0, 0) 55%
    ),
    radial-gradient(
      circle at 80% 70%,
      rgba(255, 30, 30, 0.06) 0%,
      rgba(255, 0, 0, 0) 60%
    );
}

/* Base */
html,
body {
  height: 100%;
}
html,
body {
  overscroll-behavior-y: none;
  overscroll-behavior-x: none;
}
body {
  display: flex;
  flex-direction: column;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial,
    "Helvetica Neue", sans-serif;
  color: var(--text);
  background: radial-gradient(
      1000px 500px at 10% -10%,
      rgba(204, 0, 0, 0.18),
      rgba(0, 0, 0, 0) 60%
    ),
    radial-gradient(
      900px 500px at 100% 110%,
      rgba(204, 0, 0, 0.12),
      rgba(0, 0, 0, 0) 60%
    ),
    linear-gradient(180deg, #0b0b0b 0%, #121212 100%);
}

/* Background image layer: keeps the navbar visuals unchanged while
   placing a blurred image behind the site content. The ::before element
   contains the image and blur; ::after adds a subtle dark overlay. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("images/background.png");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  filter: blur(6px) saturate(0.95);
  transform: scale(1.03);
  opacity: 0.6;
  pointer-events: none;
  z-index: -2;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(
    0,
    0,
    0,
    0.25
  ); /* subtle darkening so content stays readable */
  pointer-events: none;
  z-index: -1;
}

/* Disable page scrolling globally. Remove or change this if you only
   want to disable scrolling on certain pages. */
html,
body {
  /* Ensure both root and body are prevented from scrolling. Use
     !important to override any inline or third-party rules. */
  overflow: hidden !important;
}

/* Layout: ensure content clears fixed navbar */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 18px 48px;
  padding-top: calc(var(--nav-height) + 18px);
  flex: 1 0 auto;
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* reduce vertical centering for compactness */
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  display: flex;
  justify-content: flex-start;
  gap: 8px;
  background: transparent;
  -webkit-backdrop-filter: blur(8px) saturate(120%);
  backdrop-filter: blur(8px) saturate(120%);
  min-height: var(--nav-height);
  padding: 10px 16px 10px 4px;
  border-bottom: none;
  box-shadow: none;
}
/* Removed bright overlay for subtler look */
.navbar::before {
  display: none;
}
.navbar::after {
  display: none;
}
.nav-links {
  /* center the nav links visually while logo stays at the far left */
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  gap: 8px;
  z-index: 3;
}

.nav-actions {
  position: absolute;
  /* move further left so it doesn't overlap the info button (top-right) */
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  display: flex;
  align-items: center;
}
.nav-actions .btn.login {
  background: rgba(255, 255, 255, 0.03);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 8px 12px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
}
.nav-actions .btn.login:hover {
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-2px);
}
.nav-logo {
  display: flex;
  align-items: center;
  padding: 4px 12px 4px 0; /* remove left padding entirely */
  margin-right: 6px;
  border-radius: 6px;
  text-decoration: none;
  transition: background-color var(--transition), transform 120ms ease;
}
.nav-logo img {
  display: block;
  height: calc(var(--nav-height) - 24px);
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
  user-select: none;
}
.nav-logo:hover {
  background: rgba(204, 0, 0, 0.12);
}
.nav-logo:active {
  transform: scale(0.96);
}
.nav-logo:focus-visible {
  outline: 2px solid #ff3a3a;
  outline-offset: 3px;
}
.navbar a {
  color: #ffffff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  height: calc(var(--nav-height) - 28px); /* contained to navbar height */
  padding: 0 22px; /* horizontal padding only */
  border-radius: 7px;
  position: relative;
  isolation: isolate;
  --hover-bg: rgba(255, 0, 0, 0.1);
  transition: background-color var(--transition), transform 120ms ease,
    color var(--transition), box-shadow var(--transition);
  line-height: 1;
}
.navbar a::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    circle at 30% 35%,
    rgba(255, 90, 90, 0.35) 0%,
    rgba(255, 0, 0, 0) 65%
  );
  opacity: 0;
  transition: opacity 240ms ease;
  mix-blend-mode: screen;
}
.navbar a:hover {
  background-color: var(--hover-bg);
  transform: translateY(-2px);
}
.navbar a:hover::before {
  opacity: 0.65;
}
.navbar a:active {
  transform: translateY(0);
}
.navbar a:focus-visible {
  outline: 2px solid #ff3a3a;
  outline-offset: 3px;
}
.navbar a.active {
  background: rgba(204, 0, 0, 0.14);
  box-shadow: 0 0 0 1px rgba(204, 0, 0, 0.35) inset,
    0 0 0 1px rgba(255, 255, 255, 0.04);
  color: #fff;
}
/* Underline removed for cleaner minimal style */
.navbar a.active::before {
  opacity: 0.35;
}

/* Burger (mobile) */
#nav-toggle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.nav-burger {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  border-radius: 8px;
  position: relative;
}
.nav-burger:hover {
  background: rgba(255, 255, 255, 0.08);
}
.nav-burger:focus-visible {
  outline: 2px solid #fff;
}
.nav-burger span {
  display: block;
  width: 26px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.15s ease, width 0.2s ease;
  transform-origin: center;
}
#nav-toggle:checked + .nav-burger span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
#nav-toggle:checked + .nav-burger span:nth-child(2) {
  opacity: 0;
}
#nav-toggle:checked + .nav-burger span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}
@keyframes accentShift {
  0% {
    filter: hue-rotate(0deg);
  }
  50% {
    filter: hue-rotate(45deg);
  }
  100% {
    filter: hue-rotate(0deg);
  }
}

/* Content */
.content {
  max-width: 900px;
  /* moved slightly up: reduce vertical margin (was 40px) */
  margin: 18px auto;
  padding: 0 20px;
  text-align: center;
}
.content h1 {
  font-size: var(--fs-h1);
  margin-bottom: 12px;
  color: var(--text);
}
.content p,
.content .subtitle {
  font-size: var(--fs-p);
  color: var(--subtext);
}

/* Header + content card styling */
header {
  background: var(--card);
  padding: 2rem 1.75rem;
  margin-bottom: 1.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--card-border);
  box-shadow: 0 10px 30px rgba(204, 0, 0, 0.16),
    0 2px 0 rgba(255, 255, 255, 0.02) inset;
  transition: box-shadow var(--transition), transform 140ms ease;
}
header:hover {
  box-shadow: 0 12px 38px rgba(204, 0, 0, 0.22);
}
header h1 {
  letter-spacing: 0.4px;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 0.4rem;
}

.content {
  background: var(--card);
  padding: 2rem 1.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--card-border);
  box-shadow: 0 10px 30px rgba(204, 0, 0, 0.16),
    0 2px 0 rgba(255, 255, 255, 0.02) inset;
  transition: box-shadow var(--transition), transform 140ms ease;
}
.content:hover {
  box-shadow: 0 12px 38px rgba(204, 0, 0, 0.22);
}

/* Hero and buttons for homepage */
.hero {
  width: 100%;
}
.hero .content {
  padding: 1.6rem 2.25rem; /* slightly wider horizontal padding */
  max-width: 1100px; /* allow hero content to be wider than regular content */
  margin: 0 auto;
}
/* Slideshow / hero media */
.hero-media {
  width: 100%;
  height: 320px;
  max-height: 48vh;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 12px;
  background: #0b0b0b;
}
.hero-media img#carouselImage {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
}

/* Center the focal point of the carousel image */
.hero-media img#carouselImage {
  object-position: center center;
  margin: 0 auto;
}
.hero h1 {
  font-size: clamp(1.8rem, 3.6vw + 0.8rem, 3rem);
  margin-bottom: 0.6rem;
  letter-spacing: 0.6px;
}
.hero .subtitle {
  color: var(--subtext);
  max-width: 100ch;
  margin: 0 auto;
}

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(204, 0, 0, 0.08);
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 26px rgba(204, 0, 0, 0.12);
}
.btn.secondary {
  background: rgba(204, 0, 0, 0.14);
  box-shadow: 0 0 0 1px rgba(204, 0, 0, 0.35) inset,
    0 0 0 1px rgba(255, 255, 255, 0.04);
  color: #fff;
}

/* Neutral store button (not red) */
/* Store / neutral CTA: match login button style and ensure it isn't
   stripped by the `main * { background: transparent !important; }` rule.
   Apply to nav login, homepage Check Status, discord View Map, and invite card. */
.nav-actions .btn.login,
.hero .btn.store,
.discord-hero .btn.store,
.server-info .btn.store {
  background: rgba(255, 255, 255, 0.03) !important;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  padding: 8px 12px !important;
  border-radius: 8px !important;
  text-decoration: none !important;
  font-weight: 600;
  box-shadow: none !important;
}
.nav-actions .btn.login:hover,
.hero .btn.store:hover,
.discord-hero .btn.store:hover,
.server-info .btn.store:hover {
  background: rgba(255, 255, 255, 0.06) !important;
  transform: translateY(-2px);
}
/* Discord page styles */
.discord-hero {
  padding: 36px 0 18px;
  background: linear-gradient(180deg, rgba(204, 0, 0, 0.06), rgba(0, 0, 0, 0));
  text-align: center;
}
.discord-hero .content {
  text-align: center;
  max-width: 920px;
  margin: 0 auto;
}

/* Discord CTA button: compact, darker red so it stands out without taking
   too much space. Use more specific selectors and `!important` so the
   background isn't cleared by the homepage rule `main * { background: transparent !important; }`. */

/* Base Discord CTA styling (scoped) — ensure it isn't removed by the
   global `main * { background: transparent !important }` rule. */

.discord-hero .btn.btn-discord,
.server-info .btn.btn-discord {
  background: rgba(144, 2, 2, 0.46) !important; /* subtle transparent red */
  color: #fff !important;
  padding: 8px 14px !important;
  font-size: 0.95rem !important;
  border-radius: 999px !important; /* pill */
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  text-decoration: none !important;
  box-shadow: 0 6px 12px rgba(122, 0, 0, 0.06) !important;
  transition: transform 140ms ease, box-shadow 140ms ease, background 120ms ease;
}
.discord-hero .btn.btn-discord:hover,
.server-info .btn.btn-discord:hover {
  transform: translateY(-2px);
  background: rgba(
    204,
    0,
    0,
    0.489
  ) !important; /* slightly stronger on hover */
  box-shadow: 0 10px 22px rgba(204, 0, 0, 0.455);
}
.discord-hero .btn.btn-discord:focus-visible,
.server-info .btn.btn-discord:focus-visible {
  outline: 2px solid rgba(255, 80, 80, 0.65);
  outline-offset: 3px;
}
.discord-hero .btn.btn-discord.small,
.server-info .btn.btn-discord.small {
  padding: 6px 12px; /* smaller pill for small variant */
  font-size: 0.9rem;
  border-radius: 999px;
}
.hero .btn.secondary {
  /* Make the homepage "Join Discord" secondary button use the same
     dark-red Discord CTA styling while scoped to the hero so other
     secondary buttons keep their original appearance. */
  background: rgba(144, 2, 2, 0.46) !important;
  color: #fff !important;
  padding: 8px 12px !important;
  font-size: 0.95rem !important;
  border-radius: 8px !important;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  box-shadow: 0 6px 14px rgba(122, 0, 0, 0.12) !important;
  transition: transform 140ms ease, box-shadow 140ms ease, background 120ms ease;
}
.hero .btn.secondary:hover {
  transform: translateY(-2px);
  background: #8e0a0a !important;
  box-shadow: 0 10px 22px rgba(142, 10, 10, 0.14) !important;
}
.hero .btn.secondary:focus-visible {
  outline: 2px solid rgba(255, 80, 80, 0.85);
  outline-offset: 3px;
}
.discord-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 18px;
  align-items: start;
  text-align: center;
}
.discord-card {
  background: rgba(16, 16, 16, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.03);
  padding: 18px;
  border-radius: 10px;
}
/* Ensure the text inside the rules card is left-aligned even though
   the surrounding `.content` is centered for the hero. */
.discord-card {
  text-align: left;
}
.discord-card .muted,
.discord-card .rules {
  text-align: left;
}
/* Features grid */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 6px;
}
.feature {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.01),
    rgba(255, 255, 255, 0)
  );
  padding: 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.02);
  text-align: left;
}
.feature h3 {
  margin-bottom: 6px;
}
.feature p {
  color: var(--subtext);
  font-size: 0.98rem;
}

/* Split layout: left content + right server card */
.split {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-top: 12px;
}
.split .left {
  flex: 1 1 60%;
}
.split .right {
  width: 360px;
  max-width: 40%;
  flex: 0 0 360px;
}
.server-card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--card-border);
  padding: 14px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.55);
  max-height: calc(100vh - var(--nav-height) - 120px);
  overflow: auto;
}
.server-card h2 {
  margin-top: 0;
}
.rules {
  list-style: none;
  padding-left: 0;
  margin: 6px 0 0 0;
}
.rules li {
  padding: 6px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.03);
  color: var(--subtext);
  font-size: 0.93rem;
}
.rules li:last-child {
  border-bottom: none;
}
.server-card code {
  background: rgba(255, 255, 255, 0.02);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.98rem;
}
/* Make the invite column match the rules column: left-aligned text,
   consistent heading sizes and spacing. */
.server-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}
.server-info .card {
  text-align: left;
}
.server-info .card h3,
.server-info .card h4 {
  font-size: 1.25rem;
  margin: 0 0 8px 0;
  font-weight: 700;
  color: #fff;
}
.server-info .card .muted {
  margin: 0;
  color: var(--subtext);
}
.server-info .card p {
  line-height: 1.5;
}
.muted {
  color: var(--subtext);
  font-size: 0.95rem;
  margin-top: 10px;
}

@media (max-width: 980px) {
  .split {
    flex-direction: column-reverse;
  }
  .split .right {
    width: 100%;
    max-width: 100%;
    flex: none;
  }
}

/* Animated multi-accent border (optional utility) */
.glow-border {
  position: relative;
}
.glow-border::before {
  content: "";
  position: absolute;
  inset: -2px;
  background: linear-gradient(120deg, #ff0000, #ff8800, #ff0000, #ff8800);
  background-size: 300% 300%;
  filter: blur(6px);
  z-index: -1;
  animation: glowCycle 8s linear infinite;
  border-radius: inherit;
}
@keyframes glowCycle {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Global links */
a {
  color: var(--accent);
}
a:hover {
  color: #ff4040;
}
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Responsive navbar */
@media (max-width: 768px) {
  .navbar {
    justify-content: space-between;
    padding: 10px 16px;
  }
  .nav-logo {
    padding: 2px 8px 2px 2px;
  }
  .nav-logo img {
    height: calc(var(--nav-height) - 30px);
  }
  .nav-burger {
    display: flex;
  }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(10, 10, 10, 0.94);
    -webkit-backdrop-filter: blur(10px) saturate(140%);
    backdrop-filter: blur(10px) saturate(140%);
    display: grid;
    gap: 6px;
    padding: 8px 12px 14px;
    max-height: 0;
    opacity: 0;
    transform: translateY(-6px);
    overflow: hidden;
    transition: max-height 0.35s ease, opacity 0.35s ease, transform 0.35s ease;
    border-bottom-left-radius: 14px;
    border-bottom-right-radius: 14px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55);
  }
  #nav-toggle:checked ~ .nav-links {
    max-height: 65vh;
    opacity: 1;
    transform: translateY(0);
  }
  .navbar a {
    padding: 18px 18px; /* keep touch target large on mobile */
  }
  /* restore login button to right edge on small screens so the info button
      doesn't overlap navigation controls when space is constrained */
  .nav-actions {
    right: 72px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .navbar a,
  .nav-links,
  .navbar a::before {
    transition: none !important;
    animation: none !important;
  }
}
/* Removed old leftover light theme rules */
/* Login button */
/* Deprecated: login button moved into navbar as `.nav-actions .btn.login` */
/* Desktop: keep the existing fullscreen, fixed-navbar behavior
   Mobile: allow scrolling and normal flow so content is accessible */
@media (min-width: 980px) {
  html,
  body {
    height: 100vh;
    overflow: hidden !important;
  }

  /* Main fills the space below the navbar and prevents internal overflow */
  main {
    height: calc(100vh - var(--nav-height));
    padding-top: 0; /* avoid adding extra height */
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  /* Make the hero occupy available space without causing page scroll */
  header.hero {
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 100%;
    overflow: hidden;
  }

  /* Keep hero content (text/buttons) sized naturally and allow media to scale */
  .hero .content {
    flex: 0 0 auto;
  }

  /* Make the media area fill the remaining hero height but not overflow */
  .hero-media {
    flex: 1 1 auto;
    min-height: 0; /* allow flex child to shrink properly */
    max-height: calc(100vh - var(--nav-height) - 120px);
  }

  /* Ensure the carousel image scales to its container */
  .hero-media img#carouselImage {
    height: 100%;
    object-fit: cover;
  }
}

/* Small screens: allow normal scrolling and flow for accessibility */
@media (max-width: 979px) {
  html,
  body {
    height: auto;
    overflow: auto !important;
  }

  main {
    height: auto;
    min-height: auto;
    overflow: visible;
    /* more top breathing room so the fixed navbar doesn't overlap text */
    padding-top: calc(var(--nav-height) + 20px);
    /* reserve space at the bottom so the info/bottom sheet and toggle
       won't obscure the last lines of content */
    padding-bottom: 110px;
  }

  /* revert hero to normal flow on small screens */
  header.hero {
    display: block;
    margin-top: 6vh;
  }

  /* show the hero image and scale it reasonably on mobile */
  .hero-media {
    display: block !important;
    width: 100%;
    height: auto;
    max-height: 40vh;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
  }

  .hero-media img#carouselImage {
    height: auto;
    object-fit: cover;
    object-position: center center;
  }

  /* reduce background blur and opacity for performance/readability on mobile */
  body::before {
    filter: blur(2px) saturate(0.95);
    opacity: 0.5;
    transform: scale(1.02);
  }

  /* increase touch target sizes for buttons on mobile */
  .btn {
    padding: 12px 18px;
    font-size: 1rem;
  }

  /* ensure nav controls are usable */
  .navbar a,
  .nav-burger,
  .nav-actions .btn.login {
    padding: 12px 14px;
  }

  /* Prevent headings/targets from being hidden behind the fixed navbar
     when users navigate to anchors or focus elements. */
  :is(h1, h2, h3, h4, h5, h6, section, article) {
    scroll-margin-top: calc(var(--nav-height) + 18px);
  }

  /* MOBILE FIXES: prevent the info/sidebar from covering main content by
     keeping it off-canvas until explicitly opened. Use high-specificity
     rules here so earlier desktop-oriented sidebar styles don't leak in. */
  .sidebar {
    transform: translateY(100%) !important;
    visibility: hidden !important;
    pointer-events: none !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    top: auto !important;
    width: 100% !important;
    max-height: 80vh !important;
  }

  /* When the sidebar is opened (via .open-bottom), it will use the
     existing .open-bottom rules which include transform to bring it up. */

  /* Hide the login button on small screens so it doesn't overlap the logo.
     Users can access login through the menu when needed. */
  .nav-actions {
    display: none !important;
  }

  /* Discord / split layouts: stack into a single column for readability */
  .discord-grid,
  .split {
    grid-template-columns: 1fr !important;
    display: block !important;
  }
  .discord-grid .content,
  .split .left,
  .split .right,
  .server-card,
  .discord-card,
  .feature-card {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  /* Make sure main content remains readable above bottom controls */
  footer,
  .bottom-toggle {
    z-index: 10005; /* keep controls above content when visible */
  }
}

/* Move the entire hero block down so the image + text/buttons move together */
header.hero {
  /* reduce top spacing so hero/content sits a bit higher */
  margin-top: 6vh;
}
/* Homepage-only: remove card borders around hero text */
header.hero,
header.hero .content {
  border: none !important;
}

/* Move the entire hero block down so the image + text/buttons move together */
header.hero {
  margin-top: 5vh;
}

/* Homepage-only: remove card-like boxes around all content inside main
           Keep navbar untouched. This removes backgrounds, borders, shadows,
           and rounded corners so text and images appear plain. */
main * {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

/* Ensure images show normally (no accidental masking) */
main img {
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* Soften and tint the hero image so it blends with the page background */
.hero-media {
  position: relative;
  overflow: hidden;
}

.hero-media::before {
  content: "";
  position: absolute;
  inset: 0;
  /* subtle warm tint to tie the image into the site's red theme */
  background: linear-gradient(
    to bottom,
    rgba(204, 0, 0, 0.06),
    rgba(0, 0, 0, 0.18)
  );
  pointer-events: none;
  mix-blend-mode: overlay;
}

.hero-media img#carouselImage {
  filter: saturate(0.85) contrast(0.95) brightness(0.95);
  transition: filter 220ms ease, transform 220ms ease;
  object-fit: cover;
  object-position: center center;
  width: 100%;
  height: 100%;
  display: block;
}
/* Index-only overrides moved from inline <style> in index.html */
.hero-media {
  /* default visible; mobile/desktop behavior handled via media queries */
}
header.hero .subtitle,
header.hero p {
  line-height: 1.5;
}
/* Homepage layout adjustments for panels */
main {
  position: relative;
}
/* Sidebar styles (holds the Why Play Here content) */
.sidebar {
  position: fixed;
  right: 0;
  top: var(--nav-height); /* sit under the navbar */
  bottom: 0;
  width: 420px;
  max-width: 72vw;
  /* hide off-canvas to the right */
  transform: translateX(100%);
  transition: transform 300ms ease, box-shadow 300ms ease;
  background-color: rgba(8, 8, 8, 0.98);
  color: var(--text);
  /* shadow cast to the left when visible */
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.7);
  /* place under the navbar but above content */
  z-index: 9000;
  overflow: auto;
}
.sidebar.open {
  transform: translateX(0);
}
.sidebar .sidebar-inner {
  padding: 22px;
}
.sidebar h2 {
  font-size: clamp(1.25rem, 1.6vw + 0.9rem, 1.6rem);
  margin: 0 0 10px 0;
  letter-spacing: 0.5px;
  font-weight: 700;
}

/* Align the heading with the feature card text column (icon width + gap + inner padding) */
.sidebar h2 {
  padding-left: calc(22px + 36px + 14px);
}

/* Cards inside panels */
.feature-cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.feature-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.02),
    rgba(255, 255, 255, 0)
  );
  border: 1px solid rgba(255, 255, 255, 0.045);
  padding: 12px 14px 12px;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}
.feature-card .icon {
  font-size: 1.6rem;
  line-height: 1;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.45));
}
.feature-card h3 {
  font-size: 1rem;
  margin: 0 0 4px 0;
  font-weight: 700;
  color: #fff;
}
.feature-card p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.35;
  color: var(--subtext);
}
/* Base bottom-sheet (mobile default) */
.sidebar {
  position: fixed !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  top: auto !important;

  width: 100% !important;
  max-width: none !important;

  transform: translateY(100%) !important;
  transition: transform 320ms cubic-bezier(0.2, 0.9, 0.2, 1);

  background-color: rgba(8, 8, 8, 0.98);
  border-radius: 12px 12px 0 0;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.7);

  max-height: 80vh;
  overflow: auto;
  z-index: 10002;

  visibility: hidden;
  pointer-events: none;
}

/* OPEN */
.sidebar.open-bottom {
  transform: translateY(0) !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

/* CLOSING */
.sidebar.closing-bottom {
  transform: translateY(100%) !important;
  visibility: visible !important; /* keep visible during animation */
  pointer-events: auto !important;
}
@media (min-width: 860px) {
  .sidebar {
    left: 50% !important;
    right: auto !important;

    width: min(1100px, 92%) !important;
    max-width: 1100px !important;

    bottom: 24px !important;

    transform: translate(-50%, 110%) !important;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  }

  .sidebar.open-bottom {
    transform: translate(-50%, 0) !important;
  }

  .sidebar.closing-bottom {
    transform: translate(-50%, 110%) !important;
  }
}
#sidebar:target {
  transform: translateY(0) !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

@media (min-width: 860px) {
  #sidebar:target {
    left: 50% !important;
    transform: translate(-50%, 0) !important;
  }
}
.bottom-toggle {
  position: fixed;
  left: 50%;
  bottom: 12px;

  width: 56px;
  height: 40px;

  display: flex;
  justify-content: center;
  align-items: center;

  transform: translateX(-50%);
  transition: transform 220ms ease;

  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.04);

  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(4px);

  color: #fff;
  z-index: 10003;
}

.bottom-toggle[aria-expanded="true"] .arrow {
  transform: rotate(180deg);
}
.bottom-toggle .arrow {
  display: inline-block;
  /* quick, consistent rotation */
  transition: transform 180ms cubic-bezier(0.2, 0.9, 0.3, 1);
  transform-origin: center center;
  will-change: transform;
  backface-visibility: hidden;
}

.bottom-toggle .arrow svg {
  display: block;
  width: 30px;
  height: 30px;
  pointer-events: none;
}
