:root {
  --bg-dark: #11130f;
  --bg-mid: #2b2217;
  --bg-soft: #3a2e1f;
  --panel: rgba(44, 34, 24, 0.95);
  --panel-2: rgba(59, 45, 31, 0.98);
  --panel-light: rgba(146, 179, 141, 0.16);
  --line: rgba(176, 149, 106, 0.26);
  --line-strong: rgba(220, 197, 142, 0.44);
  --text: #f4ead7;
  --muted: #d0bda0;
  --accent: #75b14d;
  --accent-deep: #4b7f2f;
  --accent-soft: #a8de78;
  --green: #78b14f;
  --green-deep: #4f7f34;
  --danger: #f0ab87;
  --shadow: 0 20px 44px rgba(5, 12, 8, 0.42);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --max-width: 1220px;
  --section-gap: 22px;
  --column-gap: clamp(16px, 2vw, 28px);
  --column-gap-tablet: clamp(14px, 1.7vw, 20px);
  --content-pad: clamp(18px, 2.2vw, 28px);
  --pixel-shadow: 0 0 0 1px rgba(28, 20, 12, 0.55), 4px 4px 0 rgba(10, 8, 6, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.6;
  color: var(--text);
  background:
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.015) 0 2px,
      transparent 2px 16px
    ),
    radial-gradient(circle at 20% 6%, rgba(155, 218, 109, 0.1), transparent 36%),
    radial-gradient(circle at 80% 20%, rgba(132, 98, 58, 0.16), transparent 32%),
    linear-gradient(180deg, rgba(10, 16, 10, 0.3), rgba(14, 10, 8, 0.65)),
    linear-gradient(180deg, #1f2a1a 0 12%, var(--bg-dark) 12%, var(--bg-mid) 56%, #1d1710 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.25;
  background:
    linear-gradient(rgba(255, 255, 255, 0.015), rgba(255, 255, 255, 0.015)),
    repeating-linear-gradient(
      45deg,
      rgba(215, 239, 182, 0.02) 0,
      rgba(215, 239, 182, 0.02) 2px,
      transparent 2px,
      transparent 22px
    );
  mix-blend-mode: soft-light;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.08;
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.14) 1px, transparent 1px);
  background-size: 20px 20px;
  mix-blend-mode: multiply;
}

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

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

button,
input,
select,
textarea {
  font: inherit;
}

.auth-screen,
.site-shell {
  position: relative;
  z-index: 1;
}

.floating-icon-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.floating-icon {
  position: absolute;
  width: clamp(56px, 6.5vw, 90px);
  opacity: 0.12;
  filter: drop-shadow(0 10px 16px rgba(6, 14, 9, 0.5));
  animation: iconDrift 10s ease-in-out infinite;
}

.floating-icon.icon-a {
  top: 8%;
  left: 5%;
}

.floating-icon.icon-b {
  top: 40%;
  right: 8%;
  animation-delay: -3s;
}

.floating-icon.icon-c {
  bottom: 8%;
  left: 30%;
  animation-delay: -6s;
}

.auth-screen {
  padding: 34px 18px 64px;
}

.auth-layout,
.container,
.public-donation-footer,
.site-footer {
  width: min(var(--max-width), calc(100% - 32px));
  margin: 0 auto;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  row-gap: var(--section-gap);
  column-gap: var(--column-gap);
}

.panel {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(186, 223, 126, 0.07), transparent 24%),
    linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: var(--content-pad);
  box-shadow: var(--shadow), var(--pixel-shadow);
  transition: box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(140deg, rgba(192, 146, 82, 0.18), transparent 30%, transparent 68%, rgba(114, 171, 76, 0.16));
}

.panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.2;
  background-image:
    linear-gradient(90deg, rgba(0, 0, 0, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(0, 0, 0, 0.08) 1px, transparent 1px);
  background-size: 12px 12px;
}

.panel:hover {
  border-color: rgba(196, 225, 164, 0.4);
  box-shadow: 0 14px 28px rgba(5, 12, 8, 0.34), var(--pixel-shadow);
}

.js-reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.js-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.auth-panel,
.application-panel {
  min-height: 100%;
}

.auth-form {
  margin-top: 22px;
}

.auth-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
}

.auth-actions--register {
  grid-template-columns: auto minmax(0, 1fr);
}

.auth-actions .btn {
  min-height: 42px;
  padding: 0 14px;
  white-space: nowrap;
}

.auth-actions .btn-compact {
  padding: 0 12px;
  font-size: 0.88rem;
}

.auth-status-line {
  margin: 0;
  min-height: 1.2em;
}

.register-details {
  margin-top: 14px;
  border: 1px solid rgba(212, 181, 141, 0.2);
  border-radius: var(--radius-lg);
  background: rgba(255, 248, 235, 0.03);
}

.register-details > summary {
  padding: 12px 14px;
  color: #d9ebc5;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.register-details > summary::-webkit-details-marker {
  display: none;
}

.register-details > summary::after {
  content: "+";
  float: right;
  color: var(--accent-soft);
}

.register-details[open] > summary::after {
  content: "−";
}

.register-form {
  margin-top: 0;
  padding: 0 14px 14px;
  border-top: 1px solid rgba(212, 181, 141, 0.14);
}

.donation-panel {
  display: grid;
  gap: 12px;
}

.donation-footer {
  margin-top: 24px;
  padding-block: clamp(16px, 2vw, 22px);
  border-top: 1px solid rgba(233, 205, 162, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 22%),
    linear-gradient(180deg, rgba(50, 35, 25, 0.98), rgba(63, 44, 31, 0.98));
}

.footer-heading {
  margin-bottom: 0;
}

.footer-donation-grid {
  align-items: stretch;
}

.compact-info-list {
  align-content: start;
}

.donation-status {
  margin: 0;
}

