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

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #050507;
}

::-webkit-scrollbar-thumb {
  background: #2a080c;
  border: 1px solid #50000a;
}

::-webkit-scrollbar-thumb:hover {
  background: #66000e;
}

body {
  background-color: #050406;
  background-image:
    linear-gradient(
      180deg,
      rgba(4, 3, 5, 0.62) 0%,
      rgba(8, 3, 7, 0.8) 48%,
      rgba(4, 2, 5, 0.9) 100%
    ),
    radial-gradient(
      ellipse at 50% 42%,
      rgba(122, 10, 29, 0.24) 0%,
      transparent 66%
    ),
    url("../noticebg.jpg");
  background-position: center;
  background-repeat: no-repeat;
  background-size: auto, auto, cover;
  background-attachment: fixed;
  color: #b8b8c2;
  font-family: "Cinzel", serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 80px;
  padding-bottom: 7rem;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.025) 0 1px,
      transparent 1px 4px
    ),
    linear-gradient(
      90deg,
      rgba(0, 0, 0, 0.34),
      transparent 20% 80%,
      rgba(0, 0, 0, 0.34)
    );
  opacity: 0.48;
  pointer-events: none;
  z-index: 1;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background: rgba(8, 6, 10, 0.92);
  background-image: url("../noticebg.jpg");
  background-size: cover;
  border-bottom: 1px solid rgba(120, 10, 20, 0.5);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
  overflow: hidden;
}

.topbar-brand {
  font-family: "UnifrakturMaguntia", cursive;
  font-size: 1.6rem;
  color: #e6e6e6;
  text-decoration: none;
  text-shadow: 0 0 8px rgba(180, 0, 25, 0.6);
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-brand:hover .topbar-logo {
  transform: scale(1.1) rotate(-5deg);
}

/* Gold shimmer and subtle gothic highlights for topbar */
.topbar::after {
  content: "";
  position: absolute;
  top: 0;
  left: -40%;
  width: 160%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(212, 175, 55, 0) 0%,
    rgba(212, 175, 55, 0.06) 8%,
    rgba(212, 175, 55, 0.18) 14%,
    rgba(212, 175, 55, 0.06) 20%,
    rgba(212, 175, 55, 0) 28%
  );
  transform: skewX(-18deg);
  pointer-events: none;
  mix-blend-mode: overlay;
  opacity: 0.55;
  animation: topbarGoldSweep 9s linear infinite;
}

@keyframes topbarGoldSweep {
  0% {
    transform: translateX(-120%) skewX(-18deg);
    opacity: 0;
  }
  30% {
    opacity: 0.45;
  }
  60% {
    transform: translateX(20%) skewX(-18deg);
    opacity: 0.6;
  }
  100% {
    transform: translateX(120%) skewX(-18deg);
    opacity: 0;
  }
}

/* Responsive adjustments for topbar shimmer */
@media (max-width: 1024px) {
  .topbar::after {
    opacity: 0.42;
    width: 140%;
    animation-duration: 11s;
  }
}

@media (max-width: 768px) {
  .topbar::after {
    left: -10%;
    width: 120%;
    opacity: 0.28;
    animation-name: topbarGoldSweepMobile;
    animation-duration: 10s;
  }
}

@keyframes topbarGoldSweepMobile {
  0% {
    transform: translateX(-80%) skewX(-18deg);
    opacity: 0;
  }
  50% {
    opacity: 0.28;
  }
  100% {
    transform: translateX(120%) skewX(-18deg);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .topbar::after {
    animation: none !important;
    opacity: 0.18 !important;
  }
}

.topbar-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  filter: drop-shadow(0 0 6px rgba(180, 0, 25, 0.8));
  transition: transform 0.3s ease;
}
.topbar-brand:hover .topbar-logo {
  transform: scale(1.12) rotate(-3deg);
  box-shadow:
    0 6px 20px rgba(212, 175, 55, 0.18),
    0 4px 12px rgba(0, 0, 0, 0.6);
  filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.18));
}

.topbar-nav a:hover {
  color: #d4af37;
  text-shadow: 0 0 8px rgba(212, 175, 55, 0.12);
}
.topbar-nav a:hover::after {
  background-color: #d4af37;
}

.topbar-nav {
  display: flex;
  gap: 1.8rem;
  list-style: none;
}

.topbar-nav a {
  color: #a0a0ab;
  text-decoration: none;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  transition: all 0.3s ease;
  position: relative;
}

/* Per-link shimmer: clearer, faster shimmer */
.topbar-nav a {
  color: #a0a0ab;
  text-decoration: none;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  transition: all 0.3s ease;
  position: relative;
}

.topbar-nav a:hover {
  color: #d4af37;
  text-shadow: 0 0 8px rgba(212, 175, 55, 0.12);
}

.topbar-nav a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 1px;
  bottom: -4px;
  left: 0;
  background-color: #8b0000;
  transition: width 0.3s ease;
}

.topbar-nav a:hover::after {
  width: 100%;
}

.mobile-toggle {
  display: none;
  background: transparent;
  border: none;
  color: #e6e6e6;
  font-size: 1.6rem;
  cursor: pointer;
  transition: color 0.3s ease;
  outline: none;
}

.mobile-toggle:hover {
  color: #e61a2d;
  text-shadow: 0 0 8px rgba(230, 26, 45, 0.6);
}

/* mobile adjustments */
@media (max-width: 768px) {
  .topbar {
    height: 56px;
    padding: 0 1rem;
  }
  .topbar-nav {
    gap: 1rem;
  }
  .topbar-logo {
    width: 28px;
    height: 28px;
  }
}

.container {
  max-width: 85%;
  width: 100%;
  text-align: center;
  position: relative;
  z-index: 2;
  padding: 0 1rem;
}

.site-view {
  display: none;
}

.site-view.is-active {
  display: block;
}

.topbar-nav a[aria-current="page"] {
  color: #d4af37;
}

header {
  margin-top: 1.5rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid rgba(120, 10, 20, 0.4);
  padding-bottom: 2rem;
  position: relative;
}

header::after {
  content: "🕸️";
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  background: #030304;
  padding: 0 10px;
  font-size: 1.2rem;
  color: #660000;
}

h1.gothic-title {
  font-family: "UnifrakturMaguntia", cursive;
  font-size: 3.8rem;
  color: #e6e6e6;
  letter-spacing: 3px;
  margin-bottom: 0.2rem;
  text-shadow:
    0 0 10px rgba(180, 0, 25, 0.6),
    0 0 25px rgba(100, 0, 15, 0.4),
    2px 2px 4px #000;
  animation: candleFlicker 4s infinite alternate;
}

