:root {
  --text: #f6f6f6;
  --muted: #cfcfcf;
  --line: rgba(255, 255, 255, 0.12);
  --panel: rgba(12, 12, 12, 0.36);
  --panel-strong: rgba(22, 22, 22, 0.52);
  --violet: #ffffff;
  --violet-strong: #d9d9d9;
  --violet-soft: #8e8e8e;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

.hidden {
  display: none !important;
}

body.intro-playing {
  overflow: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Rajdhani", sans-serif;
  background:
    linear-gradient(180deg, rgba(8, 8, 8, 0.22), rgba(8, 8, 8, 0.84)),
    url("assets/background-night.png") center/cover fixed no-repeat,
    #0d0718;
  overflow-x: clip;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 15%, rgba(255, 255, 255, 0.08), transparent 22%),
    radial-gradient(circle at 80% 25%, rgba(255, 255, 255, 0.1), transparent 28%),
    linear-gradient(transparent 96%, rgba(255,255,255,0.03) 100%),
    linear-gradient(90deg, transparent 96%, rgba(255,255,255,0.03) 100%);
  background-size: auto, auto, 100% 22px, 22px 100%;
}

.particle-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.intro-screen {
  position: fixed;
  inset: 0;
  z-index: 200;
  overflow: hidden;
  background: radial-gradient(circle at center, rgba(31, 24, 52, 0.92), rgba(3, 3, 7, 0.98));
  display: grid;
  place-items: center;
  pointer-events: none;
}

.intro-screen.hidden {
  display: none !important;
}

.intro-background {
  position: absolute;
  inset: -10%;
  background:
    radial-gradient(circle at 30% 50%, rgba(255,255,255,0.18), transparent 18%),
    radial-gradient(circle at 70% 40%, rgba(255,255,255,0.1), transparent 24%),
    linear-gradient(90deg, rgba(255,255,255,0.08), transparent 18%, transparent 82%, rgba(255,255,255,0.08));
  filter: blur(18px);
  opacity: 0.8;
}

.intro-sweep {
  position: absolute;
  top: -30%;
  bottom: -30%;
  width: 72vw;
  transform: skewX(-18deg) translateX(-140%);
}

.intro-sweep-back {
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,0.16), rgba(255,255,255,0));
  filter: blur(14px);
}

.intro-sweep-main {
  width: 52vw;
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,0.95), rgba(255,255,255,0));
  box-shadow: 0 0 55px rgba(255,255,255,0.7);
}

.intro-content {
  position: relative;
  z-index: 2;
  text-align: center;
  display: grid;
  gap: 14px;
  padding: 24px;
  opacity: 0;
  transform: translateY(18px) scale(0.96);
}

.intro-screen.entering .intro-background {
  animation: introPulse 3.1s ease-in-out forwards;
}

.intro-screen.entering .intro-sweep-back {
  animation: cinematicSweep 2.15s cubic-bezier(0.2, 0.8, 0.15, 1) forwards;
}

.intro-screen.entering .intro-sweep-main {
  animation: cinematicSweep 2.15s cubic-bezier(0.2, 0.8, 0.15, 1) 0.08s forwards;
}

.intro-screen.entering .intro-content {
  animation: introText 1.05s ease 0.38s forwards;
}