.public-donation-footer {
  margin-top: 18px;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  padding: 6px 12px;
  border: 1px solid rgba(154, 201, 104, 0.42);
  border-radius: 999px;
  background: rgba(95, 156, 54, 0.25);
  color: var(--accent-soft);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "[ ] ";
  color: #b6e783;
}

h1,
h2 {
  margin: 0;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.01em;
  font-family: "Arial Black", "Trebuchet MS", "Segoe UI", sans-serif;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4.2rem);
}

h2 {
  font-size: clamp(1.45rem, 2vw, 2rem);
  margin-bottom: 10px;
}

.lead,
.helper-text,
.form-feedback,
#statusMeta {
  color: var(--muted);
}

.lead {
  margin: 12px 0 0;
  max-width: 65ch;
  font-size: 1rem;
}

.helper-text,
.form-feedback {
  margin: 0;
}

.section-intro {
  margin: 8px 0 0;
}

.error-text {
  color: var(--danger);
}

.success-text {
  color: #bfd8a9;
}

.info-stack,
.notes-list {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.info-card,
.note-card,
.stats-tile,
.server-chip,
.status-pill,
.tag-button,
.player-card,
.list-card {
  background: rgba(255, 248, 235, 0.04);
  border: 1px solid rgba(212, 181, 141, 0.16);
  border-radius: var(--radius-lg);
}

.info-card,
.note-card {
  padding: 15px 16px;
}

.featured-card {
  border-color: rgba(227, 192, 137, 0.38);
  background: linear-gradient(135deg, rgba(213, 163, 93, 0.16), rgba(122, 155, 99, 0.11));
}

.highlights-panel {
  margin-top: var(--section-gap);
}

.highlights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.highlight-card {
  display: grid;
  gap: 8px;
  padding: 18px 18px 16px;
  background: rgba(255, 248, 235, 0.04);
  border: 1px solid rgba(212, 181, 141, 0.16);
  border-radius: var(--radius-lg);
  box-shadow: 0 0 0 1px rgba(18, 35, 24, 0.24), 2px 2px 0 rgba(8, 15, 11, 0.24);
}

.highlight-card.featured {
  border-color: rgba(227, 192, 137, 0.38);
  background: linear-gradient(135deg, rgba(213, 163, 93, 0.16), rgba(122, 155, 99, 0.11));
}

.highlight-tag {
  display: inline-flex;
  align-self: start;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(176, 149, 106, 0.28);
  color: var(--accent-soft);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.highlight-card strong {
  font-size: 1.12rem;
  line-height: 1.25;
}

.highlight-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.highlight-card.has-image {
  padding-top: 0;
  overflow: hidden;
}

.highlight-card-image {
  width: calc(100% + 2px);
  margin: -1px -1px 4px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  border-bottom: 1px solid rgba(212, 181, 141, 0.16);
}

.highlight-card.has-image .highlight-tag {
  margin-top: 14px;
}

.info-label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.stack-form {
  display: grid;
  gap: 15px;
  margin-top: 22px;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  color: #d9ebc5;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid rgba(165, 198, 151, 0.24);
  border-radius: var(--radius-md);
  background: rgba(13, 25, 18, 0.7);
  color: var(--text);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

textarea {
  min-height: 110px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: #9bb391;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent-soft);
  box-shadow: 0 0 0 3px rgba(155, 200, 115, 0.18);
}

select {
  appearance: none;
  padding-right: 40px;
  cursor: pointer;
  border-color: rgba(180, 220, 146, 0.36);
  box-shadow: inset 0 0 0 1px rgba(155, 200, 115, 0.16);
  background-image:
    linear-gradient(45deg, transparent 50%, #c2df9b 50%),
    linear-gradient(135deg, #c2df9b 50%, transparent 50%);
  background-position:
    calc(100% - 19px) 50%,
    calc(100% - 13px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

select option {
  background: #17281d;
  color: var(--text);
}

.platform-select {
  font-weight: 700;
  letter-spacing: 0.01em;
}

.button-row,
.section-heading,
.search-row,
.status-top,
.info-row,
.server-chip-row,
.status-pill-row,
.stats-tile-grid,
.highlights-grid,
.donation-grid,
.content-grid,
.clean-list,
.info-list,
.player-list,
#leaderboardList,
#playtimeLeaderboard,
.roster-preview,
.tracker-list {
  position: relative;
  z-index: 1;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.button-row.center {
  justify-content: flex-start;
}

.button-row .helper-text {
  flex: 1 1 220px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn.primary {
  background:
    linear-gradient(180deg, #8fd35f, #5f9a3a);
  color: #f4ffe7;
  border-color: rgba(208, 239, 178, 0.48);
  box-shadow:
    inset 0 2px 0 rgba(226, 255, 201, 0.45),
    inset 0 -2px 0 rgba(62, 95, 41, 0.56),
    0 0 0 1px rgba(28, 54, 18, 0.6),
    3px 3px 0 rgba(14, 22, 10, 0.5);
}

.btn.secondary {
  background: rgba(182, 144, 88, 0.16);
  border-color: rgba(210, 171, 114, 0.36);
  color: var(--text);
  box-shadow:
    inset 0 2px 0 rgba(255, 219, 164, 0.28),
    inset 0 -2px 0 rgba(98, 66, 37, 0.6),
    0 0 0 1px rgba(49, 32, 18, 0.48),
    2px 2px 0 rgba(18, 12, 8, 0.34);
}

.btn.secondary:hover {
  background: rgba(195, 157, 99, 0.24);
}

.btn:active {
  transform: translateY(1px);
  box-shadow:
    inset 0 1px 0 rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(34, 24, 15, 0.65);
}

.btn:disabled,
.btn.is-disabled,
.btn[aria-disabled="true"] {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
  box-shadow: none;
  transform: none;
}

.hero-header {
  position: relative;
  overflow: hidden;
  padding: 46px 0 32px;
  border-bottom: 1px solid rgba(165, 198, 117, 0.25);
}

.header-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(129, 190, 76, 0.16), transparent 22%),
    radial-gradient(circle at top center, rgba(166, 210, 116, 0.18), transparent 38%),
    linear-gradient(180deg, rgba(10, 20, 13, 0.16), rgba(17, 12, 9, 0.66));
}

.header-content,
.container {
  position: relative;
  z-index: 1;
}

.header-content {
  width: min(var(--max-width), calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  gap: 18px;
}

.hero-brand-wrap {
  position: relative;
  width: max-content;
}

.hero-orbit {
  position: absolute;
  inset: -8px;
  border-radius: 26px;
  border: 1px dashed rgba(176, 214, 139, 0.34);
  animation: orbitSpin 12s linear infinite;
}

.logo {
  width: 88px;
  height: 88px;
  border-radius: 20px;
  border: 1px solid rgba(174, 206, 146, 0.26);
  background: rgba(229, 245, 211, 0.08);
  padding: 10px;
  image-rendering: pixelated;
}

.interactive-pop {
  animation: iconPulse 3s ease-in-out infinite;
}

.title-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.centered-title {
  justify-content: center;
}

.inline-server-icon {
  display: inline-block;
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 1px solid rgba(174, 206, 146, 0.34);
  background:
    rgba(229, 245, 211, 0.08) url("server-icon-64.png") center / 18px 18px no-repeat;
  padding: 4px;
  image-rendering: pixelated;
}

.announcement-banner,
.status-panel,
.donation-callout {
  padding: 14px 16px;
  border: 1px solid rgba(169, 201, 142, 0.24);
  border-radius: var(--radius-lg);
  background: rgba(222, 242, 199, 0.06);
}

.announcement-banner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
}

.announcement-banner p {
  margin: 0;
}

.announcement-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  height: 32px;
  border-radius: 999px;
  background: rgba(136, 187, 98, 0.32);
  color: #efffe1;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.server-chip-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.server-chip,
.status-pill,
.stats-tile,
.tag-button {
  padding: 14px 16px;
  box-shadow: 0 0 0 1px rgba(18, 35, 24, 0.24), 2px 2px 0 rgba(8, 15, 11, 0.24);
}

.status-panel {
  display: grid;
  gap: 14px;
}

.status-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.status-bar {
  height: 12px;
  border-radius: 999px;
  background: rgba(227, 245, 210, 0.08);
  overflow: hidden;
  border: 1px solid rgba(170, 202, 144, 0.16);
}

.status-fill {
  width: 30%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #4f7440 0 33%, #79a75a 33% 66%, #c4e09f 66% 100%);
}

.status-fill.online {
  background: linear-gradient(90deg, #5a8247 0 33%, #7eae5c 33% 66%, #d8edb6 66% 100%);
}

.status-fill.live-pulse {
  animation: statusPulse 1.1s ease;
}

.status-pill-row,
.stats-tile-grid,
.content-grid,
.donation-grid {
  display: grid;
  gap: 14px;
}

.status-pill-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.container {
  padding: 28px 0 60px;
}

.content-grid {
  margin-top: var(--section-gap);
  row-gap: var(--section-gap);
  column-gap: var(--column-gap);
  align-items: stretch;
}

.intro-grid {
  grid-template-columns: repeat(2, minmax(320px, 1fr));
  align-items: stretch;
}

.two-up {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.two-up > .panel,
.auth-layout > .panel {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.section-heading.tight-top {
  margin-top: 18px;
  margin-bottom: 12px;
}

.subheading {
  font-size: clamp(1.15rem, 1.6vw, 1.45rem);
  margin: 0;
}

.info-list,
.clean-list,
.notes-list,
.player-list,
#leaderboardList,
#playtimeLeaderboard,
.roster-preview,
.tracker-list {
  display: grid;
  gap: 12px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(212, 181, 141, 0.12);
}

.info-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.info-row span {
  color: var(--muted);
}

.clean-list {
  margin: 0;
  padding-left: 20px;
}

.clean-list li + li {
  margin-top: 10px;
}

.stats-tile-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.intro-grid .stats-tile-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stats-tile-grid.wide {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 18px;
}

.note-card {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.note-card span:last-child,
.note-card strong:last-child {
  text-align: right;
}

.note-card strong:first-child,
.note-card span:first-child {
  flex: 1 1 180px;
}

.note-card span:last-child,
.note-card strong:last-child {
  flex: 1 1 180px;
}

.search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 14px;
}

.player-list,
#leaderboardList,
#playtimeLeaderboard,
.roster-preview {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.player-item,
.directory-row,
.leaderboard-row,
.tracker-row {
  width: 100%;
  min-height: 54px;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(212, 181, 141, 0.14);
  background: rgba(255, 248, 235, 0.04);
}

.player-item {
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

input,
textarea {
  cursor: text;
}

.player-item:hover,
.tag-button:hover {
  border-color: rgba(189, 220, 153, 0.4);
  background: rgba(227, 245, 210, 0.12);
  transform: translateY(-1px);
}

.directory-row,
.leaderboard-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.tracker-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
}

.tracker-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(168, 198, 143, 0.24);
  background: rgba(224, 244, 204, 0.08);
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.tracker-badge.join {
  border-color: rgba(151, 210, 128, 0.45);
  background: rgba(118, 183, 97, 0.2);
}

.tracker-badge.leave {
  border-color: rgba(236, 178, 151, 0.45);
  background: rgba(171, 113, 92, 0.2);
}

.tracker-badge.system {
  border-color: rgba(162, 195, 235, 0.45);
  background: rgba(98, 129, 169, 0.22);
}

.directory-row span,
.leaderboard-row span:first-child {
  min-width: 0;
}

.directory-row span:first-child,
.leaderboard-row span:first-child,
.stats-tile strong,
.server-chip strong,
.status-pill,
.info-card strong,
.note-card strong,
.donation-callout strong {
  overflow-wrap: anywhere;
}

.tag-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  color: var(--text);
  background: rgba(255, 248, 235, 0.05);
  border: 1px solid rgba(212, 181, 141, 0.14);
}

.member-donation-panel {
  margin-top: 18px;
}

#playersOnlineSection,
#playerTrackerSection,
#liveChatSection,
#mapSection {
  margin-top: var(--section-gap);
}

.donation-grid {
  grid-template-columns: 1fr;
  align-items: start;
  gap: 12px;
}

.donation-panel .section-heading {
  margin-bottom: 0;
  align-items: center;
}

.donation-panel h2 {
  margin-bottom: 0;
}

.donation-callout {
  gap: 4px;
}

.donation-callout strong,
.donation-callout span {
  display: block;
}

.donation-callout span {
  display: none;
  font-size: 0.95rem;
}

.compact-info-list,
.donation-status {
  display: none;
}

.map-frame {
  width: 100%;
  min-height: 520px;
  margin-top: 14px;
  border: 1px solid rgba(166, 196, 139, 0.2);
  border-radius: 18px;
  background: #122119;
}

.site-footer {
  margin: 0 auto 34px;
  padding-top: 14px;
  color: var(--muted);
  text-align: center;
}

@keyframes iconDrift {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-10px) rotate(4deg);
  }
}

@keyframes iconPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

@keyframes orbitSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes statusPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(168, 214, 123, 0.65);
  }
  100% {
    box-shadow: 0 0 0 10px rgba(168, 214, 123, 0);
  }
}

#playerList > *,
#leaderboardList > *,
#playtimeLeaderboard > *,
#rosterPreview > * {
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(212, 181, 141, 0.14);
  background: rgba(255, 248, 235, 0.04);
}

@media (max-width: 1120px) {
  .two-up,
  .donation-grid {
    grid-template-columns: 1fr 1fr;
    column-gap: var(--column-gap-tablet);
  }

  .stats-tile-grid,
  .stats-tile-grid.wide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .auth-layout,
  .intro-grid,
  .two-up,
  .donation-grid,
  .server-chip-row,
  .status-pill-row,
  .stats-tile-grid,
  .stats-tile-grid.wide {
    grid-template-columns: 1fr;
    row-gap: 12px;
    column-gap: 0;
  }

  .section-heading,
  .status-top,
  .note-card,
  .info-row,
  .directory-row,
  .leaderboard-row {
    grid-template-columns: 1fr;
    display: grid;
    align-items: start;
  }

  #playerTrackerList .tracker-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
  }

  .live-chat-row {
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 10px;
    row-gap: 4px;
  }

  .note-card strong:last-child,
  .note-card span:last-child {
    text-align: left;
  }

  .btn {
    width: 100%;
  }

  .auth-actions,
  .auth-actions--register {
    grid-template-columns: 1fr;
  }

  .auth-actions .btn-compact {
    width: 100%;
  }

  .title-with-icon {
    align-items: flex-start;
  }

  .footer-heading .btn {
    width: 100%;
  }

  .button-row.center {
    justify-content: flex-start;
  }

  .search-row {
    grid-template-columns: 1fr;
  }

  .map-frame {
    min-height: 380px;
  }

  .donation-footer {
    padding-block: 14px;
  }

  .donation-panel {
    gap: 10px;
  }

  .donation-panel .section-heading {
    gap: 10px;
  }

  .donation-callout {
    padding: 12px 14px;
  }

  .donation-status {
    font-size: 0.84rem;
  }
}

@media (max-width: 560px) {
  .auth-screen,
  .container,
  .hero-header {
    padding-left: 0;
    padding-right: 0;
  }

  .auth-layout,
  .header-content,
  .container,
  .site-footer,
  .public-donation-footer {
    width: min(var(--max-width), calc(100% - 20px));
  }

  .panel {
    padding: 18px;
    border-radius: 18px;
  }

  .donation-footer {
    padding-block: 12px;
  }

  .public-donation-footer,
  .member-donation-panel {
    margin-top: 14px;
  }

  .donation-panel {
    gap: 8px;
  }

  .donation-panel .eyebrow {
    margin-bottom: 8px;
    padding: 5px 10px;
  }

  .donation-panel h2 {
    font-size: 1.3rem;
  }

  .donation-callout {
    padding: 10px 12px;
    border-radius: 14px;
  }

  .donation-callout strong {
    font-size: 0.95rem;
  }

  .donation-callout span {
    display: none;
    font-size: 0.88rem;
  }

  .compact-info-list,
  .donation-status {
    display: none;
  }

  .donation-panel .btn {
    min-height: 42px;
  }

  .donation-status {
    font-size: 0.8rem;
  }

  h1 {
    font-size: 2.2rem;
  }

  .button-row,
  .footer-heading {
    align-items: stretch;
  }

  .announcement-banner {
    grid-template-columns: 1fr;
  }

  .note-card span:last-child,
  .note-card strong:last-child {
    text-align: left;
  }
}

/* --- Map login helper page (dynmap-login.html) --- */
.auth-layout--single {
  grid-template-columns: minmax(0, 1fr);
  max-width: 720px;
}

.auth-layout--single .auth-panel,
.auth-layout--single .map-login-panel {
  min-height: auto;
}

.auth-screen--map-login {
  padding-bottom: 28px;
}

.map-login-lead {
  max-width: 58ch;
}

.map-login-panel .panel,
.map-login-panel {
  padding-bottom: 22px;
}

.map-login-steps {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  gap: 18px;
}

.map-login-step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: start;
  padding: 18px 18px 18px 16px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(212, 181, 141, 0.2);
  background: rgba(255, 248, 235, 0.05);
}

.map-login-step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--bg-dark);
  background: linear-gradient(145deg, var(--accent-soft), var(--accent));
  box-shadow: 0 4px 0 rgba(40, 62, 28, 0.35);
}

.map-login-step-body {
  min-width: 0;
}

.map-login-step-body strong {
  display: block;
  font-size: 1.05rem;
  margin-bottom: 8px;
  color: #e8f5dc;
}

.map-login-step-body p {
  margin: 0 0 8px;
}

.map-login-step-body p:last-child {
  margin-bottom: 0;
}

.map-login-command {
  margin: 10px 0 !important;
}

.map-login-hint {
  margin-top: 10px !important;
}

.map-login-actions {
  margin-top: 26px;
  flex-wrap: wrap;
  gap: 12px;
}

.map-login-footnote {
  margin-top: 18px;
  max-width: 58ch;
}

.map-login-site-footer {
  margin-top: 28px;
  text-align: center;
  opacity: 0.85;
}

.map-section-map-login-note {
  margin-top: 10px;
}

.panel code,
.map-login-panel code {
  font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
  font-size: 0.88em;
  padding: 3px 8px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(165, 198, 151, 0.2);
  word-break: break-all;
}

a.text-link {
  color: var(--accent-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
}

a.text-link:hover {
  color: var(--accent);
}

/* Join/leave feed + live chat — single-column activity streams */
#playerTrackerSection .section-heading,
#liveChatSection .section-heading {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  margin-bottom: 14px;
}

#playerTrackerSummary,
#liveChatSummary {
  margin: 0;
  text-align: right;
}

