:root { --accent: #991b1b; --ease: cubic-bezier(0.22, 1, 0.36, 1); --text-dim: #3f3f3f; }

/* Hero preview */
.hero-preview {
  margin-top: 72px;
  animation: fadeUp 1s 0.35s var(--ease) both;
  width: 100%;
  max-width: 1040px;
  margin-left: auto;
  margin-right: auto;
}

.hero-preview-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-dim);
  margin-bottom: 18px;
  text-align: center;
}

.hero-preview-frame {
  position: relative;
  width: 100%;
  border-radius: 14px;
  padding: 1px;
  background: rgba(255,255,255,0.1);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

.hero-preview-frame::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(180deg, rgba(255,255,255,0.14), rgba(153, 27, 27, 0.25));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.hero-preview-inner {
  border-radius: 19px;
  overflow: hidden;
  background: #0a0a0a;
  cursor: default;
}

.hero-preview-inner .root-window {
  max-width: none;
  width: 100%;
  min-height: 500px;
  box-shadow: none;
  transform: none;
  border: none;
  border-radius: 0;
}

.hero-preview-inner .root-nav-item { cursor: pointer; }

.hero-preview-inner .root-window .root-sidebar {
  width: 200px;
  min-width: 200px;
}

.hero-preview-inner .root-window .root-content {
  padding: 24px 28px 28px;
}

.hero-preview-inner .root-window .root-box {
  min-height: 260px;
}

.hero-preview-glow { display: none; }

.hero-preview-hint {
  text-align: center;
  margin-top: 18px;
  font-size: 0.8rem;
  color: var(--text-dim);
  letter-spacing: 0.03em;
}

.hero-preview-hint strong {
  color: #991b1b;
  font-weight: 500;
}

/* Root menu */
/* ═══════════════════════════════════════════
   ROOT MENU — 1:1 replica
   ═══════════════════════════════════════════ */
.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s, visibility 0.35s;
  padding: 20px;
}

.menu-overlay.open { opacity: 1; visibility: visible; }

.root-window {
  width: 100%;
  max-width: 720px;
  background: #0e0e0e;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  display: flex;
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(0,0,0,0.7);
  transform: scale(0.94) translateY(12px);
  transition: transform 0.4s var(--ease);
  isolation: isolate;
}

.menu-overlay .root-window {
  background: #0e0e0e;
  opacity: 1;
}

.menu-overlay.open .root-window {
  transform: scale(1) translateY(0);
}

/* Sidebar */
.root-sidebar {
  width: 168px;
  min-width: 168px;
  background: #0a0a0a;
  border-right: 1px solid rgba(255,255,255,0.05);
  padding: 22px 0 16px;
  display: flex;
  flex-direction: column;
}

.root-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 18px 22px;
}

.root-logo {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  object-fit: contain;
  display: block;
  border-radius: 4px;
}

.root-brand-name {
  font-family: var(--font-body), sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--accent);
  letter-spacing: -0.01em;
}

.root-nav {
  list-style: none;
  padding: 0 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.root-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  font-size: 0.84rem;
  font-weight: 500;
  color: #666;
  cursor: pointer;
  border-radius: 8px;
  border-left: 3px solid transparent;
  transition: all 0.2s;
  user-select: none;
  position: relative;
}

.root-nav-item:hover { color: #999; }

.root-nav-item.active {
  color: #ccc;
  background: rgba(255,255,255,0.05);
  border-left-color: var(--accent);
}

.root-nav-item svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  opacity: 0.6;
}

.root-nav-item.active svg { opacity: 1; stroke: #aaa; }

/* Main */
.root-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #0e0e0e;
}

.root-tabbar {
  position: relative;
  padding: 18px 24px 0;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.root-tab {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: #ccc;
  padding-bottom: 14px;
  position: relative;
}

.root-tab::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  min-width: 60px;
  height: 2px;
  background: var(--accent);
}

.root-close {
  position: absolute;
  right: 16px;
  top: 14px;
  background: none;
  border: none;
  color: #555;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: color 0.2s;
}

.root-close:hover { color: #aaa; }
.root-close svg { width: 16px; height: 16px; }

.root-content {
  flex: 1;
  padding: 20px 22px 22px;
  overflow-y: auto;
}

.root-panel { display: none; }
.root-panel.active { display: block; }

.root-subpanel { display: none; }
.root-subpanel.active { display: block; }

/* Tab bar modes */
.root-tabbar-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-height: 46px;
  position: relative;
}

