body {
    font-family: 'Inter', system-ui, sans-serif;
    background: #0a0f1c;
    color: #e2e8f0;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Starfield */
.starfield {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: transparent;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
}

.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    animation: twinkle 4s infinite alternate;
}

@keyframes twinkle {
    0% { opacity: 0.25; }
    100% { opacity: 0.85; }
}

/* Search box */
#searchInput {
    padding-right: 42px !important;
}

.search-clear {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    cursor: pointer;
    font-size: 1.45rem;
    line-height: 1;
    padding: 4px;
    z-index: 10;
}
.search-clear:hover { color: #10b981; }

/* Row delete button - hover only */
tr:hover .delete-btn {
    opacity: 1;
}
.delete-btn {
    opacity: 0;
    transition: opacity 0.2s;
    margin-right: 8px;
}

/* Legend active state */
.legend-item-active {
    background-color: rgba(16, 185, 129, 0.15) !important;
    border: 1px solid #10b981 !important;
    border-radius: 12px;
}

/* Highlight classes for rows */
.highlight-tradeskill { background-color: #052e16 !important; }
.highlight-quest { background-color: #431407 !important; }
.highlight-equip { background-color: #1e3a8a !important; }
.highlight-bazaar { background-color: #4c1d95 !important; }

/* Legend swatches - THIS WAS MISSING */
.legend-swatch {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 1px solid #334155;
    flex-shrink: 0;
}

/* Bottom right buttons */
.bottom-actions {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 50;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* About modal */
#aboutModal .modal-bg {
    background-image: url('../images/Chromatic_adventures_cover.jpg');
    background-size: cover;
    background-position: center;
}

/* Location hover popup */
.location-cell {
    position: relative;
    cursor: help;
}

.location-cell:hover::after {
    content: attr(data-full);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #1f2937;
    color: #e2e8f0;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.4;
    white-space: pre-line;
    z-index: 50;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.3);
    border: 1px solid #334155;
    min-width: 260px;
    pointer-events: none;
}

/* Character active highlight - mirrors legend */
.character-item-active {
    background-color: rgba(16, 185, 129, 0.15) !important;
    border: 1px solid #10b981 !important;
}