.intro-screen.idle .intro-content {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.intro-screen.idle .intro-background {
  opacity: 0.18;
  transform: scale(1);
}

.intro-screen.leaving .intro-sweep-back {
  animation: cinematicSweepExit 2.05s cubic-bezier(0.2, 0.82, 0.16, 1) forwards;
}

.intro-screen.leaving .intro-sweep-main {
  animation: cinematicSweepExit 2.05s cubic-bezier(0.2, 0.82, 0.16, 1) 0.08s forwards;
}

.intro-screen.leaving .intro-content {
  animation: introTextOut 0.9s ease 0.2s forwards;
}

.intro-screen.leaving .intro-background {
  animation: introFadeOut 2s ease forwards;
}

.intro-title {
  font-size: clamp(1.3rem, 3vw, 2.6rem);
  text-shadow: 0 0 24px rgba(255,255,255,0.35);
}

.intro-text {
  color: rgba(255,255,255,0.78);
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  max-width: 640px;
}

@keyframes cinematicSweep {
  0% { transform: skewX(-18deg) translateX(-140%); opacity: 0; }
  15% { opacity: 1; }
  100% { transform: skewX(-18deg) translateX(260%); opacity: 0; }
}

@keyframes cinematicSweepExit {
  0% { transform: skewX(-18deg) translateX(-25%) translateY(0); opacity: 0; }
  12% { opacity: 1; }
  100% { transform: skewX(-18deg) translateX(290%) translateY(26%); opacity: 0; }
}

@keyframes introPulse {
  0% { transform: scale(1.08); opacity: 0.4; }
  50% { opacity: 0.95; }
  100% { transform: scale(1); opacity: 0.18; }
}

@keyframes introText {
  0% { opacity: 0; transform: translateY(18px) scale(0.96); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes introTextOut {
  0% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-14px) scale(0.98); }
}

@keyframes introFadeOut {
  0% { opacity: 0.3; }
  100% { opacity: 0; }
}

.particle {
  position: absolute;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.78);
  animation: floatParticle linear infinite;
}

.particle.circle {
  border-radius: 999px;
}

.particle.square {
  border-radius: 2px;
}

.particle.diamond {
  border-radius: 2px;
  transform: rotate(45deg);
}

.particle.lightning {
  width: 3px !important;
  height: 90px !important;
  background: linear-gradient(180deg, rgba(255,255,255,0), rgba(255,255,255,0.95), rgba(255,255,255,0));
  box-shadow: 0 0 22px rgba(255,255,255,0.85);
  clip-path: polygon(50% 0, 70% 20%, 52% 20%, 78% 48%, 56% 48%, 68% 100%, 22% 58%, 42% 58%, 28% 24%, 46% 24%);
}

.page-shell {
  width: min(1500px, calc(100% - 20px));
  margin: 0 auto;
  padding: 20px 0 40px;
  position: relative;
  z-index: 1;
}

.hero,
.page-panel,
.content-card,
.site-footer,
.announcement-modal-card,
.copyright-bar {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(24, 12, 44, 0.28), rgba(24, 12, 44, 0.46));
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}

.hero,
.page-panel {
  border-radius: 28px;
}

.hero {
  min-height: 92vh;
  padding: 34px 54px 44px;
  display: grid;
  gap: 26px;
  transition: min-height 0.35s ease, padding 0.35s ease;
  overflow: visible;
  position: relative;
  z-index: 80;
}

.hero-nav,
.spread-nav,
.nav-actions,
.hero-actions,
.panel-grid,
.rank-grid,
.team-layout,
.auth-actions,
.admin-grid,
.modal-actions,
.stats-grid,
.filter-row {
  display: grid;
  gap: 16px;
}

.hero-nav {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) max-content;
  align-items: center;
  position: relative;
  z-index: 30;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  position: relative;
  z-index: 2;
  margin-left: -8px;
}

.brand-home-button {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: inherit;
  text-align: left;
  padding: 8px 10px;
  border-radius: 18px;
  cursor: pointer;
  transition: background 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease, border-color 0.22s ease;
}

.brand-home-button:hover {
  background: rgba(196, 146, 255, 0.14);
  border-color: rgba(210, 168, 255, 0.28);
  box-shadow: 0 10px 24px rgba(166, 97, 255, 0.2);
  transform: translateY(-1px);
}

.brand-home-button:focus-visible {
  outline: 2px solid rgba(220, 190, 255, 0.65);
  outline-offset: 3px;
}

.brand-cube,
.hero-logo-mark {
  background: url("assets/logo.png") center/cover no-repeat;
}

.brand-cube {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
}

.brand-cube.small {
  width: 46px;
  height: 46px;
}

.eyebrow {
  margin: 0;
  color: #ffffff;
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: "Press Start 2P", cursive; line-height: 1.45; }
h1 { font-size: clamp(1rem, 1.5vw, 1.35rem); }
h2 { font-size: clamp(1rem, 1.8vw, 1.45rem); }
h3 { font-size: 0.9rem; }

