:root {
  --bg: #070a10;
  --sidebar: #0d121b;
  --panel: #111827;
  --panel-2: #172033;
  --field: #090d15;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #f8fafc;
  --muted: #9aa7bb;
  --quiet: #6f7c91;
  --violet: #8b5cf6;
  --blue: #38bdf8;
  --cyan: #2dd4bf;
  --green: #22c55e;
  --pink: #f472b6;
  --red: #f43f5e;
  --amber: #f59e0b;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 68% -12%, rgba(56, 189, 248, 0.16), transparent 26rem),
    radial-gradient(circle at 16% 0%, rgba(139, 92, 246, 0.2), transparent 30rem),
    linear-gradient(180deg, #0a0f18, var(--bg));
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.app-shell {
  display: grid;
  grid-template-columns: 286px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  gap: 22px;
  padding: 22px;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(23, 32, 51, 0.72), rgba(13, 18, 27, 0.94)),
    var(--sidebar);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: conic-gradient(from 220deg, var(--blue), var(--violet), var(--pink), var(--cyan), var(--blue));
  box-shadow: 0 14px 34px rgba(139, 92, 246, 0.28);
}

.brand-mark::before {
  content: "";
  position: absolute;
  width: 29px;
  height: 29px;
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
}

.brand-mark::after {
  content: "";
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #fff;
}

.brand-mark span {
  position: absolute;
  width: 3px;
  height: 18px;
  border-radius: 999px;
  background: #fff;
  transform: rotate(46deg) translateY(-10px);
  transform-origin: 50% 100%;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 1.05rem;
  font-weight: 950;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.77rem;
  font-weight: 760;
}

.nav-tabs {
  display: grid;
  gap: 8px;
}

.nav-link {
  display: flex;
  min-height: 44px;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  padding: 0 13px;
  font-weight: 900;
  text-align: left;
}

.nav-link:hover,
.nav-link.is-active {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
}

.sidebar-status {
  display: grid;
  gap: 8px;
  margin-top: auto;
}

.sidebar-status > span {
  color: var(--quiet);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.status-pill {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-actions {
  display: grid;
  gap: 10px;
}

.primary-button,
.ghost-button,
.danger-button {
  min-height: 42px;
  padding: 0 14px;
  border-radius: 8px;
  color: var(--text);
  font-weight: 900;
}

.primary-button {
  border: 1px solid transparent;
  background: linear-gradient(135deg, var(--violet), var(--pink));
  box-shadow: 0 14px 32px rgba(139, 92, 246, 0.24);
}

.ghost-button {
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.05);
}

.danger-button {
  border: 1px solid rgba(244, 63, 94, 0.48);
  background: linear-gradient(135deg, #be123c, var(--red));
}

.primary-button:hover,
.ghost-button:hover,
.danger-button:hover {
  filter: brightness(1.08);
}

.small-button {
  min-height: 36px;
}

.wide {
  width: 100%;
}

.sound-button[aria-pressed="false"] {
  color: var(--muted);
}

.content-shell {
  min-width: 0;
  padding: 28px;
}

.page-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.45fr);
  gap: 18px;
  align-items: end;
  margin-bottom: 18px;
}

.eyebrow,
.section-label,
.panel-heading span,
.channel-card .meta,
.alert-item .reason {
  margin: 0 0 8px;
  color: var(--cyan);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

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

h1 {
  max-width: 780px;
  margin-bottom: 0;
  font-size: clamp(2.6rem, 5vw, 5rem);
  font-weight: 950;
  line-height: 0.94;
}

.intro {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 680;
  line-height: 1.55;
}

.signal-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.summary-card,
.hero-console,
.overview-card,
.main-panel,
.alerts-panel,
.control-panel,
.cleanup-panel,
.channel-card,
.alert-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(17, 24, 39, 0.88);
  box-shadow: var(--shadow);
}

.summary-card {
  position: relative;
  overflow: hidden;
  padding: 18px 20px;
}

.summary-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, var(--blue), var(--violet), transparent);
}

.summary-card span {
  display: block;
  margin-bottom: 5px;
  font-size: 1.8rem;
  font-weight: 950;
}

.summary-card small {
  color: var(--muted);
  font-weight: 760;
}

.page-view {
  display: none;
}

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

.hero-console {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 88% 0%, rgba(56, 189, 248, 0.16), transparent 22rem),
    rgba(17, 24, 39, 0.92);
}

.hero-console h2 {
  max-width: 780px;
  margin-bottom: 10px;
  font-size: clamp(1.8rem, 4vw, 3.6rem);
  line-height: 1;
}

.hero-console p,
.overview-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-weight: 680;
  line-height: 1.55;
}

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

.overview-card {
  padding: 18px;
}

.overview-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--quiet);
  font-size: 0.74rem;
  font-weight: 950;
  text-transform: uppercase;
}

.overview-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.5rem;
}

.main-panel,
.alerts-panel,
.control-panel,
.cleanup-panel {
  padding: 20px;
}

.panel-heading {
  margin-bottom: 16px;
}

.panel-heading strong {
  display: block;
  font-size: 1.18rem;
}

.horizontal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.panel-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sync-indicator {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  white-space: nowrap;
}

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