p.subtitle {
  font-size: 0.85rem;
  color: #8a7a80;
  text-transform: uppercase;
  letter-spacing: 5px;
  font-weight: 700;
}

.notice-box {
  position: relative;
  background-color: #080305;
  border: 1px solid #3d0c13;
  border-left: 4px solid #8b0000;
  padding: 1.8rem;
  margin-bottom: 5.5rem;
  text-align: left;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.85);
  overflow: hidden;
  z-index: 1;
}

.notice-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 200%;
  height: 100%;
  background-image: url("../noticebg.jpg");
  background-repeat: repeat-x;
  background-size: cover;
  opacity: 0.25;
  pointer-events: none;
  z-index: -1;
  animation: moveBackground 20s linear infinite alternate;
}

@keyframes moveBackground {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.notice-box h3 {
  font-family: "UnifrakturMaguntia", cursive;
  color: #c91a2b;
  font-size: 1.5rem;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 8px rgba(139, 0, 0, 0.6);
  position: relative;
  z-index: 2;
}

.notice-box p {
  font-size: 0.88rem;
  color: #b0b0bb;
  line-height: 1.7;
  position: relative;
  z-index: 2;
}

#home {
  padding-bottom: 1.5rem;
}

.home-exterior {
  position: relative;
  padding-top: 1.5rem;
}

.home-gate {
  position: relative;
  isolation: isolate;
  max-width: 980px;
  margin: 0 auto 2.25rem;
  padding: 2.6rem 1.5rem 2.15rem;
  overflow: hidden;
  border: 1px solid rgba(198, 157, 82, 0.42);
  border-bottom-color: rgba(198, 157, 82, 0.72);
  background:
    linear-gradient(180deg, rgba(10, 4, 8, 0.34), rgba(7, 3, 6, 0.9)),
    url("../noticebg.jpg") center / cover;
  box-shadow:
    inset 0 0 0 8px rgba(8, 4, 7, 0.5),
    inset 0 1px 0 rgba(255, 226, 166, 0.18),
    0 22px 42px rgba(0, 0, 0, 0.7);
}

.home-gate::after {
  content: "";
  bottom: -4rem;
  width: 170px;
  height: 250px;
  padding: 0;
  color: transparent;
  background: linear-gradient(180deg, rgba(121, 12, 28, 0.34), transparent 76%);
  border: 1px solid rgba(199, 156, 82, 0.3);
  border-radius: 90px 90px 0 0;
}

.home-gate::before,
.home-gate::after {
  position: absolute;
  z-index: -1;
  pointer-events: none;
}

.home-gate::before {
  content: "";
  bottom: -4rem;
  left: -2rem;
  width: 170px;
  height: 250px;
  border: 1px solid rgba(199, 156, 82, 0.3);
  border-radius: 90px 90px 0 0;
  background: linear-gradient(180deg, rgba(121, 12, 28, 0.34), transparent 76%);
}

.home-gate::after {
  left: auto;
  right: -2rem;
  transform: none;
}

.home-crest {
  display: grid;
  width: 82px;
  height: 82px;
  margin: 0 auto 0.8rem;
  place-items: center;
  border: 1px solid #d2a957;
  border-radius: 50%;
  background: rgba(23, 4, 9, 0.78);
  box-shadow:
    0 0 0 6px rgba(90, 8, 21, 0.72),
    0 0 28px rgba(155, 13, 35, 0.8);
}

.home-crest img {
  width: 62px;
  height: 62px;
  object-fit: contain;
}

.home-eyebrow {
  margin-bottom: 0.65rem;
  color: #d9b66b;
  font-family: "Fira Code", monospace;
  font-size: 0.67rem;
  font-weight: 500;
  letter-spacing: 2.4px;
  text-transform: uppercase;
}

#home .gothic-title {
  margin-bottom: 0.15rem;
  color: #fff1d8;
  font-size: 4.4rem;
  line-height: 1;
  text-shadow:
    0 0 12px rgba(176, 19, 42, 0.78),
    0 0 32px rgba(90, 4, 17, 0.82),
    2px 2px 4px #000;
}

.home-motto {
  color: #e4cf9b;
  font-family: "Cinzel", serif;
  font-size: 0.93rem;
  font-weight: 700;
  letter-spacing: 5px;
  text-transform: uppercase;
}

.home-gate-divider {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  max-width: 540px;
  margin: 1.35rem auto 0;
  color: #d2a957;
}

.home-gate-divider::before,
.home-gate-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, transparent, rgba(210, 169, 87, 0.84));
}

.home-gate-divider::after {
  transform: scaleX(-1);
}

.home-proclamation {
  max-width: 920px;
  margin: 0 auto 1.5rem;
  padding: 2rem 2.1rem;
  border: 1px solid rgba(153, 21, 38, 0.82);
  border-left: 4px solid #d2a957;
  background-color: rgba(9, 5, 8, 0.94);
  box-shadow:
    inset 0 0 0 1px rgba(226, 184, 104, 0.12),
    0 18px 38px rgba(0, 0, 0, 0.7);
}

.home-proclamation .home-eyebrow {
  position: relative;
  z-index: 2;
}

.home-proclamation h2 {
  position: relative;
  z-index: 2;
  margin-bottom: 0.85rem;
  color: #f0d7a7;
  font-family: "Cinzel", serif;
  font-size: 2rem;
  font-weight: normal;
  letter-spacing: 1px;
  text-shadow: 0 0 12px rgba(134, 8, 26, 0.78);
}

.home-proclamation p:not(.home-eyebrow) {
  color: #c7bbbd;
  font-size: 0.9rem;
  line-height: 1.78;
}

.home-observatory {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  justify-content: center;
  gap: 0.45rem 1.2rem;
  max-width: 530px;
  margin: 0 auto 1.5rem;
  padding: 1rem 1.2rem;
  border-top: 1px solid rgba(210, 169, 87, 0.52);
  border-bottom: 1px solid rgba(210, 169, 87, 0.28);
  background: rgba(9, 4, 8, 0.5);
}

.observatory-label {
  grid-column: 1 / -1;
  color: #d9b66b;
  font-family: "Fira Code", monospace;
  font-size: 0.65rem;
  letter-spacing: 1.8px;
  text-transform: uppercase;
}

.observatory-label i {
  margin-right: 0.45rem;
}

