:root {
  --bg: #09080d;
  --panel: rgba(16, 15, 24, 0.72);
  --panel-strong: rgba(25, 22, 34, 0.88);
  --line: rgba(235, 197, 111, 0.24);
  --gold: #f1c76e;
  --gold-soft: #d9a74c;
  --ember: #db5f3d;
  --jade: #54c596;
  --violet: #8d5cff;
  --text: #fff7e8;
  --muted: #c9b89c;
  --shadow: 0 26px 80px rgba(0, 0, 0, 0.46);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(90deg, rgba(9, 8, 13, 0.42), rgba(9, 8, 13, 0.72) 45%, rgba(9, 8, 13, 0.4)),
    linear-gradient(180deg, rgba(9, 8, 13, 0.04), #09080d 92%),
    url("assets/img/bg.jpg") center top / cover fixed no-repeat;
  font-family: Inter, Montserrat, "Segoe UI", Arial, sans-serif;
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background:
    radial-gradient(circle at 16% 42%, rgba(141, 92, 255, 0.24), transparent 28%),
    radial-gradient(circle at 82% 24%, rgba(219, 95, 61, 0.16), transparent 28%),
    linear-gradient(180deg, transparent 58%, rgba(9, 8, 13, 0.98));
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.particle-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

main,
.site-footer {
  position: relative;
  z-index: 1;
}

.hero-section {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: auto;
  padding: clamp(2px, 0.55vw, 9px) clamp(18px, 5vw, 70px) clamp(3px, 0.75vw, 11px);
  place-items: center;
}

.hero-inner {
  width: min(980px, 100%);
  max-width: 100%;
  min-width: 0;
  text-align: center;
  overflow: hidden;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--gold);
  font-size: clamp(0.75rem, 1.8vw, 0.95rem);
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-brand {
  position: relative;
  display: block;
  width: min(420px, 64vw);
  margin: -4px auto 0;
}

.hero-logo {
  width: 100%;
  max-width: 100%;
  margin: 0;
  filter: drop-shadow(0 26px 50px rgba(79, 28, 151, 0.42)) drop-shadow(0 8px 26px rgba(241, 199, 110, 0.12));
  animation: heroLogoFloat 3.8s ease-in-out infinite alternate;
}

.notice-strip {
  position: relative;
  width: min(760px, 100%);
  max-width: 100%;
  margin: -2px auto 0;
  padding: 12px 18px;
  overflow: hidden;
  color: #ffeac0;
  background: linear-gradient(90deg, rgb(25 22 34 / 0%), rgba(96, 52, 32, 0.64), rgb(25 22 34 / 0%));
  box-shadow: var(--shadow);
  font-size: calc(1rem + 1pt);
  white-space: nowrap;
}

.notice-strip::before,
.notice-strip::after {
  position: absolute;
  left: 0;
  width: 100%;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, rgb(241 199 110 / 0%), rgb(241 199 110 / 64%), rgb(241 199 110 / 0%));
}

.notice-strip::before {
  top: 0;
}

.notice-strip::after {
  bottom: 0;
}

.notice-strip strong {
  color: #ffffff;
}

.notice-content {
  display: inline-block;
  max-width: none;
  min-width: max-content;
  padding-left: 100%;
  animation: noticeMarquee var(--marquee-duration, 16s) linear infinite;
}

.notice-strip:hover .notice-content {
  animation-play-state: paused;
}

.social-rail {
  position: fixed;
  top: 50%;
  left: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding: 0.8rem;
  border: 1px solid rgba(241, 199, 110, 0.3);
  border-left: 0;
  border-radius: 0 8px 8px 0;
  background: linear-gradient(180deg, rgba(48, 24, 57, 0.96), rgba(17, 11, 25, 0.96));
  box-shadow:
    0 0 26px rgba(141, 92, 255, 0.26),
    inset 0 1px 0 rgba(255, 235, 177, 0.1);
  transform: translateY(-50%);
  backdrop-filter: blur(10px);
}

.social-rail a {
  display: block;
  width: 28px;
  height: 24px;
}

.social-rail img {
  width: 28px;
  height: 24px;
  filter: sepia(0.7) saturate(1.8) hue-rotate(350deg) brightness(1.14) drop-shadow(0 0 5px rgba(241, 199, 110, 0.2));
  transition: filter 0.15s, transform 0.15s;
}

.social-rail a:hover img,
.social-rail a:focus-visible img {
  filter: sepia(0.5) saturate(2.2) hue-rotate(250deg) brightness(1.3) drop-shadow(0 0 8px rgba(141, 92, 255, 0.85));
  transform: scale(1.08);
}

.server-section {
  width: min(1320px, calc(100% - 36px));
  margin: 0 auto;
}

.server-section {
  margin-top: -8px;
  padding: 0 0 72px;
}

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

.server-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(22px, 5vw, 64px);
  align-items: start;
}

