/* ============================================================
   SHADOWSKINGS — QUESTS PANEL (SAFE VERSION)
   ============================================================ */

#quests-panel {
    position: relative;
    padding: 20px;
    background: rgba(10, 10, 14, 0.95);
    border: 2px solid rgba(120, 0, 255, 0.6);
    border-radius: 8px;
    color: #e6dfff;

    width: 100%;
    height: 100%;

    display: flex;
    flex-direction: column;
    box-sizing: border-box;

    box-shadow: 0 0 25px rgba(120, 0, 255, 0.7);
    backdrop-filter: blur(6px);

    /* IMPORTANT: Do NOT clip combat panel */
    overflow: hidden;
}

#quests-panel h2 {
    text-align: center;
    color: #d4c7a1;
    margin-bottom: 15px;
}

/* CLOSE BUTTON */
.quests-close-btn {
    position: absolute;
    top: 14px;
    right: 18px;
    width: 42px;
    height: 42px;

    border: 1px solid rgba(120, 0, 255, 0.6);
    border-radius: 50%;
    background: rgba(20, 10, 30, 0.7);
    color: #e6dfff;
    font-size: 22px;
    cursor: pointer;

    box-shadow: 0 0 12px rgba(120, 0, 255, 0.4);
    transition: 0.15s ease;

    z-index: 10;
}

.quests-close-btn:hover {
    background: rgba(120, 0, 255, 0.4);
    border-color: rgba(180, 120, 255, 1);
    box-shadow: 0 0 18px rgba(180, 120, 255, 0.9);
    transform: scale(1.08);
}

/* MAIN LAYOUT */
.arcane-console {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    flex: 1;
    min-height: 0;
}

.arcane-panel {
    flex: 1;
    background: rgba(20, 10, 30, 0.55);
    border: 1px solid rgba(120, 0, 255, 0.4);
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 0 12px rgba(120, 0, 255, 0.3);
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* HERO LIST */
#quests-hero-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    max-height: 70vh;
    padding-right: 6px;
}

.quest-hero-entry {
    padding: 10px 14px;
    background: rgba(40, 20, 60, 0.5);
    border: 1px solid rgba(120, 0, 255, 0.4);
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s;
    color: #d8caff;
    display: flex;
    align-items: center;
}

.quest-hero-entry:hover {
    background: rgba(120, 0, 255, 0.4);
    border-color: rgba(180, 120, 255, 0.8);
}

.quest-hero-entry.selected {
    background: rgba(120, 0, 255, 0.8);
    border-color: rgba(180, 120, 255, 1);
    color: #fff;
    box-shadow: 0 0 12px rgba(180, 120, 255, 0.9);
}

.quest-hero-flex {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quest-hero-portrait {
    width: 48px;
    height: 48px;
    border-radius: 4px;
    object-fit: cover;
}

.quest-hero-name {
    font-size: 15px;
    font-weight: 500;
}

/* QUEST LIST */
#quests-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    max-height: 70vh;
    padding-right: 8px;

    scrollbar-width: thin;
    scrollbar-color: rgba(120,0,255,0.6) rgba(20,10,30,0.4);
}

#quests-list::-webkit-scrollbar {
    width: 8px;
}

#quests-list::-webkit-scrollbar-thumb {
    background: rgba(120,0,255,0.6);
    border-radius: 4px;
}

#quests-list::-webkit-scrollbar-track {
    background: rgba(20,10,30,0.4);
}

.quest-entry {
    padding: 12px;
    background: rgba(25, 25, 30, 0.85);
    border: 1px solid rgba(120, 0, 255, 0.4);
    border-radius: 6px;
    transition: 0.2s;
    cursor: pointer;
    color: #d8caff;
}

.quest-entry:hover {
    background: rgba(120, 0, 255, 0.4);
    border-color: rgba(180, 120, 255, 0.8);
}

/* STATUS + LOG */
#quest-status {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#quest-timer {
    font-size: 16px;
    color: #ffccff;
}

#quest-log {
    height: 200px;
    overflow-y: auto;
    background: rgba(20, 10, 30, 0.4);
    border: 1px solid rgba(120, 0, 255, 0.3);
    padding: 10px;
    border-radius: 6px;
}

.quest-complete {
    color: #ffccff;
    font-weight: bold;
}

/* MOBILE */
@media (max-width: 768px) {
    #quests-panel {
        padding: 14px;
        border-radius: 6px;
    }

    #quests-panel h2 {
        font-size: 16px;
        margin-bottom: 10px;
    }

    .quests-close-btn {
        top: 10px;
        right: 12px;
        width: 34px;
        height: 34px;
        font-size: 18px;
    }

    .arcane-console {
        flex-direction: column;
        gap: 12px;
        margin-top: 12px;
    }

    .arcane-panel {
        padding: 10px;
    }

    #quests-hero-list,
    #quests-list {
        max-height: 40vh;
    }

    .quest-hero-entry,
    .quest-entry {
        padding: 8px 10px;
        font-size: 12px;
    }

    #quest-log {
        height: 140px;
        font-size: 12px;
    }

    #quest-timer {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    #quests-panel {
        padding: 10px;
    }

    .arcane-console {
        gap: 10px;
    }

    .arcane-panel {
        padding: 8px;
    }

    #quests-hero-list,
    #quests-list {
        max-height: 36vh;
    }

    .quest-hero-entry,
    .quest-entry {
        padding: 7px 9px;
        font-size: 11px;
    }

    #quest-log {
        height: 120px;
        font-size: 11px;
    }

    #quest-timer {
        font-size: 13px;
    }
}
