:root {
  color-scheme: dark;
  --bg: #0a0d10;
  --ink: #f4f1e8;
  --muted: #a5aba8;
  --line: rgba(244, 241, 232, 0.16);
  --panel: rgba(16, 21, 24, 0.78);
  --shadow: rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 10%, rgba(232, 55, 55, 0.18), transparent 24rem),
    radial-gradient(circle at 86% 15%, rgba(36, 170, 131, 0.2), transparent 22rem),
    linear-gradient(145deg, #07090b 0%, #10161a 47%, #0b0c0e 100%);
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent 82%);
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.03), transparent 14%, transparent 86%, rgba(255, 255, 255, 0.03)),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 5px);
  opacity: 0.42;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  align-items: center;
  padding: 42px 0;
}

.stage {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)), var(--panel);
  box-shadow: 0 24px 90px var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(22px);
  padding: clamp(22px, 4vw, 46px);
}

.header-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(26px, 4vw, 44px);
}

.kicker {
  margin: 0 0 10px;
  color: #86e0bc;
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.18em;
}

h1 {
  margin: 0;
  font-size: clamp(2.4rem, 7vw, 5.8rem);
  line-height: 0.92;
  letter-spacing: 0;
}

.status {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(134, 224, 188, 0.38);
  border-radius: 999px;
  background: rgba(11, 34, 29, 0.62);
  color: #caf5e2;
  font-size: 0.82rem;
  font-weight: 760;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #65f1b1;
  box-shadow: 0 0 18px #65f1b1;
}

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

.tile {
  position: relative;
  min-height: 310px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
  overflow: hidden;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.035));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  isolation: isolate;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.tile::before,
.tile::after {
  position: absolute;
  content: "";
  z-index: -1;
}

.tile::before {
  inset: auto -25% -38% -25%;
  height: 62%;
  background: var(--accent-soft);
  transform: rotate(-8deg);
}

.tile::after {
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 45%);
  opacity: 0;
  transition: opacity 180ms ease;
}

.tile:hover,
.tile:focus-visible {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.34), 0 0 0 1px var(--accent-soft);
  outline: none;
}

.tile:hover::after,
.tile:focus-visible::after {
  opacity: 1;
}

.icon-wrap {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.24);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.icon-wrap svg {
  width: 62px;
  height: 62px;
  fill: none;
  stroke: currentColor;
  stroke-width: 5.5;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.icon-wrap svg path:not(.flame) {
  fill: rgba(255, 255, 255, 0.03);
}

.flame {
  fill: rgba(255, 255, 255, 0.08);
}

.tile-copy {
  display: grid;
  gap: 12px;
}

.name {
  display: block;
  overflow-wrap: anywhere;
  font-size: clamp(1.58rem, 2.8vw, 2.35rem);
  font-weight: 850;
  letter-spacing: 0;
  line-height: 0.95;
}

.cue {
  width: max-content;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(244, 241, 232, 0.78);
  font-size: 0.78rem;
  font-weight: 760;
  text-transform: uppercase;
}

.raidline {
  --accent: #ff5b54;
  --accent-soft: linear-gradient(90deg, rgba(255, 91, 84, 0.34), rgba(255, 167, 94, 0.2));
}

.chess {
  --accent: #f4f1e8;
  --accent-soft: linear-gradient(90deg, rgba(244, 241, 232, 0.26), rgba(144, 160, 159, 0.16));
}

.chat {
  --accent: #58d5ba;
  --accent-soft: linear-gradient(90deg, rgba(88, 213, 186, 0.3), rgba(75, 128, 255, 0.18));
}

.battlefield {
  --accent: #ffb23f;
  --accent-soft: linear-gradient(90deg, rgba(255, 178, 63, 0.34), rgba(222, 47, 47, 0.24));
}

@media (max-width: 960px) {
  .shell {
    align-items: start;
  }

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

  .tile {
    min-height: 250px;
  }
}

@media (max-width: 620px) {
  .shell {
    width: min(100% - 20px, 480px);
    padding: 10px 0;
  }

  .stage {
    padding: 18px;
  }

  .header-row {
    display: grid;
    gap: 16px;
  }

  .status {
    justify-self: start;
  }

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

  .tile {
    min-height: 138px;
    flex-direction: row;
    align-items: center;
    padding: 18px;
  }

  .icon-wrap {
    flex: 0 0 auto;
    width: 74px;
    height: 74px;
  }

  .icon-wrap svg {
    width: 52px;
    height: 52px;
  }

  .tile-copy {
    justify-items: end;
    text-align: right;
  }

  .name {
    font-size: clamp(1.5rem, 9vw, 2.05rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