#playerTrackerList.tracker-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#playerTrackerList .tracker-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

#playerTrackerList .tracker-row > span:nth-child(2) {
  min-width: 0;
  line-height: 1.35;
}

#playerTrackerList .tracker-row .helper-text {
  white-space: nowrap;
  margin: 0;
}

.live-chat-messages {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 320px;
  overflow-y: auto;
  margin: 0 0 16px;
  padding: 12px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(212, 181, 141, 0.14);
  background: rgba(0, 0, 0, 0.22);
}

.live-chat-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 12px;
  row-gap: 4px;
  align-items: start;
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(212, 181, 141, 0.12);
  background: rgba(255, 248, 235, 0.04);
}

.live-chat-row.web {
  border-color: rgba(240, 199, 123, 0.28);
}

.live-chat-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  grid-row: 1 / span 2;
  align-self: center;
  min-width: 42px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.live-chat-badge.minecraft {
  border: 1px solid rgba(168, 198, 143, 0.24);
  background: rgba(224, 244, 204, 0.08);
}

.live-chat-badge.web {
  border: 1px solid rgba(240, 199, 123, 0.35);
  background: rgba(240, 199, 123, 0.12);
  color: #f0c77b;
}

.live-chat-user {
  grid-column: 2;
  margin: 0;
  color: var(--accent-soft);
  line-height: 1.2;
}

