body {
    font-family: Arial, sans-serif;
    background: #111;
    color: #eee;
    padding: 20px;
}

h1 {
    margin: 0 0 10px;
}

#points {
    margin: 12px 0 16px;
    font-weight: bold;
}

/* ---------------- TOPBAR ---------------- */

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 10px 0 14px;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

select {
    background: #222;
    color: #eee;
    border: 1px solid #555;
    border-radius: 8px;
    padding: 6px 10px;
}

/* ---------------- PRESET INFO ---------------- */

.preset-info {
    font-size: 12px;
    color: rgba(255,255,255,0.65);
    margin-top: 4px;
}

/* ---------------- LAYOUT ---------------- */

.layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 18px;
    align-items: start;
}

.main {
    min-width: 0;
}

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

.tooltip-panel {
    position: sticky;
    top: 16px;
    background: #161616;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    padding: 14px;
}

.tp-title {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 6px;
}

.tp-meta {
    color: rgba(255,255,255,0.75);
    font-size: 13px;
    margin-bottom: 10px;
}

.tp-desc {
    color: rgba(255,255,255,0.9);
    line-height: 1.35;
    margin-bottom: 12px;
}

.tp-effects {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.tp-effect {
    background: #1f1f1f;
    border: 1px solid #2f2f2f;
    border-radius: 10px;
    padding: 10px;
}

.tp-effect .label {
    color: rgba(255,255,255,0.75);
    font-size: 12px;
    margin-bottom: 4px;
}

.tp-effect .value {
    font-size: 13px;
}

.tp-hint {
    color: rgba(255,255,255,0.55);
    font-size: 12px;
}

.tp-lock {
    margin-top: 10px;
    padding: 10px;
    border-radius: 10px;
    background: rgba(255, 193, 7, 0.08);
    border: 1px solid rgba(255, 193, 7, 0.22);
    color: rgba(255, 255, 255, 0.85);
    font-size: 12px;
    line-height: 1.35;
}

/* ---------------- TALENT TREE ---------------- */

#tree {
    margin-bottom: 32px;
}

.tree-wrap {
    position: relative;
    display: inline-block;
}

.tree-lines {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.tree {
    position: relative;
    z-index: 1;
    display: grid;
    grid-auto-rows: min-content;
    row-gap: 18px;
}

.tier-block {
    display: grid;
    row-gap: 10px;
}

.tier-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #141414;
    border: 1px solid #242424;
}

.tier-title {
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.2px;
}

.tier-sub {
    color: rgba(255,255,255,0.65);
    font-size: 12px;
}

.tier-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 180px;
    justify-content: flex-end;
}

.tier-bar {
    width: 140px;
    height: 8px;
    border-radius: 999px;
    background: #1f1f1f;
    border: 1px solid #2b2b2b;
    overflow: hidden;
}

.tier-bar > div {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, rgba(76,175,80,0.55), rgba(76,175,80,0.95));
}

.tier-status {
    font-size: 12px;
    color: rgba(255,255,255,0.75);
    white-space: nowrap;
}

.tier {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    column-gap: 28px;
    justify-items: center;
    align-items: start;
}

/* ---------------- NODES ---------------- */

.node {
    background: linear-gradient(180deg, #232323, #1c1c1c);
    border: 1px solid #3a3a3a;
    padding: 10px 10px 9px;
    cursor: pointer;
    text-align: left;
    min-width: 170px;
    border-radius: 10px;
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.08s ease, box-shadow 0.15s ease;
    user-select: none;
}

.node:hover:not(.locked) {
    background: linear-gradient(180deg, #2a2a2a, #202020);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.35);
}

.node.active {
    border-color: rgba(76, 175, 80, 0.9);
    box-shadow: 0 0 0 1px rgba(76, 175, 80, 0.25);
}

.node.maxed {
    border-color: rgba(76, 175, 80, 1);
}

.node.locked {
    opacity: 0.42;
    cursor: not-allowed;
}

/* ---------------- PRESET PREVIEW ---------------- */

.node.preview {
    outline: 2px dashed rgba(255, 193, 7, 0.55);
    outline-offset: 3px;
}

.node.preview.locked {
    outline-color: rgba(255, 193, 7, 0.25);
}

.node-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.node-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #141414;
    border: 1px solid #2b2b2b;
    display: grid;
    place-items: center;
    font-size: 16px;
}

.node-name {
    font-weight: 700;
    letter-spacing: 0.2px;
}

.node-sub {
    display: flex;
    justify-content: space-between;
    color: rgba(255,255,255,0.7);
    font-size: 12px;
}

/* ---------------- ACTIONS ---------------- */

.actions {
    margin-top: 18px;
    display: flex;
    gap: 12px;
}

/* ---------------- BUTTONS ---------------- */

button {
    padding: 8px 16px;
    background: #222;
    color: #eee;
    border: 1px solid #555;
    cursor: pointer;
    border-radius: 10px;
    transition: background 0.15s ease, border-color 0.15s ease;
}

button:hover {
    background: #2a2a2a;
    border-color: #777;
}

.planner-intro {
    max-width: 720px;
    margin-bottom: 24px;
    color: rgba(255,255,255,0.75);
    font-size: 15px;
}

/* ---------------- RESPONSIVE LAYOUT ---------------- */

@media (max-width: 1100px) {
    .layout {
        grid-template-columns: 1fr;
    }

    .tooltip-panel {
        position: static;
        width: 100%;
        margin-top: 20px;
    }
}
