.skilltree-page {
  min-height: 100vh;
  background: #000;
}

.skilltree-main {
  min-height: 100vh;
  background: #000;
  padding: 0;
}

.skilltree-board {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: #000;
  cursor: grab;
}

.skilltree-board.is-dragging {
  cursor: grabbing;
}

/* ---------- STARFIELD ---------- */

.skilltree-stars {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.skilltree-stars__layer {
  position: absolute;
  inset: -220px;
  will-change: transform;
  transition: transform 0.14s linear;
}

.skilltree-star {
  position: absolute;
  border-radius: 999px;
  background: #fff;
  pointer-events: none;
}

.skilltree-stars__layer--1 .skilltree-star {
  box-shadow:
    0 0 6px rgba(255,255,255,.95),
    0 0 12px rgba(180,220,255,.55);
}

.skilltree-stars__layer--2 .skilltree-star {
  box-shadow:
    0 0 4px rgba(255,255,255,.72),
    0 0 8px rgba(180,220,255,.28);
}

.skilltree-stars__layer--3 .skilltree-star {
  box-shadow:
    0 0 3px rgba(255,255,255,.42);
}

.skilltree-stars__layer--4 .skilltree-star {
  box-shadow:
    0 0 2px rgba(255,255,255,.22);
}

/* ---------- TOOLBAR ---------- */

.skilltree-toolbar {
  position: absolute;
  top: 18px;
  left: 18px;
  right: auto;
  display: flex;
  gap: 10px;
  z-index: 30;
}

.skilltree-toolbar__btn {
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(15,15,20,.88);
  color: #fff;
  border-radius: 12px;
  padding: .55rem .9rem;
  font: inherit;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

.skilltree-toolbar__btn:hover {
  background: rgba(30,30,38,.95);
  border-color: rgba(255,255,255,.35);
  transform: translateY(-1px);
}

/* ---------- GRAPH ---------- */

.skilltree-viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 1;
}

.skilltree-canvas {
  position: absolute;
  left: 0;
  top: 0;
  width: 4200px;
  height: 3200px;
  transform-origin: 0 0;
  will-change: transform;
}

.skilltree-lines {
  position: absolute;
  inset: 0;
  width: 4200px;
  height: 3200px;
  pointer-events: none;
  overflow: visible;
}

.skilltree-line {
  stroke: rgba(255,255,255,.18);
  stroke-width: 4;
  fill: none;
}

.skilltree-line--locked {
  stroke: rgba(255,255,255,.09);
  stroke-dasharray: 10 10;
}

.skilltree-nodes {
  position: absolute;
  inset: 0;
}

.skill-node {
  position: absolute;
  width: 108px;
  height: 108px;
  border-radius: 999px;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px 10px 10px;
  border: 3px solid rgba(255,255,255,.18);
  color: #fff;
  cursor: pointer;
  user-select: none;
  box-shadow: 0 12px 28px rgba(0,0,0,.38);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, filter .18s ease;
  background: transparent;
}

.skill-node:hover,
.skill-node:focus-visible {
  transform: translate(-50%, -50%) scale(1.06);
  border-color: rgba(255,255,255,.48);
  z-index: 12;
  filter: brightness(1.03);
}

.skill-node--core {
  width: 132px;
  height: 132px;
  background: radial-gradient(circle at 35% 35%, #6e6e6e, #343434 68%, #111 100%);
  border-color: rgba(255,255,255,.32);
}

.skill-node--domain {
  width: 118px;
  height: 118px;
  background: radial-gradient(circle at 35% 35%, #55ff81, #1ec356 72%, #117737 100%);
}

.skill-node--mastered {
  background: radial-gradient(circle at 35% 35%, #55ff81, #1ec356 72%, #117737 100%);
}

.skill-node--next {
  background: radial-gradient(circle at 35% 35%, #7bd6ff, #309eed 72%, #115ea9 100%);
}

.skill-node--locked {
  background: radial-gradient(circle at 35% 35%, #1f1f1f, #0d0d0d 72%, #030303 100%);
  border-color: rgba(255,255,255,.12);
  opacity: .86;
}

.skill-node__inner {
  display: flex;
  flex-direction: column;
  gap: .22rem;
  align-items: center;
  justify-content: center;
  line-height: 1.04;
}

.skill-node__cost {
  position: absolute;
  top: 8px;
  left: 14px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .68rem;
  font-weight: 700;
  color: #ffd66d;
  text-shadow: 0 1px 4px rgba(0,0,0,.45);
  pointer-events: none;
}

.skill-node__cost-icon {
  font-size: .72rem;
}

.skill-node__icon {
  font-size: 1rem;
}

.skill-node__label {
  font-size: .78rem;
  font-weight: 700;
  max-width: 82px;
}

.skill-node__subtitle {
  font-size: .64rem;
  color: rgba(255,255,255,.88);
}

/* ---------- TOOLTIP ---------- */

.skilltree-tooltip {
  position: absolute;
  right: 18px;
  top: 18px;
  width: 340px;
  max-width: calc(100% - 36px);
  padding: 1rem;
  border-radius: 18px;
  background: rgba(10,10,14,.94);
  border: 1px solid rgba(255,255,255,.10);
  color: #fff;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 40;
}

.skilltree-tooltip.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.skilltree-tooltip__category {
  margin: 0 0 .35rem;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #8fd8ff;
}

.skilltree-tooltip__title {
  margin: 0 0 .5rem;
  font-size: 1rem;
}

.skilltree-tooltip__text {
  margin: 0;
  font-size: .92rem;
  line-height: 1.5;
  color: rgba(255,255,255,.9);
}

@media (max-width: 900px) {
  .skill-node {
    width: 96px;
    height: 96px;
  }

  .skill-node--core {
    width: 118px;
    height: 118px;
  }

  .skill-node--domain {
    width: 104px;
    height: 104px;
  }

  .skill-node__label {
    font-size: .72rem;
    max-width: 70px;
  }

  .skilltree-tooltip {
    width: 290px;
  }
}

@media (max-width: 640px) {
  .skilltree-tooltip {
    left: 12px;
    right: 12px;
    width: auto;
  }
}

#skilltree-viewport {
  touch-action: none;
  overscroll-behavior: contain;
}

#skilltree-board,
#skilltree-viewport,
#skilltree-canvas {
  user-select: none;
  -webkit-user-select: none;
}