/* --- Interaction Overlay & Dialogue --- */
#interaction-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 20px;
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s;
}

#interaction-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

#npc-portrait-container {
    flex: 0 0 150px;
    height: 200px;
    border: 2px solid var(--phosphor-primary);
    background: #000;
    overflow: hidden;
    margin-right: 20px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.8);
}

#npc-portrait {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#npc-dialogue-box {
    flex: 1;
    background: rgba(0, 0, 0, 0.85);
    border: 1px solid var(--phosphor-secondary);
    padding: 15px;
    border-radius: 5px;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

#npc-name {
    margin: 0 0 5px 0;
    color: var(--phosphor-primary);
    text-transform: uppercase;
    font-size: 1.1em;
    border-bottom: 1px solid #443300;
    padding-bottom: 5px;
}

#npc-text {
    color: #ffd;
    font-style: italic;
    line-height: 1.4;
}

#close-dialogue {
    position: absolute;
    top: 5px;
    right: 10px;
    color: #666;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.2em;
    transition: color 0.2s;
}

#close-dialogue:hover {
    color: #fff;
}

.npc-divider {
    border: 0;
    height: 1px;
    background-image: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(255, 183, 0, 0.75), rgba(0, 0, 0, 0));
    margin: 5px 0;
}

/* --- Social Lists --- */
#player-list,
#friends-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

#player-list li,
#friends-list li {
    padding: 5px 0;
    border-bottom: 1px solid #222;
}

.empty-list {
    color: #666;
    font-style: italic;
}

.npc-entry {
    color: #ffd700;
    font-weight: bold;
    text-shadow: 0 0 3px #aa8800;
}

/* --- Friends Specific --- */
#friends-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 5px;
}

.friend-name {
    font-weight: bold;
}

.friend-offline {
    color: #666;
}

.friend-online {
    color: #00ff00;
    text-shadow: 0 0 3px #005500;
}

.friend-same-area {
    color: #00ffff;
    text-shadow: 0 0 5px #00aaaa;
}

.friend-status {
    font-size: 0.8em;
    font-style: italic;
    color: #888;
}