.observatory-stat {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: #d8c4b9;
  font-size: 0.74rem;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.home-observatory .visitor-count {
  padding: 3px 9px;
  color: #ffe6a8;
  border-color: #d2a957;
  background: rgba(108, 11, 28, 0.7);
}

.home-observatory .visitor-location {
  color: #b8aaac;
  font-size: 0.74rem;
  letter-spacing: 1px;
}

@media (max-width: 768px) {
  .home-exterior {
    padding-top: 0.75rem;
  }

  .home-gate {
    margin-bottom: 1.5rem;
    padding: 2rem 1rem 1.6rem;
  }

  .home-gate::before,
  .home-gate::after {
    width: 110px;
    height: 190px;
  }

  .home-crest {
    width: 70px;
    height: 70px;
  }

  .home-crest img {
    width: 52px;
    height: 52px;
  }

  #home .gothic-title {
    font-size: 3rem;
  }

  .home-motto {
    font-size: 0.76rem;
    letter-spacing: 3px;
  }

  .home-proclamation {
    padding: 1.5rem 1.25rem;
  }

  .home-proclamation h2 {
    font-size: 1.65rem;
  }

  .home-proclamation p:not(.home-eyebrow) {
    font-size: 0.84rem;
    line-height: 1.7;
  }

  .home-observatory {
    grid-template-columns: 1fr;
    gap: 0.55rem;
    padding: 0.9rem 1rem;
  }

  .observatory-stat {
    justify-content: center;
  }
}

.section-title {
  font-family: "UnifrakturMaguntia", cursive;
  font-size: 2.2rem;
  letter-spacing: 3px;
  color: #d1d1d1;
  margin-bottom: 2rem;
  text-shadow: 0 0 10px rgba(100, 0, 15, 0.5);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  margin-bottom: 3.5rem;
}

.profile-sanctum {
  position: relative;
  isolation: isolate;
  padding: 2.5rem 1rem 2rem;
  margin-bottom: 1.5rem;
  overflow: hidden;
  border-bottom: 1px solid rgba(194, 150, 75, 0.34);
  background:
    linear-gradient(
      90deg,
      transparent 0 14%,
      rgba(125, 15, 29, 0.18) 14% 15%,
      transparent 15% 85%,
      rgba(125, 15, 29, 0.18) 85% 86%,
      transparent 86%
    ),
    repeating-linear-gradient(
      90deg,
      transparent 0 84px,
      rgba(210, 174, 100, 0.06) 84px 86px
    );
}

.profile-sanctum::before,
.profile-sanctum::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: -8rem;
  width: min(34vw, 310px);
  height: 20rem;
  border: 1px solid rgba(194, 150, 75, 0.25);
  border-radius: 50% 50% 0 0;
  background: linear-gradient(180deg, rgba(135, 18, 35, 0.3), transparent 78%);
}

.profile-sanctum::before {
  left: -3rem;
}

.profile-sanctum::after {
  right: -3rem;
}

.profile-sanctum .section-title {
  margin-bottom: 0.65rem;
  color: #f1e3ca;
}

.profile-eyebrow {
  margin-bottom: 0.65rem;
  color: #c9a965;
  font-family: "Fira Code", monospace;
  font-size: 0.67rem;
  letter-spacing: 2.4px;
  text-transform: uppercase;
}

.profile-eyebrow i {
  margin-right: 0.45rem;
}

.profile-lead {
  max-width: 630px;
  margin: 0 auto;
  color: #c0afb1;
  font-size: 0.88rem;
  line-height: 1.7;
}

.cathedral-court {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  align-items: stretch;
  margin: 2.5rem 0 3.5rem;
}

.profile-member {
  min-height: 410px;
  padding: 2.5rem 1.4rem 1.7rem;
  border-color: rgba(125, 16, 31, 0.86);
  background:
    linear-gradient(180deg, rgba(118, 16, 29, 0.28), transparent 42%),
    rgba(9, 7, 11, 0.96);
  box-shadow:
    inset 0 1px 0 rgba(229, 202, 145, 0.16),
    inset 0 0 0 8px rgba(4, 3, 5, 0.34),
    0 18px 34px rgba(0, 0, 0, 0.56);
}

.profile-member::before,
.profile-member::after {
  display: none;
}

.profile-member:hover {
  transform: translateY(-7px);
  border-color: #c9a965;
  background:
    linear-gradient(180deg, rgba(143, 25, 42, 0.42), transparent 44%),
    rgba(12, 8, 13, 0.98);
}

.profile-member .avatar-placeholder {
  width: 130px;
  height: 158px;
  margin-bottom: 1.6rem;
  overflow: hidden;
  border: 1px solid #c9a965;
  border-radius: 68px 68px 4px 4px;
  box-shadow:
    0 0 0 6px rgba(83, 10, 19, 0.72),
    0 0 28px rgba(163, 23, 43, 0.58);
}

.profile-member .avatar-placeholder::after {
  inset: 5px;
  border: 1px solid rgba(230, 212, 170, 0.52);
  border-radius: 64px 64px 2px 2px;
  animation: none;
}

.profile-member .avatar-placeholder img {
  border-radius: 64px 64px 2px 2px;
  filter: brightness(0.84) contrast(1.16) sepia(16%);
}

.profile-member h4 {
  color: #f5e9d8;
  font-family: "Cinzel", serif;
  font-size: 1.12rem;
  letter-spacing: 1.4px;
}

.profile-member .role-badge {
  color: #d9b66b;
  border-color: rgba(201, 169, 101, 0.48);
  background: rgba(113, 13, 28, 0.3);
}

.profile-member p {
  color: #b6a8aa;
  line-height: 1.72;
}

.profile-member.owner-card {
  border-color: rgba(201, 169, 101, 0.74);
  transform: translateY(-1.1rem);
  animation: ownerPulse 8s ease-in-out infinite;
}

.profile-member.owner-card:hover {
  transform: translateY(-1.55rem);
}

.profile-covenant {
  display: grid;
  grid-template-columns: auto minmax(0, 720px);
  gap: 1.5rem;
  justify-content: center;
  align-items: start;
  padding: 2rem 0 3rem;
  border-top: 1px solid rgba(201, 169, 101, 0.42);
  border-bottom: 1px solid rgba(201, 169, 101, 0.24);
  text-align: left;
}

.covenant-seal {
  display: grid;
  width: 62px;
  height: 76px;
  place-items: center;
  color: #d9b66b;
  font-size: 1.4rem;
  border: 1px solid rgba(201, 169, 101, 0.62);
  border-radius: 32px 32px 2px 2px;
  background: rgba(91, 12, 25, 0.32);
  box-shadow: inset 0 0 18px rgba(201, 169, 101, 0.14);
}