.root-tabbar-single { display: none; }
.root-tabbar-single.visible { display: block; }

.root-subtabs {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 28px;
}

.root-subtabs.visible { display: flex; }

.root-subtab {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: #555;
  cursor: pointer;
  padding: 0 4px 14px;
  position: relative;
  transition: color 0.2s;
}

.root-subtab:hover { color: #888; }

.root-subtab.active {
  color: #ddd;
}

.root-subtab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
}

.root-box-scroll {
  max-height: 280px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) transparent;
}

.root-box-scroll::-webkit-scrollbar { width: 4px; }
.root-box-scroll::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 2px; }

.root-preview-viewport {
  flex: 1;
  min-height: 200px;
  background: #050505;
  border-radius: 6px;
  margin-top: 8px;
  border: 1px solid rgba(255,255,255,0.04);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.root-preview-viewport span {
  font-size: 0.72rem;
  color: #444;
  text-align: center;
  padding: 12px;
  line-height: 1.5;
}

/* Full-page ESP world — visible behind UI */
.esp-world {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
  contain: strict;
}

.esp-world canvas {
  width: 100%;
  height: 100%;
  display: block;
}

body > .ambient,
body > .noise { z-index: 0; }

nav,
.hero,
.stats,
section,
footer {
  position: relative;
  z-index: 2;
}

nav { z-index: 100; }
.menu-overlay { z-index: 1000; }

/* Let ESP show through the page + menu (no heavy blur) */
.hero {
  background: transparent;
}

.hero-preview-inner {
  background: transparent !important;
}

.hero-preview-frame {
  background: rgba(255,255,255,0.06) !important;
}

.stats,
section,
footer {
  background: rgba(9, 9, 9, 0.72);
}

.root-window {
  background: rgba(14, 14, 14, 0.82) !important;
}

.root-sidebar {
  background: rgba(10, 10, 10, 0.78) !important;
}

.root-main {
  background: rgba(14, 14, 14, 0.7) !important;
}

.root-box-title {
  background: rgba(14, 14, 14, 0.95) !important;
}

.root-kb-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 0.82rem;
  color: #777;
}

.root-hitbox-wrap { margin-top: 14px; }

.root-hitbox-label {
  display: block;
  font-size: 0.82rem;
  color: #777;
  margin-bottom: 8px;
}

.root-hitbox-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  font-size: 0.82rem;
  color: #aaa;
  cursor: pointer;
}

.root-hitbox-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
}

/* Web Panel (top, no box) */
.root-webpanel {
  margin-bottom: 18px;
}

.root-webpanel h4 {
  font-size: 0.88rem;
  font-weight: 600;
  color: #ddd;
  margin-bottom: 4px;
}

.root-webpanel p {
  font-size: 0.78rem;
  color: #666;
  margin-bottom: 10px;
}

.root-connect-btn {
  padding: 7px 22px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  color: #888;
  font-size: 0.8rem;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.root-connect-btn:hover {
  border-color: rgba(255,255,255,0.2);
  color: #bbb;
}

/* Bordered boxes */
.root-boxes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.root-box {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 16px 18px;
  position: relative;
  min-height: 220px;
  display: flex;
  flex-direction: column;
}

.root-box-title {
  position: absolute;
  top: -9px;
  left: 14px;
  background: #0e0e0e;
  padding: 0 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #ccc;
}

.root-action-btn {
  display: block;
  width: 100%;
  padding: 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 8px;
  color: #777;
  font-size: 0.82rem;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  margin-bottom: 8px;
  transition: all 0.2s;
}

.root-action-btn:hover {
  background: rgba(255,255,255,0.06);
  color: #aaa;
  border-color: rgba(255,255,255,0.12);
}

.root-activity {
  margin-top: auto;
  padding-top: 8px;
  font-size: 0.75rem;
  color: #555;
}

.root-checks {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 11px;
  flex: 1;
}

.root-check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  color: #777;
  cursor: pointer;
  user-select: none;
}

.root-check input {
  appearance: none;
  width: 15px;
  height: 15px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 3px;
  background: transparent;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
}

.root-check input:checked {
  background: var(--accent);
  border-color: var(--accent);
}