.spread-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 2px 8px;
  scrollbar-width: none;
  position: relative;
  z-index: 3;
}

.spread-nav::-webkit-scrollbar {
  display: none;
}

.nav-actions {
  display: flex;
  flex-wrap: nowrap;
  justify-content: end;
  align-items: center;
  gap: 12px;
  min-width: 0;
  position: relative;
  z-index: 2;
  margin-right: -8px;
}

.account-menu {
  position: relative;
  z-index: 40;
}

.account-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.people-icon {
  width: 14px;
  height: 14px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.account-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  display: grid;
  gap: 6px;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(10, 10, 10, 0.92);
  box-shadow: var(--shadow);
  z-index: 100;
  opacity: 1;
  transform: translateY(0) scale(1);
  transform-origin: top right;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.account-dropdown.hidden {
  opacity: 0;
  transform: translateY(-8px) scale(0.96);
  pointer-events: none;
}

.account-option {
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  font: inherit;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
}

.account-preview {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
  margin-bottom: 8px;
}

.nav-button,
.action-button,
.discord-link,
.founder-link,
.filter-button {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.05);
  color: var(--text);
  text-decoration: none;
  font: inherit;
  padding: 12px 16px;
  border-radius: 14px;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease, opacity 0.22s ease;
}

.hero-nav .nav-button,
.hero-nav .discord-link,
.hero-nav .founder-link {
  white-space: nowrap;
  padding: 12px 16px;
}

.brand h1 {
  white-space: nowrap;
}

.nav-button:hover,
.action-button:hover,
.discord-link:hover,
.founder-link:hover,
.filter-button:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 22px rgba(64, 19, 120, 0.24);
}

.nav-button.active,
.filter-button.active {
  background: linear-gradient(180deg, rgba(255,255,255,0.28), rgba(120,120,120,0.24));
  color: #ffffff;
}

.discord-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.14);
}

.founder-link {
  background: linear-gradient(180deg, #ffffff, #a9a9a9);
  color: #111111;
  font-weight: 700;
}

.discord-mini {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(255,255,255,0.18);
  font-size: 0.72rem;
}

.discord-icon {
  width: 14px;
  height: 14px;
  object-fit: contain;
  flex: 0 0 14px;
  filter: brightness(0) invert(1);
  opacity: 0.95;
}

.hero-landing {
  display: grid;
  justify-items: center;
  align-content: center;
  text-align: center;
  gap: 18px;
  min-height: calc(92vh - 130px);
  transition: opacity 0.3s ease, transform 0.3s ease, max-height 0.3s ease;
}

.hero-logo-card {
  width: 120px;
  padding: 12px;
  border-radius: 12px;
  display: grid;
  gap: 8px;
  justify-items: center;
  border: 1px solid rgba(255,255,255,0.05);
  background: rgba(255,255,255,0.03);
}

.hero-logo-mark {
  width: 62px;
  height: 62px;
  border-radius: 8px;
}

.hero-badge {
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.08);
  color: #ffffff;
}

.hero-title {
  font-size: clamp(2.4rem, 7vw, 5.1rem);
  text-shadow: 0 0 34px rgba(255,255,255,0.18);
}

.hero-subtitle {
  max-width: 780px;
  color: #e1e1e1;
  font-size: clamp(1rem, 2vw, 1.3rem);
}

.hero-ip-box {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
  color: #ffffff;
}

.hero-ip-box.small-ip {
  margin-top: 10px;
}

.ip-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 0 12px rgba(255,255,255,0.85);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.hero-meta span {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
}

.hero-actions {
  grid-auto-flow: column;
}

.action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
}