.profile-covenant h3 {
  margin-bottom: 0.8rem;
  color: #ead9b8;
  font-family: "UnifrakturMaguntia", cursive;
  font-size: 1.8rem;
  font-weight: normal;
}

.profile-covenant p:not(.profile-eyebrow) {
  margin-top: 0.65rem;
  color: #b9abad;
  font-size: 0.87rem;
  line-height: 1.75;
}

@media (max-width: 768px) {
  .profile-sanctum {
    padding: 1.8rem 0.65rem 1.5rem;
  }

  .profile-sanctum::before,
  .profile-sanctum::after {
    width: 48vw;
    opacity: 0.62;
  }

  .cathedral-court {
    grid-template-columns: 1fr;
    max-width: 360px;
    margin: 2rem auto 2.5rem;
  }

  .profile-member,
  .profile-member.owner-card,
  .profile-member.owner-card:hover {
    min-height: 0;
    transform: none;
  }

  .profile-covenant {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
}

.gallery-intro {
  margin: -1rem auto 2rem;
  max-width: 620px;
  color: #a99a9e;
  font-size: 0.86rem;
  line-height: 1.6;
}

.gallery-upload-trigger {
  margin: -0.5rem 0 2.5rem;
  padding: 0.75rem 1.1rem;
  border: 1px solid #8b0000;
  background: #22080c;
  color: #f2e4e4;
  font-family: "Cinzel", serif;
  font-size: 0.75rem;
  letter-spacing: 1px;
  cursor: pointer;
}

.gallery-upload-trigger:hover {
  border-color: #d4af37;
  background: #3d0c13;
}

.gallery-upload-trigger i {
  margin-right: 0.5rem;
}

.gallery-upload-modal-content {
  max-width: 720px;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid #6b202a;
  background:
    linear-gradient(145deg, rgba(70, 11, 20, 0.28), transparent 36%), #0d0a0e;
}

.gallery-upload-modal-content::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(212, 175, 55, 0.18);
  pointer-events: none;
}

.gallery-upload-modal-content h2,
.gallery-modal-copy,
.gallery-upload-modal-content .gallery-upload-form {
  position: relative;
  z-index: 1;
}

.gallery-upload-modal-content h2 {
  padding-right: 2rem;
}

.gallery-modal-copy {
  color: #c2b8ba !important;
}

.gallery-upload-form {
  max-width: 760px;
  margin: 1.5rem auto 0;
  padding: 1.5rem;
  border: 1px solid #4a0d15;
  background:
    linear-gradient(145deg, rgba(70, 11, 20, 0.22), transparent 42%),
    rgba(12, 10, 15, 0.9);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.65);
  text-align: center;
}

.gallery-identity-row {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 1rem;
}

.gallery-identity-row label {
  flex: 1 1 0;
}

.gallery-upload-form label {
  display: grid;
  gap: 0.45rem;
  color: #d8c8c9;
  font-size: 0.72rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.gallery-upload-form input,
.gallery-upload-form textarea {
  width: 100%;
  min-height: 42px;
  padding: 0.65rem 0.75rem;
  border: 1px solid #4a0d15;
  border-radius: 0;
  outline: none;
  background: #050306;
  color: #e6e6e6;
  font-family: "Fira Code", monospace;
}

.gallery-upload-form textarea {
  min-height: 92px;
  resize: vertical;
}

.gallery-upload-form input:focus,
.gallery-upload-form textarea:focus {
  border-color: #b99572;
  box-shadow: 0 0 0 2px rgba(185, 149, 114, 0.16);
}

.gallery-upload-form .btn-saweria-direct:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.gallery-verification-status {
  flex: 0 0 1rem;
  margin: 0 0 0.6rem;
  color: #a99a9e;
  font-size: 0.72rem;
  line-height: 1.4;
}

.gallery-verification-status.is-verified {
  color: #d4af37;
  font-size: 0;
}

.gallery-verification-status.is-verified::before {
  content: "\2713";
  font-size: 1rem;
  font-weight: bold;
}

.gallery-verification-status.is-error {
  flex-basis: 100%;
  color: #e88383;
}

.gallery-verification-thumbnail {
  display: block;
  width: 112px;
  height: 112px;
  margin: 0 auto 1rem;
  border: 1px solid #b99572;
  background: #050306;
  object-fit: cover;
}

.gallery-file-field {
  margin-top: 1rem;
}

.gallery-bio-field {
  margin-top: 1rem;
  text-align: left;
}

.gallery-file-field span {
  color: #938286;
  font-size: 0.66rem;
  letter-spacing: 0;
  line-height: 1.5;
  text-transform: none;
}

.gallery-upload-status {
  min-height: 1.25rem;
  margin-top: 0.9rem;
  color: #d4af37;
  font-size: 0.75rem;
  line-height: 1.4;
}

.gallery-upload-form .btn-saweria-direct {
  margin-top: 0.35rem;
}

.gallery-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.15rem;
  margin: 0 auto 2rem;
  max-width: 1380px;
  text-align: left;
}

.gallery-group {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(177, 24, 46, 0.65);
  background:
    linear-gradient(180deg, rgba(82, 9, 23, 0.28), transparent 24%),
    rgba(7, 5, 8, 0.82);
  box-shadow:
    inset 0 1px 0 rgba(234, 198, 123, 0.14),
    0 14px 34px rgba(0, 0, 0, 0.54);
  text-align: left;
}