.player-admin-suffix {
  color: #e74c3c;
  font-weight: 600;
}

.directory-you-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(189, 220, 153, 0.45);
  background: rgba(227, 245, 210, 0.14);
  color: var(--accent-soft);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: middle;
}

.directory-row.is-self {
  border-color: rgba(189, 220, 153, 0.42);
  background: rgba(227, 245, 210, 0.1);
}

.live-chat-text {
  grid-column: 2;
  margin: 0;
  color: var(--text);
  line-height: 1.4;
  word-break: break-word;
}

.live-chat-form {
  display: grid;
  gap: 12px;
  margin-top: 0;
}

.live-chat-field {
  margin: 0;
}

.live-chat-form .button-row {
  margin-top: 0;
}

@media (max-width: 560px) {
  #playerTrackerList .tracker-row {
    grid-template-columns: auto minmax(0, 1fr);
    row-gap: 6px;
  }

  #playerTrackerList .tracker-row .helper-text {
    grid-column: 2;
    justify-self: start;
    white-space: normal;
  }
}

body.modal-open {
  overflow: hidden;
}

.age-gate-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 20px;
}

.age-gate-modal[hidden] {
  display: none;
}

.age-gate-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 10, 8, 0.78);
  backdrop-filter: blur(4px);
}

.age-gate-modal__panel {
  position: relative;
  width: min(100%, 420px);
  padding: clamp(22px, 4vw, 30px);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  box-shadow: var(--shadow), var(--pixel-shadow);
  text-align: center;
}

