:root {
  --bg: #070a0d;
  --panel: rgba(12, 18, 20, 0.84);
  --panel-strong: rgba(16, 24, 26, 0.94);
  --line: rgba(196, 255, 219, 0.14);
  --text: #f2fff7;
  --muted: #a6b9ad;
  --accent: #6ee7a8;
  --glow: #8b5cf6;
  --gold: #ffd166;
  --danger: #ff6b6b;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 12% 18%, rgba(110, 231, 168, 0.16), transparent 28rem),
    radial-gradient(circle at 84% 12%, rgba(139, 92, 246, 0.16), transparent 26rem),
    linear-gradient(180deg, #070a0d 0%, #0a1110 46%, #060808 100%);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

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

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

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  opacity: 0.06;
  background-image:
    linear-gradient(45deg, rgba(255,255,255,.18) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255,255,255,.18) 25%, transparent 25%);
  background-size: 6px 6px;
  mix-blend-mode: overlay;
}

.site-header {
  position: fixed;
  z-index: 40;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 24px;
  padding: 16px clamp(18px, 4vw, 54px);
  background: rgba(5, 8, 9, 0.72);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.site-header .brand + .nav {
  margin-left: auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-mark,
.avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 2px solid rgba(255,255,255,.12);
  background:
    linear-gradient(135deg, var(--accent), var(--glow)),
    repeating-linear-gradient(45deg, rgba(255,255,255,.2) 0 4px, transparent 4px 8px);
  color: #07100b;
  font-family: "Press Start 2P", monospace;
  font-size: 18px;
  box-shadow: 0 0 28px rgba(110, 231, 168, 0.3);
}

.brand strong {
  display: block;
  font-weight: 900;
  letter-spacing: 0;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav a {
  padding: 9px 11px;
  border-radius: 8px;
  color: #d7eadf;
  font-size: 14px;
}

.nav a:hover {
  background: rgba(255,255,255,.08);
  color: #fff;
}

.nav a.active {
  background: rgba(110, 231, 168, .14);
  color: var(--accent);
}

.page {
  display: none;
}

.page.active {
  display: block;
}

.page.section.active,
.page.split.active,
.page.app-grid.active,
.page.profile.active,
.page.admin.active {
  display: grid;
}

.page.section.active:not(.split):not(.app-grid):not(.profile):not(.admin) {
  display: block;
}

.hero {
  position: relative;
  min-height: calc(100vh - 78px);
  display: grid;
  align-items: end;
  overflow: hidden;
  padding: 120px clamp(18px, 5vw, 72px) 54px;
}

.clean-hero {
  padding: 0;
}

.clean-hero .hero-bg {
  animation: none;
  transform: none;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: var(--hero-image, url("/assets/arteksmp-reload-header.png"));
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
  animation: drift 18s ease-in-out infinite alternate;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(3, 6, 7, 0.92) 0%, rgba(3, 6, 7, 0.68) 42%, rgba(3, 6, 7, 0.24) 100%),
    linear-gradient(180deg, rgba(3, 6, 7, 0.1) 0%, #070a0d 100%);
}

.particles {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(110, 231, 168, 0.9) 0 2px, transparent 2px),
    radial-gradient(circle, rgba(255, 209, 102, 0.8) 0 1px, transparent 1px);
  background-size: 120px 120px, 84px 84px;
  animation: particles 12s linear infinite;
  opacity: 0.36;
}

.hero-content {
  position: relative;
  max-width: 860px;
  z-index: 2;
}

.server-pill,
.eyebrow,
.admin-state {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
}

.live-dot {
  width: 9px;
  height: 9px;
  background: var(--accent);
  box-shadow: 0 0 16px var(--accent);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 820px;
  margin: 22px 0 18px;
  font-size: clamp(45px, 9vw, 118px);
  line-height: .9;
  letter-spacing: 0;
  text-shadow: 0 0 34px rgba(110, 231, 168, 0.2);
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(30px, 5vw, 58px);
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 14px;
  font-size: 22px;
}

.hero p,
.lead {
  max-width: 760px;
  color: #cfe4d6;
  font-size: clamp(17px, 2vw, 22px);
}

.hero-actions,
.status-grid,
.section-head,
.copy-line,
.color-row,
.footer {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn,
.icon-btn {
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.08);
  color: var(--text);
  border-radius: 8px;
  padding: 13px 17px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.btn:hover,
.icon-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,.32);
  background: rgba(255,255,255,.13);
}