.channel-card {
  display: grid;
  gap: 14px;
  min-height: 218px;
  padding: 18px;
  background: linear-gradient(180deg, rgba(23, 32, 51, 0.96), rgba(13, 18, 28, 0.96));
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.channel-card:hover {
  border-color: rgba(45, 212, 191, 0.34);
  transform: translateY(-2px);
}

.channel-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.channel-card h2 {
  margin-bottom: 5px;
  font-size: 1.12rem;
}

.game,
.alert-item p,
.fine-print,
.cleanup-status,
.toggle-row small {
  color: var(--muted);
}

.live-dot {
  width: 10px;
  height: 10px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.14);
}

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

.metric {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 10, 16, 0.46);
}

.metric span {
  display: block;
  color: var(--quiet);
  font-size: 0.68rem;
  font-weight: 950;
  text-transform: uppercase;
}

.metric strong {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sparkline {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  align-items: end;
  gap: 4px;
  height: 42px;
}

.sparkline i {
  display: block;
  min-height: 5px;
  border-radius: 5px 5px 2px 2px;
  background: linear-gradient(180deg, var(--blue), var(--violet));
}

.discord-link {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 900;
  text-decoration: none;
}

.card-alert {
  border-color: rgba(245, 158, 11, 0.72);
}

.card-alert .sparkline i {
  background: linear-gradient(180deg, var(--amber), var(--pink));
}

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

.alert-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 14px;
}

.alert-item h3 {
  margin-bottom: 7px;
  font-size: 1rem;
}

.alert-item .reason {
  color: var(--amber);
}

.time-stamp {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  white-space: nowrap;
}

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

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.83rem;
  font-weight: 850;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--field);
  color: var(--text);
  outline: none;
}

input {
  min-height: 42px;
  padding: 0 12px;
}

textarea {
  min-height: 160px;
  resize: vertical;
  padding: 12px;
}

input:focus,
textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.14);
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.toggle-row strong,
.toggle-row small {
  display: block;
}

.toggle {
  width: 52px;
  height: 30px;
  flex: 0 0 auto;
  padding: 3px;
  border: 0;
  border-radius: 999px;
  background: #384253;
}

.toggle span {
  display: block;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.18s ease;
}

.toggle.is-on {
  background: var(--green);
}

.toggle.is-on span {
  transform: translateX(22px);
}

.fine-print,
.cleanup-status {
  margin: 14px 0 0;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.5;
}

.cleanup-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.followbot-report {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid rgba(244, 63, 94, 0.32);
  border-radius: 8px;
  background: rgba(244, 63, 94, 0.08);
}

.followbot-report strong,
.followbot-report p {
  display: block;
  margin: 0;
}

.followbot-report p {
  margin-top: 5px;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.45;
}

.empty-state {
  min-height: 170px;
  display: grid;
  place-items: center;
  padding: 24px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
  font-weight: 760;
  line-height: 1.5;
  text-align: center;
}

.sound-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(3, 5, 10, 0.82);
  backdrop-filter: blur(18px);
}

.site-footer {
  margin-top: 22px;
  padding: 18px 0 0;
  color: var(--quiet);
  font-size: 0.84rem;
  font-weight: 800;
  text-align: center;
}

.sound-modal.is-hidden {
  display: none;
}

.sound-modal-panel {
  width: min(560px, 100%);
  padding: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(23, 32, 51, 0.98), rgba(13, 18, 27, 0.98));
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
  text-align: center;
}

.sound-modal-visual {
  position: relative;
  display: grid;
  width: 112px;
  height: 112px;
  margin: 0 auto 22px;
  place-items: center;
}

.sound-modal-icon {
  position: relative;
  z-index: 2;
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--blue), var(--violet), var(--pink));
}

.sound-modal-icon::before {
  content: "";
  width: 28px;
  height: 28px;
  border: 3px solid #fff;
  border-right-color: transparent;
  border-radius: 50%;
}

.sound-wave {
  position: absolute;
  border: 1px solid rgba(56, 189, 248, 0.42);
  border-radius: 50%;
}

.sound-wave.one {
  inset: 17px;
}

.sound-wave.two {
  inset: 0;
  border-color: rgba(244, 114, 182, 0.32);
}

.sound-modal-kicker {
  margin-bottom: 8px !important;
  color: var(--cyan) !important;
  font-size: 0.78rem;
  font-weight: 950 !important;
  text-transform: uppercase;
}

.sound-modal h2 {
  margin-bottom: 12px;
  font-size: clamp(2.1rem, 7vw, 3.35rem);
  line-height: 0.95;
}

.sound-modal p {
  max-width: 430px;
  margin: 0 auto 24px;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.58;
}

.sound-modal-action {
  min-height: 52px;
  font-size: 1rem;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

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

  .page-header,
  .overview-grid,
  .channel-grid,
  .form-stack {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .content-shell,
  .sidebar {
    padding: 16px;
  }

  .signal-strip,
  .metric-row,
  .cleanup-actions {
    grid-template-columns: 1fr;
  }

  .hero-console,
  .horizontal,
  .followbot-report {
    align-items: flex-start;
    flex-direction: column;
  }

  h1 {
    font-size: clamp(2.3rem, 12vw, 3.8rem);
  }
}