.age-gate-modal__panel h2 {
  margin: 0 0 12px;
  font-size: clamp(1.35rem, 3vw, 1.65rem);
  color: var(--danger);
  letter-spacing: 0.02em;
}

.age-gate-modal--info h2 {
  color: var(--accent-soft);
}

.age-gate-modal__text {
  margin: 0 0 12px;
  color: var(--muted);
}

.age-gate-modal__note {
  margin: 0 0 20px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(168, 198, 143, 0.22);
  background: rgba(117, 177, 77, 0.1);
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.5;
}

.age-gate-modal__note strong {
  color: var(--accent-soft);
}

.age-gate-modal__actions {
  margin-top: 0;
}

/* ============ HALLOWEEN HAUNTED THEME 🎃 ============ */
body.halloween-on {
  --bg-dark: #0e080f;
  --bg-mid: #1e0f1a;
  --bg-soft: #331421;
  --panel: rgba(38, 16, 28, 0.96);
  --panel-2: rgba(55, 22, 32, 0.98);
  --panel-light: rgba(255, 140, 40, 0.14);
  --line: rgba(255, 140, 40, 0.28);
  --line-strong: rgba(255, 170, 60, 0.5);
  --text: #ffe9d2;
  --muted: #e0b48a;
  --accent: #ff7a1a;
  --accent-deep: #b34a00;
  --accent-soft: #ffb347;
  --green: #ff8c1a;
  --green-deep: #9c4a00;
  --danger: #ff8a9a;
  --shadow: 0 20px 44px rgba(10, 2, 8, 0.6);
}