.btn.primary {
  background: linear-gradient(135deg, var(--accent), #c9f76f);
  color: #07100b;
  box-shadow: 0 0 28px rgba(110, 231, 168, .24);
}

.btn.discord {
  background: #5865f2;
  color: #fff;
  border-color: rgba(255,255,255,.18);
  box-shadow: 0 0 28px rgba(88, 101, 242, .25);
}

.btn.ghost {
  background: rgba(4, 8, 10, .46);
}

.btn.full {
  width: 100%;
  justify-content: center;
  text-align: center;
}

.btn.mini {
  padding: 8px 10px;
  font-size: 13px;
}

.btn.danger {
  background: rgba(255, 107, 107, .16);
  border-color: rgba(255, 107, 107, .36);
  color: #ffd5d5;
}

.status-grid {
  margin-top: 34px;
}

.status-grid article,
.info-panel,
.form,
.card,
.player-card,
.profile-panel,
.admin-lists,
.idea-item {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 20px 70px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.04);
  backdrop-filter: blur(14px);
}

.status-grid article {
  min-width: 165px;
  padding: 15px;
  border-radius: 8px;
}

.status-grid span,
.card span,
.player-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.status-grid strong {
  overflow-wrap: anywhere;
}

.section {
  padding: 92px clamp(18px, 5vw, 72px);
}

.split,
.app-grid,
.profile,
.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr);
  gap: clamp(22px, 4vw, 54px);
  align-items: start;
}

.info-panel,
.profile-panel,
.admin-lists {
  padding: 26px;
  border-radius: 8px;
}

.info-panel ul {
  margin: 0 0 24px;
  padding: 0;
  display: grid;
  gap: 10px;
  list-style: none;
}

.info-panel li,
.rules-list div {
  position: relative;
  padding-left: 24px;
  color: #dceee4;
}

.info-panel li::before,
.rules-list div::before {
  content: "";
  position: absolute;
  left: 0;
  top: .55em;
  width: 10px;
  height: 10px;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}

.copy-line {
  width: fit-content;
  max-width: 100%;
  padding: 8px;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--line);
  border-radius: 8px;
}

code {
  padding: 0 10px;
  color: var(--accent);
  overflow-wrap: anywhere;
}

.icon-btn {
  width: 42px;
  height: 42px;
  padding: 0;
}

.rules-band {
  display: grid;
  grid-template-columns: minmax(0, .75fr) minmax(320px, 1fr);
  gap: 34px;
  background: linear-gradient(135deg, rgba(110,231,168,.08), rgba(139,92,246,.08));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.rules-list {
  display: grid;
  gap: 14px;
}

.form {
  display: grid;
  gap: 14px;
  padding: 22px;
  border-radius: 8px;
}

label {
  display: grid;
  gap: 7px;
  color: #dbeee4;
  font-weight: 700;
  font-size: 14px;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 8px;
  background: rgba(3, 7, 8, .72);
  color: var(--text);
  padding: 12px 13px;
  outline: none;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(110, 231, 168, .12);
}

textarea {
  resize: vertical;
}

.section-head {
  justify-content: space-between;
  margin-bottom: 28px;
}

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

.card,
.player-card,
.idea-item {
  border-radius: 8px;
  padding: 22px;
}

.card .tag {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 14px;
  padding: 5px 8px;
  border: 1px solid rgba(255,255,255,.14);
  color: var(--accent);
  background: rgba(110,231,168,.08);
}

.player-card,
.video-card {
  position: relative;
  overflow: hidden;
}

.player-card::after,
.video-card::after {
  content: "";
  position: absolute;
  right: -30px;
  top: -30px;
  width: 100px;
  height: 100px;
  background: linear-gradient(135deg, var(--accent), var(--glow));
  opacity: .14;
}

.player-directory {
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.player-card {
  min-height: 330px;
  display: grid;
  align-content: start;
  gap: 16px;
}

.player-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
}

.player-card h3 {
  margin-bottom: 8px;
  overflow-wrap: anywhere;
}

.video-feed {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.video-card {
  display: block;
}

.video-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  margin-bottom: 14px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.12);
}

