:root {
  --bg: #100d20;
  --panel: #211a3b;
  --panel-2: #30265a;
  --topbar: #292929;
  --sidebar: #090909;
  --text: #f4eff7;
  --muted: #b7acbd;
  --accent: #a98cff;
  --accent-2: #6fc7ff;
  --line: rgba(255,255,255,.10);
  --shadow: 0 16px 40px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 55% 12%, rgba(143, 112, 232, .25), transparent 32rem),
    radial-gradient(circle at 85% 55%, rgba(91, 178, 255, .12), transparent 28rem),
    var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

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

.topbar {
  height: 54px;
  position: fixed;
  z-index: 50;
  inset: 0 0 auto 0;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 20px;
  background: var(--topbar);
  box-shadow: 0 2px 12px rgba(0,0,0,.4);
}

.brand {
  min-width: 330px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 18px;
  white-space: nowrap;
}

.brand-mark {
  color: var(--accent);
  font-size: 25px;
  text-shadow: 0 0 14px rgba(169,140,255,.75);
}

.topnav {
  display: flex;
  gap: 28px;
  font-weight: 800;
  font-size: 14px;
}

.topnav a:hover {
  color: #ff83b5;
}

.search {
  margin-left: auto;
  width: min(400px, 30vw);
  height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 4px;
  background: #3a3a3a;
}

.search-icon {
  font-size: 25px;
  line-height: 1;
}

.search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: white;
  font-size: 16px;
}

.search input::placeholder {
  color: #eee;
}

.top-icons {
  display: flex;
  gap: 18px;
  font-size: 22px;
}

.sidebar {
  position: fixed;
  z-index: 40;
  top: 54px;
  bottom: 0;
  left: 0;
  width: 82px;
  background: var(--sidebar);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 24px;
}

.side-item {
  width: 100%;
  min-height: 78px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  color: #ddd;
  font-size: 12px;
}

.side-item:hover,
.side-item.active {
  color: white;
  background: rgba(255,255,255,.055);
}

.side-item.active .side-icon {
  color: var(--accent);
}

.side-icon {
  font-size: 25px;
}

.page {
  width: calc(100% - 82px);
  margin-left: 82px;
  padding-top: 54px;
  min-height: 100vh;
}

.page-tools {
  position: sticky;
  top: 54px;
  z-index: 30;
  height: 0;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-right: 28px;
}

.page-tools button {
  margin-top: 8px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: #4a3f70;
  color: white;
  font-size: 19px;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.hero {
  width: min(1540px, calc(100% - 70px));
  margin: 0 auto;
  padding: 25px 45px 45px;
  background: rgba(22, 11, 32, .92);
  border-left: 1px solid rgba(255,255,255,.04);
  border-right: 1px solid rgba(255,255,255,.04);
  min-height: 620px;
}

.hero-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 72px;
}

.title-icon {
  color: #fff;
  font-size: 28px;
}

h1 {
  margin: 0;
  font-size: clamp(38px, 5vw, 58px);
  letter-spacing: -2px;
}

.intro {
  max-width: 1400px;
  margin: 0 auto 55px;
  font-size: 18px;
  line-height: 1.65;
}

.intro strong {
  font-weight: 800;
}

.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 240px));
  justify-content: center;
  gap: 42px;
}

.wiki-card {
  display: block;
  transition: transform .18s ease, filter .18s ease;
}

.wiki-card:hover {
  transform: translateY(-5px);
  filter: brightness(1.15);
}

.card-art {
  aspect-ratio: 1 / 1;
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.10);
  background:
    radial-gradient(ellipse at 30% 70%, rgba(112, 87, 205, .65), transparent 42%),
    radial-gradient(ellipse at 75% 35%, rgba(72, 139, 225, .40), transparent 42%),
    linear-gradient(145deg, #07030e, #2c2052 45%, #09030e);
  box-shadow: var(--shadow);
}

.placeholder-orb {
  position: absolute;
  width: 75%;
  height: 75%;
  border-radius: 50%;
  background:
    repeating-radial-gradient(
      ellipse at 40% 50%,
      rgba(153, 128, 239, .27) 0 4px,
      rgba(12, 4, 25, .0) 5px 12px
    );
  filter: blur(2px);
  transform: rotate(-25deg);
}

.card-art::after {
  content: "";
  position: absolute;
  inset: -20%;
  background: linear-gradient(135deg, transparent 40%, rgba(255,255,255,.07), transparent 60%);
  transform: rotate(18deg);
}

.card-art span {
  position: relative;
  z-index: 2;
  color: #c8f6ff;
  font-size: clamp(20px, 2vw, 33px);
  font-weight: 900;
  letter-spacing: -1px;
  text-shadow:
    2px 2px 0 #9c72d4,
    0 0 14px rgba(184,228,255,.65);
  text-align: center;
}

.wiki-card h2 {
  margin: 12px 0 5px;
  font-size: 21px;
}

.wiki-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.notice,
.quick-links {
  width: min(1540px, calc(100% - 70px));
  margin: 25px auto 0;
  padding: 35px 45px;
  background: rgba(22,11,32,.92);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.notice h2,
.quick-links h2 {
  margin: 0 0 10px;
  font-size: 28px;
}

.notice p,
.quick-links p {
  color: var(--muted);
  line-height: 1.6;
}

.button {
  display: inline-block;
  margin-top: 10px;
  padding: 12px 18px;
  background: var(--accent);
  color: white;
  font-weight: 900;
  border-radius: 3px;
}

.button:hover {
  background: #c1afff;
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.link-grid a {
  padding: 18px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  font-weight: 700;
}

.link-grid a:hover {
  border-color: rgba(125,183,255,.55);
}

footer {
  width: min(1540px, calc(100% - 70px));
  margin: 25px auto;
  padding: 25px 10px 45px;
  display: flex;
  justify-content: center;
  gap: 10px;
  color: #897d91;
  font-size: 13px;
}

footer a:hover {
  color: white;
}

@media (max-width: 1000px) {
  .brand { min-width: auto; }
  .topnav { display: none; }
  .search { width: 260px; }
  .cards { grid-template-columns: repeat(2, minmax(180px, 240px)); }
  .link-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 650px) {
  .topbar {
    gap: 10px;
    padding: 0 10px;
  }

  .brand span:last-child {
    display: none;
  }

  .search {
    margin-left: auto;
    width: 45%;
  }

  .top-icons {
    display: none;
  }

  .sidebar {
    width: 58px;
  }

  .side-item {
    min-height: 65px;
  }

  .side-item span:last-child {
    display: none;
  }

  .page {
    width: calc(100% - 58px);
    margin-left: 58px;
  }

  .hero,
  .notice,
  .quick-links,
  footer {
    width: calc(100% - 20px);
  }

  .hero {
    padding: 25px 18px 35px;
  }

  .hero-title {
    margin-bottom: 45px;
  }

  .intro {
    font-size: 16px;
  }

  .cards {
    grid-template-columns: 1fr 1fr;
    gap: 18px;
  }

  .card-art span {
    font-size: 17px;
  }

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