.root-check input:checked::after {
  content: '';
  position: absolute;
  left: 4px; top: 1px;
  width: 4px; height: 8px;
  border: solid #fff;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}

.root-keybind-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
}

.root-keybind-label {
  font-size: 0.75rem;
  color: #555;
}

.root-keybind-btn {
  padding: 4px 10px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  background: transparent;
}

/* Aim / View panels */
.root-aim-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.root-slider-row {
  margin-bottom: 14px;
}

.root-slider-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #777;
  margin-bottom: 8px;
}

.root-slider-label span:last-child { color: var(--accent); font-weight: 600; font-size: 0.76rem; }

.root-slider {
  width: 100%;
  height: 3px;
  appearance: none;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  accent-color: var(--accent);
}

.root-select-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  font-size: 0.82rem;
  color: #777;
}

.root-select {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  color: #aaa;
  font-size: 0.78rem;
  font-family: inherit;
  padding: 5px 10px;
  cursor: pointer;
}

.root-slider::-webkit-slider-thumb {
  appearance: none;
  width: 12px; height: 12px;
  background: var(--accent);
  border-radius: 50%;
}

@media (max-width: 768px) {
  .root-window { flex-direction: column; max-height: 90vh; }
  .root-sidebar {
    width: 100%; min-width: unset;
    flex-direction: row;
    padding: 12px 10px;
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    align-items: center;
  }
  .root-brand { padding: 0 8px 0 10px; border: none; }
  .root-nav { flex-direction: row; flex: 1; }
  .root-nav-item { border-left: none; border-bottom: 2px solid transparent; white-space: nowrap; }
  .root-nav-item.active { border-left: none; border-bottom-color: var(--accent); }
  .root-boxes, .root-aim-grid { grid-template-columns: 1fr; }

  .hero-preview-inner .root-window {
    flex-direction: column;
    min-height: auto;
  }

  .hero-preview-inner .root-window .root-sidebar {
    width: 100%;
    min-width: unset;
    flex-direction: row;
    padding: 12px 10px;
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    align-items: center;
  }

  .hero-preview-inner .root-window .root-brand {
    padding: 0 8px 0 10px;
  }

  .hero-preview-inner .root-window .root-nav {
    display: flex;
    flex-direction: row;
    flex: 1;
  }

  .hero-preview-inner .root-window .root-box {
    min-height: 200px;
  }
}

@media (max-width: 768px) {
  .root-window { flex-direction: column; max-height: 90vh; }
  .root-sidebar {
    width: 100%; min-width: unset;
    flex-direction: row;
    padding: 12px 10px;
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    align-items: center;
  }
  .root-brand { padding: 0 8px 0 10px; border: none; }
  .root-nav { flex-direction: row; flex: 1; }
  .root-nav-item { border-left: none; border-bottom: 2px solid transparent; white-space: nowrap; }
  .root-nav-item.active { border-left: none; border-bottom-color: var(--accent); }
  .root-boxes, .root-aim-grid { grid-template-columns: 1fr; }

  .hero-preview-inner .root-window {
    flex-direction: column;
    min-height: auto;
  }

  .hero-preview-inner .root-window .root-sidebar {
    width: 100%;
    min-width: unset;
    flex-direction: row;
    padding: 12px 10px;
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    align-items: center;
  }

  .hero-preview-inner .root-window .root-brand {
    padding: 0 8px 0 10px;
  }

  .hero-preview-inner .root-window .root-nav {
    display: flex;
    flex-direction: row;
    flex: 1;
  }

  .hero-preview-inner .root-window .root-box {
    min-height: 200px;
  }
}

/* Product page helpers */
body.has-root-menu .wrap { position: relative; z-index: 2; max-width: 1100px; }
body.has-root-menu .panel,
body.has-root-menu .product-faq,
body.has-root-menu footer { background: rgba(9,9,9,0.72); }
body.has-root-menu .hero { background: transparent; }
body.has-root-menu .hero-preview {
  margin-top: 0;
  max-width: 1040px;
  width: 100%;
}
body.has-root-menu .hero-preview-inner { background: transparent !important; }
body.has-root-menu .hero-preview-inner .root-window {
  min-height: 520px;
  max-width: none;
  width: 100%;
  transform: none;
  box-shadow: none;
  border: none;
}