.ideas-list,
.admin-stack {
  display: grid;
  gap: 14px;
}

.profile-panel {
  display: flex;
  align-items: center;
  gap: 18px;
}

.discord-avatar {
  width: 92px;
  height: 92px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,.16);
}

.avatar {
  width: 84px;
  height: 84px;
  font-size: 30px;
  flex: 0 0 auto;
}

.admin {
  background: rgba(0,0,0,.22);
}

.admin-grid {
  margin-top: 22px;
  grid-template-columns: minmax(320px, 1fr) minmax(320px, .9fr) minmax(320px, .9fr);
}

.admin-grid.is-locked {
  display: none;
}

.is-hidden {
  display: none !important;
}

.muted {
  color: var(--muted);
  font-size: 14px;
}

.admin-lists {
  display: grid;
  gap: 12px;
  align-content: start;
}

.mini-record {
  padding: 12px;
  border-radius: 8px;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--line);
}

.mini-record strong {
  display: block;
}

.mini-record small {
  color: var(--muted);
}

.record-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.discord-form-wrap {
  min-height: calc(100vh - 80px);
  display: grid;
  place-items: center;
  padding-top: 30px;
}

.discord-modal {
  width: min(520px, 100%);
  max-height: calc(100vh - 130px);
  overflow: auto;
  display: grid;
  gap: 18px;
  padding: 24px;
  border-radius: 8px;
  background: #3b3d46;
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 24px 90px rgba(0,0,0,.45);
}

.modal-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-title h2 {
  margin: 0;
  font-size: 24px;
}

.brand-mark.small {
  width: 28px;
  height: 28px;
  font-size: 12px;
}

.warning {
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #faa61a;
  background: rgba(250, 166, 26, .12);
  color: #fff5d6;
  font-weight: 700;
}

.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.discord-modal input,
.discord-modal textarea {
  background: #30323a;
  border-color: rgba(255,255,255,.12);
}

.footer {
  justify-content: space-between;
  padding: 28px clamp(18px, 5vw, 72px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: #050708;
}

.footer strong {
  color: var(--text);
}

.toast {
  position: fixed;
  z-index: 60;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  max-width: min(520px, calc(100vw - 32px));
  padding: 13px 16px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel-strong);
  color: var(--text);
  transition: .2s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

body.mode-emerald {
  --accent: #34d399;
  --glow: #22d3ee;
}

body.mode-nether {
  --accent: #fb7185;
  --glow: #f59e0b;
}

@keyframes drift {
  from { transform: scale(1.04) translate3d(0, 0, 0); }
  to { transform: scale(1.08) translate3d(-1.2%, -.8%, 0); }
}

@keyframes particles {
  from { background-position: 0 0, 0 0; }
  to { background-position: 120px -120px, -84px 84px; }
}

@media (max-width: 980px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    justify-content: flex-start;
  }

  .hero {
    min-height: 860px;
  }

  .split,
  .app-grid,
  .profile,
  .rules-band,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .cards,
  .players {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .site-header {
    position: absolute;
  }

  .nav a {
    font-size: 13px;
    padding: 7px 8px;
  }

  .hero {
    min-height: 920px;
    padding-top: 190px;
  }

  .hero-actions .btn {
    width: 100%;
    text-align: center;
  }

  .status-grid article,
  .cards,
  .players,
  .copy-line {
    width: 100%;
  }

  .cards,
  .players {
    grid-template-columns: 1fr;
  }

  .profile-panel {
    align-items: flex-start;
    flex-direction: column;
  }
}

.page:not(.active) {
  display: none !important;
}

.hero.page.active {
  display: grid;
}