.server-choice {
  position: relative;
  min-width: 0;
  padding: clamp(8px, 2vw, 18px);
  text-align: center;
}

.server-button {
  --glow-x: 0px;
  --glow-y: 0px;
  position: relative;
  display: block;
  width: min(620px, 100%);
  margin: 0 auto 10px;
  border-radius: 8px;
  outline: none;
  isolation: isolate;
}

.server-button::before {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: -1;
  width: min(40%, 248px);
  aspect-ratio: 1;
  border-radius: 50%;
  content: "";
  filter: blur(18px);
  opacity: 0.9;
  pointer-events: none;
  transform: translate(-50%, -50%);
  animation: mysticSpin 8s linear infinite;
}

.server-button::after {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: -2;
  width: min(36%, 224px);
  aspect-ratio: 1;
  border-radius: 50%;
  content: "";
  filter: blur(22px);
  opacity: 0.8;
  pointer-events: none;
  transform: translate(-50%, -50%) translate(var(--glow-x), var(--glow-y));
  animation: mysticSpinPointer 12s linear infinite reverse;
}

.server-choice-world .server-button::before {
  top: 39%;
  left: 29%;
  background: conic-gradient(transparent 0 40%, rgba(241, 199, 110, 0.15) 60%, rgba(84, 197, 150, 0.85) 85%, transparent 100%);
}

.server-choice-world .server-button::after {
  top: 39%;
  left: 29%;
  background: radial-gradient(circle, rgba(225, 255, 188, 0.42), rgba(58, 135, 66, 0.38) 38%, rgba(21, 78, 30, 0.5) 65%, transparent 80%);
}

.server-choice-erebor .server-button::before {
  top: 39%;
  left: 70%;
  background: conic-gradient(transparent 0 40%, rgba(200, 160, 255, 0.15) 60%, rgba(180, 120, 255, 0.85) 85%, transparent 100%);
}

.server-choice-erebor .server-button::after {
  top: 39%;
  left: 70%;
  background: radial-gradient(circle, rgba(220, 180, 255, 0.45), rgba(140, 70, 200, 0.4) 35%, rgba(70, 20, 120, 0.5) 65%, transparent 80%);
}

.server-image {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: contain;
  animation: serverFloat 3s ease-in-out infinite alternate;
  transition: filter 0.3s;
}

.server-choice-world .server-image {
  filter: drop-shadow(0 0 6px rgba(84, 197, 150, 0.4));
}

.server-choice-erebor .server-image {
  filter: drop-shadow(0 0 6px rgba(190, 130, 255, 0.5));
}

.server-choice-world .server-button:hover .server-image,
.server-choice-world .server-button:focus-visible .server-image {
  filter: drop-shadow(0 0 25px rgba(211, 243, 158, 1)) drop-shadow(0 0 50px rgba(54, 138, 66, 0.9));
}

.server-choice-erebor .server-button:hover .server-image,
.server-choice-erebor .server-button:focus-visible .server-image {
  filter: drop-shadow(0 0 25px rgb(210, 170, 255)) drop-shadow(0 0 50px rgba(120, 60, 200, 0.9));
}

.server-button:hover .server-image,
.server-button:focus-visible .server-image {
  animation: serverHover 0.4s ease forwards;
}

.server-name-overlay {
  position: absolute;
  z-index: 3;
  top: 67.2%;
  left: 49%;
  display: flex;
  width: 62%;
  flex-direction: column;
  gap: clamp(1px, 0.25vw, 3px);
  align-items: center;
  justify-content: center;
  color: #fff8dc;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 900;
  line-height: 1;
  pointer-events: none;
  text-align: center;
  text-shadow:
    0 2px 0 #60400f,
    0 4px 0 rgba(16, 44, 10, 0.7),
    0 8px 18px rgba(0, 0, 0, 0.65);
  transform: translate(-50%, -50%);
  animation: serverNameFloat 3s ease-in-out infinite alternate;
}