.gallery-group::before {
  content: "";
  position: absolute;
  top: 0;
  left: 1rem;
  right: 1rem;
  height: 2px;
  background: linear-gradient(90deg, transparent, #d4af37, transparent);
}

.gallery-group h3 {
  margin: 0;
  padding: 1rem 1.1rem 0.85rem;
  color: #f1d998;
  font-family: "Fira Code", monospace;
  font-size: 0.72rem;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(202, 168, 92, 0.26);
  background: rgba(0, 0, 0, 0.24);
}

.gallery-group h3 i {
  margin-right: 0.5rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  padding: 0.55rem;
}

.gallery-group--videos .gallery-grid {
  grid-template-columns: 1fr;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(121, 17, 32, 0.76);
  background: #050306;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.5);
  transition:
    border-color 0.25s ease,
    transform 0.25s ease;
}

.gallery-item:hover {
  border-color: #d4af37;
  transform: translateY(-2px);
}

.gallery-media-frame {
  position: relative;
  overflow: hidden;
  background: #050306;
}

.gallery-item img,
.gallery-item video {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  background: #050306;
  object-fit: cover;
}

.gallery-item img {
  cursor: zoom-in;
}

.gallery-item img:focus-visible {
  outline: 2px solid #d4af37;
  outline-offset: -2px;
}

.gallery-item video {
  aspect-ratio: 16 / 9;
  object-fit: contain;
}

.gallery-attribution {
  display: grid;
  gap: 0.3rem;
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  padding: 0.4rem 0.5rem;
  color: #e6d9d2;
  font-family: "Fira Code", monospace;
  font-size: 0.58rem;
  line-height: 1.35;
  background: linear-gradient(180deg, rgba(4, 2, 5, 0.9), rgba(4, 2, 5, 0.48));
  pointer-events: none;
}

.gallery-uploader {
  color: #d8c5a2;
}

.gallery-bio {
  color: #d4c4c7;
  font-family: "Fira Code", monospace;
  font-size: 0.56rem;
  letter-spacing: 0;
}

.gallery-preview-modal-content {
  width: min(94vw, 980px);
  max-height: 90vh;
  padding: 0;
  overflow: auto;
  border-color: rgba(212, 175, 55, 0.62);
  background: #090609;
}

.gallery-preview-media {
  display: grid;
  min-height: 260px;
  max-height: 68vh;
  place-items: center;
  background: #030203;
}

.gallery-preview-media img {
  display: block;
  max-width: 100%;
  max-height: 68vh;
  object-fit: contain;
}

.gallery-preview-details {
  padding: 1.15rem 1.35rem 1.3rem;
  border-top: 1px solid rgba(212, 175, 55, 0.3);
}

.gallery-preview-details h2 {
  margin: 0.35rem 0 0;
  padding-right: 2rem;
  color: #f0d7a7;
  font-family: "Cinzel", serif;
  font-size: 1.15rem;
}

.gallery-preview-user-id,
.gallery-preview-bio {
  margin-top: 0.45rem;
}

.gallery-preview-user-id {
  color: #bda778 !important;
  font-family: "Fira Code", monospace;
  font-size: 0.65rem !important;
}

.gallery-preview-bio {
  color: #d0c4c6 !important;
}

@media (max-width: 600px) {
  .gallery-identity-row {
    align-items: stretch;
    flex-direction: column;
  }

  .gallery-verification-status {
    flex-basis: auto;
    margin: 0;
  }

  .gallery-groups {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
    padding: 0.45rem;
  }
}

.card {
  background: rgba(12, 10, 15, 0.9);
  border: 1px solid #4a0d15;
  padding: 2.2rem 1.5rem;
  position: relative;
  transition: all 0.4s ease;
  backdrop-filter: blur(4px);
  box-shadow:
    0 8px 25px rgba(0, 0, 0, 0.8),
    inset 0 0 15px rgba(80, 0, 15, 0.15);
  text-align: center;
}

.card::before {
  content: "🥀";
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 1rem;
  opacity: 0.6;
  filter: drop-shadow(0 0 4px #8b0000);
  pointer-events: none;
}

.card::after {
  content: "🐦‍⬛";
  position: absolute;
  bottom: 8px;
  left: 12px;
  font-size: 1rem;
  opacity: 0.5;
  filter: drop-shadow(0 0 4px #000);
  pointer-events: none;
}

.card:hover {
  border-color: #8b0000;
  transform: translateY(-6px);
  box-shadow:
    0 12px 35px rgba(139, 0, 0, 0.4),
    inset 0 0 20px rgba(139, 0, 0, 0.2);
  background: rgba(18, 12, 18, 0.98);
}

.avatar-placeholder {
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, #2a080c 0%, #050306 100%);
  border-radius: 50%;
  margin: 0 auto 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #66000e;
  box-shadow:
    0 0 20px rgba(139, 0, 0, 0.6),
    inset 0 0 10px rgba(0, 0, 0, 0.9);
  position: relative;
  overflow: visible;
}

.avatar-placeholder::after {
  content: "";
  position: absolute;
  top: -5px;
  left: -5px;
  right: -5px;
  bottom: -5px;
  border: 1px dashed rgba(139, 0, 0, 0.5);
  border-radius: 50%;
  animation: rotateVines 20s linear infinite;
  pointer-events: none;
}

@keyframes rotateVines {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.avatar-placeholder img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  filter: brightness(0.85) contrast(1.2) sepia(20%);
  transition: filter 0.3s ease;
}

.card:hover .avatar-placeholder img {
  filter: brightness(1.05) contrast(1.3) sepia(0%);
}

.card h4 {
  font-size: 1.2rem;
  color: #ffffff;
  margin-bottom: 0.2rem;
  letter-spacing: 1px;
}

.card .role-badge {
  font-size: 0.7rem;
  color: #e61a2d;
  display: inline-block;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: bold;
  border: 1px solid #55000a;
  padding: 2px 10px;
  background: rgba(80, 0, 15, 0.15);
}

/* Owner badge and subtle gothic shimmer animation */
.badge-owner {
  background: linear-gradient(
    90deg,
    rgba(60, 0, 10, 0.2),
    rgba(80, 0, 20, 0.25)
  );
  border-color: #6a000f;
  color: #ffd9b3;
  box-shadow: 0 0 12px rgba(170, 90, 40, 0.12);
  position: relative;
  overflow: hidden;
}

.badge-owner::after {
  content: "";
  position: absolute;
  top: -40%;
  left: -30%;
  width: 60%;
  height: 180%;
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0.06),
    rgba(255, 255, 255, 0.02),
    rgba(255, 255, 255, 0.06)
  );
  transform: rotate(-25deg);
  animation: shimmer 6s linear infinite;
  pointer-events: none;
}

@keyframes shimmer {
  0% {
    transform: translateX(-120%) rotate(-25deg);
    opacity: 0;
  }
  50% {
    transform: translateX(120%) rotate(-25deg);
    opacity: 1;
  }
  100% {
    transform: translateX(240%) rotate(-25deg);
    opacity: 0;
  }
}

/* Slight pulsing glow for owner card */
.owner-card {
  border-left: 4px solid rgba(212, 175, 55, 0.12);
  animation: ownerPulse 8s ease-in-out infinite;
}

@keyframes ownerPulse {
  0% {
    box-shadow: 0 8px 25px rgba(139, 0, 0, 0.4);
  }
  50% {
    box-shadow: 0 14px 45px rgba(212, 175, 55, 0.18);
  }
  100% {
    box-shadow: 0 8px 25px rgba(139, 0, 0, 0.4);
  }
}

.card p {
  font-size: 0.82rem;
  color: #888894;
  line-height: 1.6;
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 200;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(5px);
}

.legal-view {
  margin: 1.5rem auto 0;
  padding-bottom: 3rem;
}

.legal-content {
  position: relative;
  padding: 0;
  text-align: left;
  background: rgba(10, 9, 13, 0.96);
  border: 1px solid rgba(202, 168, 92, 0.52);
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  box-shadow:
    inset 0 0 0 7px rgba(4, 3, 5, 0.54),
    0 20px 44px rgba(0, 0, 0, 0.72);
}

.legal-header {
  padding: 2.4rem 2.6rem 2rem;
  border-bottom: 1px solid rgba(202, 168, 92, 0.42);
  background:
    linear-gradient(135deg, rgba(96, 10, 27, 0.42), transparent 56%),
    rgba(20, 14, 18, 0.82);
}

.legal-kicker {
  color: #ddbd78;
  font-family: "Fira Code", monospace;
  font-size: 0.68rem;
  letter-spacing: 1.6px;
  text-transform: uppercase;
}

.legal-header h2 {
  margin: 0.7rem 0 0.85rem;
  color: #f2e7d4;
  font-family: "Cinzel", serif;
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  line-height: 1.35;
}

.legal-summary {
  max-width: 700px;
  color: #c7bcbc;
  font-family: "Arial", sans-serif;
  font-size: 0.95rem;
  line-height: 1.7;
}

.legal-metadata {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.legal-metadata div {
  min-height: 72px;
  padding: 0.7rem 0.8rem;
  border-left: 2px solid rgba(202, 168, 92, 0.76);
  background: rgba(0, 0, 0, 0.24);
}

.legal-metadata dt {
  margin-bottom: 0.35rem;
  color: #d9b66b;
  font-family: "Fira Code", monospace;
  font-size: 0.61rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.legal-metadata dd {
  color: #e2d7d2;
  font-family: Arial, sans-serif;
  font-size: 0.78rem;
  line-height: 1.4;
}

.legal-article {
  padding: 1.6rem 2.6rem;
  border-bottom: 1px solid rgba(202, 168, 92, 0.16);
}

.legal-article h3 {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  margin-bottom: 0.75rem;
  color: #f0ddbc;
  font-family: "Cinzel", serif;
  font-size: 1rem;
  letter-spacing: 0.3px;
  line-height: 1.5;
}

.legal-article h3 span {
  color: #c49b54;
  font-family: "Fira Code", monospace;
  font-size: 0.73rem;
  letter-spacing: 1px;
}

.legal-article p {
  color: #d0c8c9;
  font-family: Arial, sans-serif;
  font-size: 0.93rem;
  line-height: 1.78;
}

.legal-article p + p {
  margin-top: 0.85rem;
}

.legal-footer {
  padding: 1.5rem 2.6rem 1.8rem;
  color: #bfb3b6;
  font-family: Arial, sans-serif;
  font-size: 0.86rem;
  line-height: 1.65;
  background: rgba(80, 8, 23, 0.22);
}

.legal-footer strong {
  color: #e4c47e;
}

@media (max-width: 600px) {
  .legal-header,
  .legal-article,
  .legal-footer {
    padding-right: 1.25rem;
    padding-left: 1.25rem;
  }

  .legal-header {
    padding-top: 1.8rem;
  }

  .legal-header h2 {
    font-size: 1.28rem;
  }

  .legal-metadata {
    grid-template-columns: 1fr;
  }

  .legal-article h3 {
    align-items: flex-start;
    font-size: 0.9rem;
  }

  .legal-article p,
  .legal-summary {
    font-size: 0.88rem;
  }
}

.modal-content {
  background: #0d0a0e;
  border: 1px solid #4a0d15;
  max-width: 600px;
  width: 90%;
  padding: 2rem;
  box-shadow: 0 0 30px rgba(139, 0, 0, 0.4);
  position: relative;
  text-align: left;
}

.modal-content h2 {
  font-family: "UnifrakturMaguntia", cursive;
  color: #c91a2b;
  font-size: 2rem;
  margin-bottom: 1rem;
}

.modal-content p {
  font-size: 0.85rem;
  color: #a0a0ab;
  line-height: 1.6;
}

.close-modal {
  position: absolute;
  top: 10px;
  right: 15px;
  color: #888;
  font-size: 1.5rem;
  cursor: pointer;
}

.close-modal:hover {
  color: #c91a2b;
}

.roblox-selection-modal {
  max-width: 560px;
  overflow: hidden;
  border: 1px solid #6b202a;
  background:
    linear-gradient(145deg, rgba(70, 11, 20, 0.28), transparent 36%), #0d0a0e;
}

.roblox-selection-modal::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(212, 175, 55, 0.18);
  pointer-events: none;
}

.roblox-selection-modal h2,
.roblox-selection-copy,
.roblox-place-list {
  position: relative;
  z-index: 1;
}

.roblox-selection-modal h2 {
  padding-right: 2rem;
}

.roblox-selection-copy {
  color: #c2b8ba !important;
}

.roblox-place-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.roblox-place-link {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem;
  border: 1px solid #5b1c26;
  background: rgba(5, 3, 6, 0.72);
  color: #e6e6e6;
  text-decoration: none;
  transition:
    background 0.25s ease,
    border-color 0.25s ease,
    transform 0.25s ease;
}

.roblox-place-link:hover {
  background: rgba(91, 28, 38, 0.5);
  border-color: #b99572;
  transform: translateX(4px);
}

.roblox-place-link > i:first-child {
  color: #d4af37;
  font-size: 1.1rem;
  text-align: center;
}

.roblox-place-link span {
  min-width: 0;
}

.roblox-place-link strong,
.roblox-place-link small {
  display: block;
}

.roblox-place-link strong {
  font-size: 0.86rem;
}

.roblox-place-link small {
  margin-top: 3px;
  color: #9a858a;
  font-family: "Fira Code", monospace;
  font-size: 0.66rem;
}

.roblox-place-link > i:last-child {
  color: #b99572;
  font-size: 0.7rem;
}

.saweria-modal-content {
  overflow: hidden;
  border: 1px solid #6b202a;
  background:
    linear-gradient(145deg, rgba(70, 11, 20, 0.28), transparent 36%), #0d0a0e;
}

.saweria-modal-content::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(212, 175, 55, 0.18);
  pointer-events: none;
}

.modal-kicker {
  position: relative;
  z-index: 1;
  margin-bottom: 0.65rem !important;
  color: #d4af37 !important;
  font-family: "Fira Code", monospace;
  font-size: 0.68rem !important;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.modal-kicker i {
  margin-right: 7px;
}

.saweria-modal-content h2 {
  position: relative;
  z-index: 1;
  padding-right: 2rem;
}

.modal-note {
  position: relative;
  z-index: 1;
  margin: 1.2rem 0 0 !important;
  padding: 0.75rem 0 0.75rem 0.9rem;
  border-left: 2px solid #8b0000;
  background: rgba(5, 3, 6, 0.55);
  color: #a99a9e !important;
  font-size: 0.75rem !important;
  font-style: italic;
}

.saweria-modal-content {
  max-width: 560px;
  text-align: center;
}

.saweria-modal-content h2 {
  margin-bottom: 1.15rem;
}

.saweria-modal-content > p:not(.modal-kicker):not(.modal-note) {
  position: relative;
  z-index: 1;
}

.saweria-note {
  text-align: left;
}

.tribute-panel {
  position: relative;
  z-index: 1;
  margin: 1.5rem 0 0;
  padding: 1.3rem;
  border: 1px solid #5b1c26;
  background:
    linear-gradient(135deg, rgba(107, 25, 37, 0.32), transparent 48%), #050306;
}

.tribute-panel-label {
  color: #b99572 !important;
  font-family: "Fira Code", monospace;
  font-size: 0.68rem !important;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.tribute-panel .btn-saweria-direct {
  margin-top: 0.25rem;
}

@media (max-width: 600px) {
  .saweria-modal-content {
    padding: 1.5rem;
  }
}

footer {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  padding: 0.9rem 1rem;
  font-size: 0.75rem;
  color: #e0d6d0;
  border-top: 1px solid rgba(120, 10, 20, 0.5);
  width: 100%;
  letter-spacing: 2px;
  background: rgba(8, 6, 10, 0.92);
  background-image: url("../noticebg.jpg");
  background-size: cover;
  backdrop-filter: blur(8px);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.8);
  text-shadow: 0 1px 3px #000;
}

/* Footer badge: gothic highlight */
.footer-badge {
  display: inline-block;
  margin-left: 10px;
  padding: 5px 11px;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  font-weight: 700;
  background: linear-gradient(
    135deg,
    rgba(80, 9, 20, 0.96),
    rgba(27, 5, 10, 0.98)
  );
  color: #ffe9b4;
  border: 1px solid #d2a957;
  box-shadow:
    0 0 16px rgba(122, 8, 28, 0.72),
    inset 0 0 0 2px rgba(255, 224, 159, 0.12),
    inset 0 0 12px rgba(0, 0, 0, 0.62);
  border-radius: 0;
  position: relative;
  transform-origin: center;
  text-shadow: 0 1px 2px #000;
  animation: footerGlow 4.8s ease-in-out infinite;
}

@keyframes footerGlow {
  0% {
    transform: translateY(0) rotate(-1deg) scale(1);
    box-shadow: 0 4px 12px rgba(170, 40, 40, 0.04);
  }
  40% {
    transform: translateY(-3px) rotate(0deg) scale(1.03);
    box-shadow: 0 8px 28px rgba(212, 175, 55, 0.12);
  }
  70% {
    transform: translateY(-1px) rotate(1deg) scale(1.01);
    box-shadow: 0 6px 20px rgba(180, 60, 40, 0.08);
  }
  100% {
    transform: translateY(0) rotate(-1deg) scale(1);
    box-shadow: 0 4px 12px rgba(170, 40, 40, 0.04);
  }
}

@keyframes candleFlicker {
  0%,
  100% {
    text-shadow:
      0 0 10px rgba(180, 0, 25, 0.6),
      0 0 25px rgba(100, 0, 15, 0.4),
      2px 2px 4px #000;
  }
  50% {
    text-shadow:
      0 0 14px rgba(220, 0, 30, 0.8),
      0 0 35px rgba(140, 0, 20, 0.6),
      2px 2px 4px #000;
  }
  75% {
    text-shadow:
      0 0 8px rgba(140, 0, 15, 0.4),
      0 0 18px rgba(80, 0, 10, 0.3),
      2px 2px 4px #000;
  }
}

@media (max-width: 768px) {
  h1.gothic-title {
    font-size: 2.8rem;
  }
  .topbar {
    height: 56px;
    padding: 0 1rem;
    overflow: visible; /* allow the nav overlay to escape the topbar */
  }

  /* Mobile: show hamburger toggle, hide full nav by default */
  .mobile-toggle {
    display: block;
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 11000;
    background: transparent;
    border: none;
    color: #e6e6e6;
    font-size: 1.6rem;
    padding: 6px;
    cursor: pointer;
  }

  /* Collapsible mobile nav (hidden until .active) */
  .topbar-nav {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    background: rgba(8, 6, 10, 0.98);
    border-bottom: 1px solid rgba(120, 10, 20, 0.6);
    backdrop-filter: blur(12px);
    padding: 0.75rem 0;
    gap: 0.75rem;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scaleY(0.98);
    transition:
      opacity 220ms ease,
      transform 220ms ease,
      visibility 220ms;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.9);
    pointer-events: none;
    z-index: 10500;
  }

  .topbar-nav a {
    padding: 8px 14px;
    width: 100%;
    text-align: center;
    display: block;
  }

  .topbar-nav.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scaleY(1);
    pointer-events: auto;
  }

  /* Hide the brand text to save space on mobile */
  .topbar-brand span {
    display: none;
  }

  .topbar-brand {
    gap: 8px;
    align-items: center;
  }
}