.violet-button { background: linear-gradient(180deg, #ffffff, #a8a8a8); color: #111; }
.discord-button { background: linear-gradient(180deg, #f3f3f3, #979797); color: #111; }
.vote-button { background: linear-gradient(180deg, #ffffff, #bfbfbf); color: #111; }
.dark-button { background: rgba(22, 22, 22, 0.88); }

.page-panel {
  display: none;
  padding: 28px;
  margin-top: 18px;
  animation: tabReveal 0.55s cubic-bezier(.2,.8,.2,1) forwards;
  position: relative;
  z-index: 1;
}

.page-panel.active { display: block; }

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

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

.content-card {
  padding: 22px;
  border-radius: 24px;
  display: grid;
  gap: 18px;
}

.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}

.stat-card {
  padding: 20px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(29, 16, 53, 0.38);
  text-align: center;
}

.stat-card strong {
  display: block;
  margin-bottom: 10px;
  font-family: "Press Start 2P", cursive;
  color: #ffffff;
}

.stack-list,
.team-list,
.admin-list,
.settings-card,
.auth-form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.05);
  color: var(--text);
  font: inherit;
}

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

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

.gallery-card {
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(19, 10, 36, 0.35);
}

.gallery-add-tile {
  display: grid;
  align-items: center;
  justify-items: center;
  text-align: center;
  gap: 16px;
  padding: 24px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.05);
}

.gallery-plus {
  font-size: 5rem;
  line-height: 1;
  color: rgba(255, 255, 255, 0.4);
}

.gallery-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
}

.gallery-card div {
  padding: 14px;
}

.compare-table,
.discord-widget,
.faq-card,
.comment-card {
  display: grid;
  gap: 12px;
}

.compare-row,
.discord-widget,
.faq-card,
.comment-card {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(19, 10, 36, 0.35);
}

.compare-row {
  grid-template-columns: 1.2fr repeat(3, minmax(0, 1fr));
  align-items: center;
  font-weight: 600;
}

.compare-row.header {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.compare-row span.center {
  text-align: center;
}

.box-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.rank-card,
.announcement-item,
.team-member,
.profile-banner,
.admin-item {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(19, 10, 36, 0.35);
  backdrop-filter: blur(10px);
}

.rank-card {
  padding: 18px;
  display: grid;
  gap: 14px;
  position: relative;
  overflow: hidden;
}

.rank-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(211, 143, 255, 0.14), transparent 45%);
  pointer-events: none;
}

.rank-card.rank-vip { box-shadow: inset 0 0 0 1px rgba(165, 101, 255, 0.18); }
.rank-card.rank-svip { box-shadow: inset 0 0 0 1px rgba(235, 115, 255, 0.18); }
.rank-card.rank-mvip { box-shadow: inset 0 0 0 1px rgba(213, 132, 255, 0.18); }
.rank-card.rank-box1 { box-shadow: inset 0 0 0 1px rgba(175, 101, 255, 0.18); }
.rank-card.rank-box2 { box-shadow: inset 0 0 0 1px rgba(129, 135, 255, 0.18); }
.rank-card.rank-box3 { box-shadow: inset 0 0 0 1px rgba(215, 142, 255, 0.18); }
.rank-card.rank-box4 { box-shadow: inset 0 0 0 1px rgba(235, 107, 255, 0.18); }
.rank-card.rank-box5 { box-shadow: inset 0 0 0 1px rgba(255, 145, 240, 0.18); }

.rank-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.05);
}

.price-tag {
  color: #efb8ff;
  font-weight: 700;
  font-size: 1.15rem;
}

.announcement-item,
.profile-banner,
.team-member,
.admin-item {
  padding: 14px;
}

.announcement-item.general { border-color: rgba(233, 198, 255, 0.2); }
.announcement-item.smp { border-color: rgba(180, 180, 180, 0.34); background: rgba(35, 35, 35, 0.36); }
.announcement-item.boxpvp { border-color: rgba(240, 240, 240, 0.24); background: rgba(60, 60, 60, 0.34); }

.filter-row {
  grid-auto-flow: column;
  justify-content: start;
}