.server-name-primary {
  font-size: clamp(1.7rem, 4.4vw, 3.7rem);
  line-height: 0.9;
  white-space: nowrap;
}

.server-button:hover .server-name-overlay,
.server-button:focus-visible .server-name-overlay {
  animation: serverNameHover 0.4s ease forwards;
}

.server-description {
  position: relative;
  z-index: 2;
  margin: clamp(-72px, -6vw, -30px) auto 8px;
  color: #cfc5af;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(0.82rem, 1.35vw, 1rem);
  font-weight: 700;
  line-height: 1.35;
  text-shadow: 0 0 6px #000;
}

.date-boxes {
  position: relative;
  display: flex;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  padding: 7px 14px;
  gap: 10px;
  overflow: hidden;
  background: linear-gradient(90deg, rgb(25 22 34 / 0%), rgba(96, 52, 32, 0.64), rgb(25 22 34 / 0%));
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.26);
}

.date-boxes::before,
.date-boxes::after {
  position: absolute;
  left: 0;
  width: 100%;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, rgb(241 199 110 / 0%), rgb(241 199 110 / 64%), rgb(241 199 110 / 0%));
}

.date-boxes::before {
  top: 0;
}

.date-boxes::after {
  bottom: 0;
}

.date-boxes span {
  display: grid;
  min-width: clamp(72px, 8vw, 96px);
  height: 48px;
  place-items: center;
  border: 0;
  border-radius: 0;
  color: #ffe8a9;
  background: transparent;
  box-shadow: none;
  font-size: clamp(0.95rem, 1.8vw, 1.2rem);
  font-weight: 900;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.72);
}

.date-boxes.is-countdown span {
  grid-template-rows: 1fr auto;
  gap: 2px;
  padding: 6px 6px 5px;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
}

.date-boxes small {
  color: #cbb47e;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  padding: 24px clamp(18px, 5vw, 70px) 34px;
  color: rgba(255, 247, 232, 0.72);
  background: rgba(9, 8, 13, 0.9);
}

.site-footer p {
  margin: 0;
}

@media (min-width: 881px) {
  .server-section {
    margin-top: -30px;
  }
}

@media (max-width: 880px) {
  body {
    background-attachment: scroll;
    background-position: 44% top;
  }

  .hero-section {
    min-height: auto;
    padding-top: 66px;
  }

  .hero-brand {
    width: min(280px, 72vw);
  }

  .social-rail {
    position: absolute;
    top: 12px;
    left: 50%;
    flex-direction: row;
    gap: 10px;
    padding: 10px 12px;
    border-left: 1px solid rgba(241, 199, 110, 0.3);
    border-radius: 8px;
    transform: translateX(-50%);
  }

  .server-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .hero-section {
    padding-top: 64px;
    padding-right: 14px;
    padding-left: 14px;
  }

  .server-section {
    width: calc(100% - 28px);
  }

  .date-boxes {
    width: 100%;
    justify-content: center;
    gap: 6px;
    padding: 7px 9px;
  }

  .date-boxes span {
    min-width: 0;
    flex: 1;
    height: 48px;
  }

  .server-choice-world .server-description {
    padding-left: 42px;
  }

  .site-footer {
    justify-content: center;
    text-align: center;
  }
}

@keyframes noticeMarquee {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-100%);
  }
}

@keyframes heroLogoFloat {
  from {
    transform: translateY(0);
  }

  to {
    transform: translateY(-6px);
  }
}

@keyframes mysticSpin {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }

  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@keyframes mysticSpinPointer {
  from {
    transform: translate(-50%, -50%) translate(var(--glow-x), var(--glow-y)) rotate(0deg);
  }

  to {
    transform: translate(-50%, -50%) translate(var(--glow-x), var(--glow-y)) rotate(360deg);
  }
}

@keyframes serverFloat {
  from {
    transform: translateY(0);
  }

  to {
    transform: translateY(-10px);
  }
}

@keyframes serverNameFloat {
  from {
    transform: translate(-50%, -50%);
  }

  to {
    transform: translate(-50%, calc(-50% - 10px));
  }
}

@keyframes serverHover {
  to {
    transform: translateY(-6px) scale(1.05);
  }
}

@keyframes serverNameHover {
  to {
    transform: translate(-50%, calc(-50% - 6px)) scale(1.05);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }

  .particle-canvas {
    display: none;
  }

  .hero-logo,
  .server-image,
  .server-name-overlay,
  .server-button::before,
  .server-button::after {
    animation: none !important;
  }
}