.visitor-counter {
  margin-bottom: 1.5rem;
  font-size: 0.78rem;
  color: #8a7a80;
  text-transform: uppercase;
  letter-spacing: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* Emergency override: ensure mobile nav is always visible when active */
@media (max-width: 768px) {
  nav.topbar .topbar-nav.active {
    display: flex !important;
    position: fixed !important;
    top: 56px !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
    z-index: 99999 !important;
    background: rgba(8, 6, 10, 0.98) !important;
    padding: 1.5rem 0 !important;
  }
}

.visitor-count {
  color: #e61a2d;
  font-weight: bold;
  font-family: "Fira Code", monospace;
  background: rgba(80, 0, 15, 0.2);
  border: 1px solid #55000a;
  padding: 2px 8px;
  border-radius: 2px;
  text-shadow: 0 0 6px rgba(230, 26, 45, 0.6);
}

.floating-stack {
  position: fixed;
  bottom: 25px;
  right: 25px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 150;
}

.stack-toggle-bubble {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: radial-gradient(circle, #3d0c13 0%, #080305 100%);
  border: 1px solid #8b0000;
  color: #e6e6e6;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow:
    0 0 15px rgba(180, 0, 25, 0.5),
    0 4px 10px rgba(0, 0, 0, 0.9);
  transition: all 0.3s ease;
  outline: none;
}

.stack-toggle-bubble:hover {
  transform: scale(1.1);
  border-color: #c91a2b;
  box-shadow: 0 0 22px rgba(220, 0, 30, 0.8);
}

.stack-menu {
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  max-height: 300px;
  opacity: 1;
  visibility: visible;
}

.stack-menu.collapsed {
  max-height: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px) scale(0.9);
  pointer-events: none;
  overflow: hidden;
}

.music-bubble,
.saweria-bubble,
.roblox-bubble,
.tiktok-bubble,
.youtube-bubble,
.contact-bubble {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: radial-gradient(circle, #20080c 0%, #080305 100%);
  border: 1px solid #66000e;
  color: #e6e6e6;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow:
    0 0 15px rgba(180, 0, 25, 0.4),
    0 4px 10px rgba(0, 0, 0, 0.9);
  transition: all 0.3s ease;
  outline: none;
}

.music-bubble:hover,
.saweria-bubble:hover,
.roblox-bubble:hover,
.tiktok-bubble:hover,
.youtube-bubble:hover,
.contact-bubble:hover {
  transform: scale(1.1);
  border-color: #c91a2b;
  box-shadow: 0 0 20px rgba(220, 0, 30, 0.7);
}

.music-bubble.playing {
  border-color: #b30015;
  animation: bubblePulse 2s infinite alternate;
}

@keyframes bubblePulse {
  0% {
    box-shadow: 0 0 10px rgba(180, 0, 25, 0.4);
  }
  100% {
    box-shadow: 0 0 20px rgba(230, 26, 45, 0.8);
  }
}

.btn-saweria-direct {
  display: inline-block;
  width: 100%;
  text-align: center;
  background: linear-gradient(135deg, #3d0c13 0%, #100508 100%);
  color: #ffffff;
  padding: 12px;
  border: 1px solid #8b0000;
  text-decoration: none;
  font-family: "Cinzel", serif;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-size: 0.85rem;
  transition: all 0.3s ease;
  margin-top: 10px;
}

.btn-saweria-direct:hover {
  background: #66000e;
  box-shadow: 0 0 15px rgba(230, 26, 45, 0.6);
}

.table-scroll-container {
  max-height: 280px;
  overflow-y: auto;
  padding-right: 5px;
}

.table-scroll-container::-webkit-scrollbar {
  width: 6px;
}

.table-scroll-container::-webkit-scrollbar-track {
  background: #0a0507;
  border-radius: 3px;
}

.table-scroll-container::-webkit-scrollbar-thumb {
  background: #50000a;
  border: 1px solid #8b0000;
  border-radius: 3px;
}

.table-scroll-container::-webkit-scrollbar-thumb:hover {
  background: #c91a2b;
}

.scrollable-table thead th {
  position: sticky;
  top: 0;
  background: #0d0a0e;
  z-index: 10;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.8);
}

.rank-row-1 {
  background: linear-gradient(
    270deg,
    rgba(80, 0, 15, 0.4),
    rgba(212, 175, 55, 0.25),
    rgba(40, 5, 10, 0.5)
  );
  background-size: 400% 400%;
  animation: gothicGradientMove 6s ease infinite;
  border-left: 4px solid #d4af37 !important;
  box-shadow: inset 0 0 15px rgba(212, 175, 55, 0.15);
}

.rank-row-2 {
  background: linear-gradient(
    270deg,
    rgba(20, 15, 30, 0.5),
    rgba(192, 192, 192, 0.2),
    rgba(10, 8, 18, 0.6)
  );
  background-size: 400% 400%;
  animation: gothicGradientMove 8s ease infinite;
  border-left: 4px solid #c0c0c0 !important;
  box-shadow: inset 0 0 15px rgba(192, 192, 192, 0.1);
}

.rank-row-3 {
  background: linear-gradient(
    270deg,
    rgba(30, 15, 8, 0.5),
    rgba(205, 127, 50, 0.18),
    rgba(12, 6, 4, 0.6)
  );
  background-size: 400% 400%;
  animation: gothicGradientMove 10s ease infinite;
  border-left: 4px solid #cd7f32 !important;
  box-shadow: inset 0 0 15px rgba(205, 127, 50, 0.1);
}

@keyframes gothicGradientMove {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.badge-rank-1 {
  color: #ffd700;
  font-weight: bold;
  font-family: "Fira Code", monospace;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.7);
}

.badge-rank-2 {
  color: #e0e0e0;
  font-weight: bold;
  font-family: "Fira Code", monospace;
  text-shadow: 0 0 8px rgba(224, 224, 224, 0.6);
}

.badge-rank-3 {
  color: #cd7f32;
  font-weight: bold;
  font-family: "Fira Code", monospace;
  text-shadow: 0 0 8px rgba(205, 127, 50, 0.6);
}

.crown-icon {
  margin-right: 6px;
  display: inline-block;
  animation: floatIcon 3s ease-in-out infinite alternate;
}

@keyframes floatIcon {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-3px);
  }
}