.team-layout {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.team-title {
  margin-bottom: 12px;
}

.team-title-rgb {
  background: linear-gradient(90deg, #ff4d4d, #ffe24d, #53ff8c, #53c8ff, #b46bff, #ff4db8);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: rgbShift 4s linear infinite;
  text-shadow: 0 0 18px rgba(255, 255, 255, 0.18);
}

.team-title-blue {
  color: #6cb8ff;
  text-shadow: 0 0 14px rgba(108, 184, 255, 0.75);
}

.team-title-purple {
  color: #c07cff;
  text-shadow: 0 0 14px rgba(192, 124, 255, 0.75);
}

.team-title-green {
  color: #73ff98;
  text-shadow: 0 0 14px rgba(115, 255, 152, 0.75);
}

.team-title-gold {
  color: #ffd76b;
  text-shadow: 0 0 14px rgba(255, 215, 107, 0.78);
}

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

.team-member {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
}

.role-tag { color: #ffffff; }

.minecraft-skin-head {
  width: 58px;
  height: 58px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  object-fit: cover;
  image-rendering: pixelated;
  background: rgba(255,255,255,0.04);
}

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

.minecraft-head {
  position: relative;
  width: 58px;
  height: 58px;
  border-radius: 12px;
  background: linear-gradient(180deg, #7b4e78 0 32%, #e0b0ff 32% 100%);
}

.eye,
.mouth {
  position: absolute;
  background: #341335;
}

.eye { top: 23px; width: 8px; height: 8px; }
.eye-left { left: 12px; }
.eye-right { right: 12px; }
.mouth { left: 20px; bottom: 10px; width: 18px; height: 5px; }

.auth-page-card {
  max-width: 560px;
  margin: 0 auto;
}

.warning-box {
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-weight: 700;
  line-height: 1.6;
  text-align: center;
  animation: pulseWarning 1.9s ease-in-out infinite;
}

.admin-layout {
  display: grid;
  gap: 18px;
}

.admin-login-card {
  max-width: 520px;
}

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

.admin-section {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
  display: grid;
  gap: 10px;
}

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

.trash-button {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.06);
  color: #ffcdfd;
  cursor: pointer;
}

#founderControls.hidden-panel {
  display: none;
}

#founderControls.unlocked {
  display: grid;
}

.site-footer {
  margin-top: 18px;
  padding: 24px;
  border-radius: 0;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 24px;
}

.site-footer a {
  color: #e4c8ff;
}

.footer-link-list {
  display: grid;
  gap: 10px;
}

.footer-link-button {
  text-align: left;
  border: 0;
  background: transparent;
  color: #e4c8ff;
  cursor: pointer;
  font: inherit;
  padding: 0;
}

.footer-link-button:hover {
  color: #ffd6ff;
  text-decoration: underline;
}

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

.copyright-bar {
  margin-top: 0;
  padding: 16px 24px;
  border-radius: 0;
  border-top: 0;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.copyright-bar a {
  color: var(--text);
  text-decoration: none;
}

.copyright-bar a:hover {
  text-decoration: underline;
}

.copyright-secret-trigger {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  padding: 0;
  cursor: pointer;
}

.site-credit {
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.82rem;
  white-space: nowrap;
}

.hidden-access-button {
  position: fixed;
  width: 10px;
  height: 10px;
  right: 8px;
  bottom: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  opacity: 0.04;
  z-index: 120;
  cursor: pointer;
  padding: 0;
}

.hidden-access-left {
  right: auto;
  left: 8px;
}

.announcement-modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0,0,0,0.5);
  z-index: 50;
}

.announcement-modal.hidden { display: none; }

.announcement-modal-card {
  width: min(520px, calc(100% - 24px));
  border-radius: 24px;
  padding: 24px;
  display: grid;
  gap: 16px;
}

.modal-actions {
  grid-auto-flow: column;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  max-width: 320px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(22, 11, 42, 0.95);
  z-index: 60;
}

body:not(.home-tab) .hero {
  min-height: auto;
  padding-bottom: 20px;
}

body:not(.home-tab) .hero-landing {
  min-height: 0;
  max-height: 0;
  opacity: 0;
  transform: translateY(-18px);
  overflow: hidden;
  pointer-events: none;
}