body.halloween-on {
  background:
    repeating-linear-gradient(0deg, rgba(255, 120, 20, 0.02) 0 2px, transparent 2px 16px),
    radial-gradient(circle at 85% 6%, rgba(255, 140, 30, 0.22), transparent 32%),
    radial-gradient(circle at 15% 12%, rgba(150, 40, 180, 0.2), transparent 36%),
    linear-gradient(180deg, rgba(20, 5, 15, 0.5), rgba(12, 4, 10, 0.75)),
    linear-gradient(180deg, #241019 0 12%, var(--bg-dark) 12%, var(--bg-mid) 56%, #12060d 100%);
}

body.halloween-on .eyebrow {
  border-color: rgba(255, 150, 50, 0.5);
  background: rgba(255, 110, 20, 0.22);
  color: #ffd8a3;
  box-shadow: 0 0 14px rgba(255, 130, 30, 0.35);
}

body.halloween-on .eyebrow::before {
  content: "🎃 ";
  color: #ffb347;
}

body.halloween-on h1, body.halloween-on h2 {
  text-shadow: 0 2px 0 rgba(60, 10, 0, 0.8), 0 0 22px rgba(255, 120, 20, 0.35);
}

body.halloween-on .btn.primary {
  background: linear-gradient(180deg, #ffa53b, #e05e00);
  border-color: rgba(255, 210, 140, 0.55);
  color: #1a0a00;
  text-shadow: 0 1px 0 rgba(255, 230, 190, 0.6);
  box-shadow: inset 0 2px 0 rgba(255, 235, 200, 0.5), inset 0 -2px 0 rgba(120, 40, 0, 0.6), 0 0 0 1px rgba(60, 20, 0, 0.6), 0 0 18px rgba(255, 120, 20, 0.45), 3px 3px 0 rgba(10, 4, 2, 0.6);
}

body.halloween-on .btn.secondary {
  background: rgba(120, 40, 90, 0.22);
  border-color: rgba(200, 120, 200, 0.4);
}

body.halloween-on .btn.secondary:hover {
  background: rgba(160, 60, 120, 0.32);
}

body.halloween-on .panel::before {
  background: linear-gradient(140deg, rgba(255, 130, 30, 0.2), transparent 30%, transparent 68%, rgba(150, 40, 180, 0.18));
}

body.halloween-on .panel:hover {
  border-color: rgba(255, 170, 80, 0.5);
}

body.halloween-on .header-overlay {
  background:
    linear-gradient(180deg, rgba(255, 130, 30, 0.18), transparent 26%),
    radial-gradient(circle at top center, rgba(255, 150, 40, 0.22), transparent 40%),
    radial-gradient(circle at 85% 10%, rgba(255, 200, 120, 0.14), transparent 22%),
    linear-gradient(180deg, rgba(20, 5, 15, 0.2), rgba(12, 4, 8, 0.7));
}

body.halloween-on .status-fill.online {
  background: linear-gradient(90deg, #7a2e00 0 33%, #ff7a1a 33% 66%, #ffd88a 66% 100%);
}

body.halloween-on input:focus, body.halloween-on select:focus, body.halloween-on textarea:focus {
  border-color: var(--accent-soft);
  box-shadow: 0 0 0 3px rgba(255, 130, 30, 0.25), 0 0 16px rgba(255, 130, 30, 0.3);
}

body.halloween-on .field span { color: #ffd9a8; }
body.halloween-on input::placeholder, body.halloween-on textarea::placeholder { color: #b07a4a; }
body.halloween-on a.text-link { color: #ffb347; }

/* Banner + floating toggle */
.halloween-banner {
  position: relative;
  z-index: 3;
  width: min(var(--max-width), calc(100% - 32px));
  margin: 14px auto 0;
  padding: 12px 16px;
  text-align: center;
  font-weight: 700;
  font-size: 0.95rem;
  color: #1c0a00;
  background: linear-gradient(90deg, #ffb347, #ff7a1a, #c95bff, #ffb347);
  background-size: 300% 100%;
  animation: candySlide 8s linear infinite;
  border-radius: 14px;
  border: 2px dashed rgba(30, 10, 0, 0.5);
  box-shadow: 0 6px 22px rgba(255, 110, 20, 0.4);
}
@keyframes candySlide { to { background-position: 300% 0; } }

.halloween-toggle {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 2000;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 180, 90, 0.6);
  background: linear-gradient(180deg, #2a1020, #160710);
  color: #ffd8a3;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(0,0,0,0.5), 0 0 14px rgba(255,130,30,0.4);
}
.halloween-toggle:hover { transform: translateY(-1px); }

/* Event card */
.halloween-event-card {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 150, 50, 0.4);
  background: linear-gradient(135deg, rgba(255,130,30,0.16), rgba(140,40,160,0.16));
  box-shadow: 0 0 0 1px rgba(0,0,0,0.3), 0 0 22px rgba(255,120,20,0.25);
}
.halloween-event-card strong { display: block; color: #ffd8a3; font-size: 1.05rem; }
.halloween-event-card span { color: var(--muted); font-size: 0.95rem; }
.halloween-event-emoji { font-size: 1.6rem; filter: drop-shadow(0 0 8px rgba(255,150,40,0.7)); animation: iconPulse 2.2s ease-in-out infinite; }

/* FX layers */
.halloween-fx { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
body:not(.halloween-on) .halloween-fx, body:not(.halloween-on) .halloween-banner { display: none; }

.halloween-moon {
  position: absolute;
  top: 26px;
  right: 6%;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff6d8, #ffcf6e 55%, #e89a1e 100%);
  box-shadow: 0 0 40px 12px rgba(255, 190, 80, 0.45), 0 0 90px 30px rgba(255, 140, 30, 0.2);
  animation: moonGlow 3.5s ease-in-out infinite;
}
.halloween-moon::after {
  content: "🦇";
  position: absolute;
  left: -34px;
  top: 22px;
  font-size: 1.6rem;
  animation: batFly 6s ease-in-out infinite;
}
@keyframes moonGlow { 0%,100% { box-shadow: 0 0 40px 12px rgba(255,190,80,0.45), 0 0 90px 30px rgba(255,140,30,0.2);} 50% { box-shadow: 0 0 55px 18px rgba(255,190,80,0.6), 0 0 110px 40px rgba(255,140,30,0.3);} }
@keyframes batFly { 0%,100% { transform: translate(0,0) rotate(-10deg);} 50% { transform: translate(18px,-14px) rotate(10deg);} }

.halloween-fog {
  position: absolute;
  left: -20%;
  width: 140%;
  height: 180px;
  opacity: 0.5;
  filter: blur(18px);
  background: radial-gradient(ellipse at center, rgba(200,140,200,0.28), transparent 70%);
}
.halloween-fog.fog-a { bottom: -20px; animation: fogDrift 18s ease-in-out infinite alternate; }
.halloween-fog.fog-b { bottom: 40px; animation: fogDrift 26s ease-in-out infinite alternate-reverse; opacity: 0.35; }
@keyframes fogDrift { from { transform: translateX(-4%);} to { transform: translateX(4%);} }

.cobweb { position: absolute; font-size: 3.2rem; opacity: 0.9; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.6)); }
.cobweb-tl { top: 0; left: 0; transform: scaleX(-1); }
.cobweb-tr { top: 0; right: 0; }
@media (max-width: 560px) { .cobweb { font-size: 2.2rem; } .halloween-moon { width: 64px; height: 64px; } }

.halloween-fall { position: absolute; inset: 0; }
.halloween-fall span {
  position: absolute;
  top: -8%;
  animation-name: spookyFall;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.5));
  user-select: none;
}
@keyframes spookyFall {
  0% { transform: translateY(-10vh) rotate(0deg); opacity: 0; }
  8% { opacity: 0.9; }
  100% { transform: translateY(112vh) rotate(340deg); opacity: 0.7; }
}

.spooky-face { display: inline-block; animation: spookyBob 2.4s ease-in-out infinite; filter: drop-shadow(0 0 10px rgba(255,150,40,0.8)); }
@keyframes spookyBob { 0%,100% { transform: translateY(0) rotate(-6deg);} 50% { transform: translateY(-4px) rotate(6deg);} }
.spooky-sub { color: #ffb347; }
.spooky-blink { display: inline-block; animation: spookyBlink 1.6s steps(2) infinite; }
@keyframes spookyBlink { 50% { opacity: 0.2; } }

body.halloween-on .logo { border-color: rgba(255,170,80,0.5); box-shadow: 0 0 18px rgba(255,130,30,0.5); }
body.halloween-on .floating-icon { opacity: 0.08; filter: hue-rotate(-40deg) saturate(1.4) drop-shadow(0 10px 16px rgba(20,4,0,0.6)); }
body.halloween-on .player-item:hover { border-color: rgba(255,170,80,0.5); background: rgba(255,140,40,0.14); }
body.halloween-on .tracker-badge.join { border-color: rgba(255,150,50,0.6); background: rgba(255,120,20,0.22); }
body.halloween-on .live-chat-badge.web { border-color: rgba(200,120,255,0.5); background: rgba(140,40,180,0.22); color: #e3b8ff; }
body.halloween-on .live-chat-user { color: #ffb347; }
body.halloween-on .announcement-banner { border-color: rgba(255,150,50,0.4); background: rgba(255,130,30,0.1); }

@media (prefers-reduced-motion: reduce) {
  .halloween-fall span, .halloween-moon, .halloween-fog, .halloween-banner, .spooky-face { animation: none !important; }
}

/* ============ HORROR MODE: SCARIER 🩸💀 ============ */
body.halloween-on.horror-armed {
  --bg-dark: #050205;
  --bg-mid: #140307;
  --text: #ffdfd0;
  --muted: #c98a7a;
  --accent: #ff1a1a;
  --accent-soft: #ff5a3c;
  background:
    repeating-linear-gradient(0deg, rgba(255, 0, 0, 0.035) 0 2px, transparent 2px 16px),
    radial-gradient(circle at 85% 6%, rgba(255, 20, 20, 0.28), transparent 34%),
    radial-gradient(circle at 12% 10%, rgba(120, 0, 20, 0.35), transparent 40%),
    linear-gradient(180deg, rgba(30, 0, 5, 0.65), rgba(5, 0, 2, 0.9)),
    linear-gradient(180deg, #1a0208 0 12%, #050205 12%, #140307 60%, #000 100%);
}

body.halloween-on.horror-armed h1,
body.halloween-on.horror-armed h2 {
  color: #ffd9c9;
  text-shadow: 0 2px 0 #300000, 0 0 12px rgba(255,0,0,0.8), 0 0 34px rgba(255,0,0,0.5), 2px 0 0 rgba(120,0,0,0.9);
  animation: titleFlicker 4.2s infinite;
}
@keyframes titleFlicker {
  0%,100% { opacity: 1; }
  3% { opacity: 0.6; } 4% { opacity: 1; }
  41% { opacity: 1; } 42% { opacity: 0.4; } 43% { opacity: 1; } 44% { opacity: 0.7; } 45% { opacity: 1; }
  78% { opacity: 1; } 79% { opacity: 0.55; } 80% { opacity: 1; }
}

body.halloween-on.horror-armed .panel {
  border-color: rgba(255, 30, 30, 0.35);
  animation: candleFlicker 5s infinite;
}
@keyframes candleFlicker {
  0%,100% { box-shadow: var(--shadow), var(--pixel-shadow), 0 0 18px rgba(255,40,20,0.12); }
  50% { box-shadow: var(--shadow), var(--pixel-shadow), 0 0 30px rgba(255,40,20,0.28); }
}

body.halloween-on.horror-armed .halloween-banner {
  color: #fff;
  background: linear-gradient(90deg, #5a0000, #ff1a1a, #2a0000, #ff5a3c, #5a0000);
  background-size: 300% 100%;
  border: 2px solid #ff1a1a;
  text-shadow: 0 0 8px #000, 0 0 18px rgba(255,0,0,0.9);
  animation: candySlide 5s linear infinite, bannerPulse 1.8s ease-in-out infinite;
}
@keyframes bannerPulse { 0%,100% { box-shadow: 0 6px 22px rgba(255,0,0,0.5);} 50% { box-shadow: 0 6px 34px rgba(255,0,0,0.9);} }

.halloween-moon.blood-moon {
  background: radial-gradient(circle at 38% 35%, #ffd0c0, #ff4a3c 52%, #7a0000 100%);
  box-shadow: 0 0 50px 16px rgba(255, 20, 20, 0.55), 0 0 120px 40px rgba(150, 0, 0, 0.35);
}

.blood-vignette {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, transparent 52%, rgba(60,0,0,0.55) 82%, rgba(0,0,0,0.92) 100%);
}
.ground-mist {
  position: absolute; left: -20%; bottom: -30px; width: 140%; height: 220px;
  background: radial-gradient(ellipse at center, rgba(160,0,10,0.22), transparent 70%);
  filter: blur(22px); animation: fogDrift 14s ease-in-out infinite alternate;
}
.halloween-fog.fog-c { bottom: 110px; opacity: 0.42; animation-duration: 20s; }
.blood-drip {
  position: absolute; top: 0; left: 0; right: 0; text-align: center;
  font-size: 1.1rem; letter-spacing: 6px; opacity: 0.85;
  filter: drop-shadow(0 2px 4px rgba(255,0,0,0.7));
}
.lightning {
  position: absolute; inset: 0; opacity: 0; background: #e8f0ff; pointer-events: none;
}
body.lightning-strike .lightning { animation: lightningFlash 0.38s ease-out; }
@keyframes lightningFlash { 0% { opacity: 0.85; } 20% { opacity: 0.1; } 40% { opacity: 0.7; } 100% { opacity: 0; } }
body.lightning-strike { filter: brightness(1.25); }

/* haunt gate */
.haunt-gate {
  position: fixed; inset: 0; z-index: 3000;
  display: grid; place-items: center; padding: 20px;
  background: radial-gradient(circle at center, rgba(40,0,0,0.92), rgba(0,0,0,0.98));
  backdrop-filter: blur(3px);
}
.haunt-gate[hidden] { display: none; }
.haunt-gate-card {
  width: min(100%, 460px); text-align: center;
  padding: 30px 26px; border-radius: 18px;
  border: 2px solid rgba(255,30,30,0.6);
  background: linear-gradient(180deg, #1c0508, #0a0203);
  box-shadow: 0 0 60px rgba(255,0,0,0.35), 0 20px 60px rgba(0,0,0,0.8);
  animation: gateShake 0.6s ease-in-out 0.4s 2;
}
@keyframes gateShake { 0%,100% { transform: translateX(0);} 25% { transform: translateX(-6px) rotate(-0.6deg);} 75% { transform: translateX(6px) rotate(0.6deg);} }
.haunt-skull { font-size: 4rem; animation: spookyBob 1.4s ease-in-out infinite; filter: drop-shadow(0 0 18px rgba(255,0,0,0.9)); }
.haunt-gate-card h2 { font-size: 2rem; letter-spacing: 0.08em; color: #ff3b3b; margin: 8px 0 12px; }
.haunt-warning { color: #e8b0a0; font-size: 0.95rem; }
.haunt-warning code { color: #ffb0a0; }
.haunt-enter-btn { width: 100%; margin-top: 14px; font-size: 1.05rem; animation: bannerPulse 1.5s infinite; }
.haunt-opt { display: flex; gap: 8px; align-items: center; justify-content: center; margin-top: 14px; color: #d89a8a; font-size: 0.9rem; cursor: pointer; }
.haunt-opt input { width: 18px; height: 18px; accent-color: #ff1a1a; }
.haunt-quiet { margin-top: 10px; background: none; border: none; color: #8a6a60; text-decoration: underline; cursor: pointer; font-size: 0.85rem; }

/* JUMPSCARE */
.jumpscare-overlay {
  position: fixed; inset: 0; z-index: 4000;
  display: grid; place-items: center; align-content: center; gap: 6px;
  background: #000; cursor: pointer; text-align: center;
  animation: scareStrobe 0.18s steps(2) infinite;
}
.jumpscare-overlay[hidden] { display: none; }
@keyframes scareStrobe { 0% { background: #000; } 50% { background: #4a0000; } 100% { background: #000; } }
.jumpscare-flash { position: absolute; inset: 0; background: radial-gradient(circle, rgba(255,0,0,0.5), transparent 70%); animation: lightningFlash 0.25s infinite; }
.jumpscare-face {
  font-size: clamp(9rem, 34vw, 22rem); line-height: 1;
  animation: scareShake 0.12s linear infinite;
  filter: drop-shadow(0 0 40px rgba(255,0,0,1)) drop-shadow(0 0 90px rgba(255,0,0,0.8));
}
@keyframes scareShake {
  0% { transform: scale(1.15) translate(-8px, 6px) rotate(-3deg); }
  50% { transform: scale(1.3) translate(8px, -6px) rotate(3deg); }
  100% { transform: scale(1.2) translate(-5px, -4px) rotate(-2deg); }
}
.jumpscare-text { color: #ff1a1a; font-size: clamp(1.6rem, 6vw, 3rem); font-weight: 900; letter-spacing: 0.12em; text-shadow: 0 0 20px #ff0000, 0 2px 0 #000; }
.jumpscare-sub { color: #ffb0a0; }

@media (prefers-reduced-motion: reduce) {
  body.halloween-on.horror-armed h1, body.halloween-on.horror-armed h2,
  .haunt-gate-card, .jumpscare-face, .jumpscare-overlay, .lightning { animation: none !important; }
  .jumpscare-face { transform: scale(1.1); }
}