.leaderboard-box {
  background: rgba(12, 10, 15, 0.9);
  border: 1px solid #3d0c13;
  border-left: 4px solid #8b0000;
  padding: 2rem;
  margin-bottom: 2.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
  text-align: left;
}

.leaderboard-box h2 {
  font-family: "UnifrakturMaguntia", cursive;
  color: #c91a2b;
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid rgba(100, 0, 15, 0.4);
  padding-bottom: 0.5rem;
}

.rank-table {
  width: 100%;
  border-collapse: collapse;
}

.rank-table th,
.rank-table td {
  padding: 12px;
  font-size: 0.9rem;
  border-bottom: 1px solid #1a1014;
}

.rank-table th {
  color: #8a7a80;
  text-align: left;
  font-size: 0.75rem;
  letter-spacing: 2px;
}

.rank-number {
  color: #e61a2d;
  font-weight: bold;
  font-family: "Fira Code", monospace;
}

.amount {
  color: #d1d1d1;
  font-family: "Fira Code", monospace;
  text-align: right;
}

.btn-back {
  display: inline-block;
  color: #a0a0ab;
  text-decoration: none;
  border: 1px solid #4a0d15;
  padding: 10px 20px;
  font-size: 0.8rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  transition: all 0.3s ease;
}

.btn-back:hover {
  background: #66000e;
  color: #fff;
}