@keyframes tabReveal {
  0% { opacity: 0; transform: translateY(28px) scale(0.98); }
  65% { opacity: 1; transform: translateY(-3px) scale(1.01); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes floatParticle {
  from { transform: translateY(0) scale(1); opacity: 0; }
  20% { opacity: 1; }
  to { transform: translateY(-120vh) scale(1.8); opacity: 0; }
}

@keyframes pulseWarning {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 rgba(255,255,255,0); }
  50% { opacity: 0.55; box-shadow: 0 0 24px rgba(255,255,255,0.12); }
}

@media (max-width: 1200px) {
  .panel-grid,
  .triple-grid,
  .rank-grid,
  .box-grid,
  .gallery-grid,
  .admin-grid,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .hero-nav {
    grid-template-columns: 1fr;
  }

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

  .spread-nav,
  .hero-actions,
  .modal-actions,
  .filter-row {
    grid-auto-flow: row;
  }

  .spread-nav,
  .nav-actions {
    justify-content: center;
  }

  .hero-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .page-shell { width: min(100% - 16px, 100%); }
  .hero { padding: 18px; }
  .hero-title {
    font-size: clamp(1.2rem, 7.2vw, 2rem);
    line-height: 1.25;
    max-width: 100%;
    word-break: break-word;
    overflow-wrap: anywhere;
    text-align: center;
  }
  body {
    background:
      linear-gradient(180deg, rgba(8, 8, 8, 0.22), rgba(8, 8, 8, 0.84)),
      url("assets/background-night.png") center/cover no-repeat,
      #0d0718;
  }
  .account-dropdown {
    min-width: min(250px, calc(100vw - 32px));
    right: 50%;
    transform: translate(50%, 0);
  }
  .account-dropdown.hidden {
    transform: translate(50%, -8px) scale(0.96);
  }
  .compare-row { grid-template-columns: 1fr; }
  .copyright-bar { padding: 14px 16px; }

  .hero-nav {
    gap: 10px;
  }

  .brand {
    width: 100%;
    justify-content: center;
    text-align: left;
  }

  .brand-home-button {
    width: min(100%, 320px);
    justify-content: center;
    margin: 0 auto;
  }

  .spread-nav,
  .nav-actions {
    width: 100%;
    justify-content: stretch;
    overflow: visible;
    padding-bottom: 0;
  }

  .brand,
  .nav-actions {
    margin: 0;
  }

  .spread-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .nav-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .hero-nav .nav-button,
  .hero-nav .discord-link,
  .hero-nav .founder-link {
    width: 100%;
    justify-content: center;
    padding: 10px 8px;
    font-size: 0.8rem;
    min-width: 0;
    min-height: 44px;
  }

  .account-menu {
    width: 100%;
  }

  .account-toggle {
    width: 100%;
    justify-content: center;
  }

  .hero-actions .action-button,
  .filter-row .filter-button,
  .modal-actions .action-button {
    width: 100%;
  }

  .hero-landing {
    gap: 14px;
    min-height: 0;
    padding-top: 4px;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    justify-items: center;
  }

  .hero-logo-card {
    display: none;
  }

  .hero-subtitle {
    font-size: 0.95rem;
    max-width: 100%;
  }

  .hero-ip-box,
  .hero-meta span {
    width: 100%;
    justify-content: center;
  }

  .hero-ip-box {
    padding: 10px 12px;
  }

  .hero-ip-box strong {
    display: block;
    max-width: 100%;
    font-size: 0.88rem;
    line-height: 1.35;
    word-break: break-all;
    text-align: center;
  }

  .hero-badge {
    max-width: 100%;
    text-align: center;
  }

  .hero-actions {
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
  }

  .content-card,
  .page-panel {
    padding: 18px;
  }

  #tab-home .panel-grid {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
  }

  #tab-home .content-card,
  #tab-home .stat-card {
    width: 100%;
    margin: 0 auto;
  }

  .rank-card,
  .announcement-item,
  .profile-banner,
  .team-member,
  .admin-item,
  .faq-card,
  .comment-card,
  .discord-widget {
    padding: 12px;
  }
}
