.upgrade-summary-panel {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.85);
    border: 2px solid #555;
    border-radius: 10px;
    padding: 15px;
    width: 280px;
    max-height: calc(100vh - 200px); /* Avoid top and bottom UI */
    overflow-y: auto;
    pointer-events: auto;
    z-index: 19; /* Below pause menu */
}

.upgrade-summary-panel.hidden {
    display: none;
}

/** @tweakable Styles for the character info section in the upgrade panel */
.summary-character-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #555;
    transition: all 0.3s ease;
}

/** @tweakable Styles for the character info section when player is a Max Warrior */
.summary-character-info.max-warrior {
    background: radial-gradient(circle, rgba(255,221,68,0.2) 0%, rgba(255,221,68,0) 70%);
}

.summary-character-info.max-warrior #summaryCharacterPortrait {
    border-color: #ffdd44;
    box-shadow: 0 0 15px rgba(255, 221, 68, 0.5);
}

.summary-character-info.max-warrior #summaryCharacterName {
    color: #ffdd44;
    text-shadow: 0 0 5px rgba(255, 221, 68, 0.7);
}

/** @tweakable Style for the 'Max Warrior' text that appears in the upgrade panel. */
.max-warrior-text {
    font-size: 14px;
    color: #ffdd44;
    font-weight: bold;
    text-transform: uppercase;
    margin-top: 4px;
    letter-spacing: 1px;
}

/** @tweakable Size of the character portrait in the upgrade panel */
#summaryCharacterPortrait {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid #888;
    margin-bottom: 8px;
}

/** @tweakable Style for the character name text in the upgrade panel */
#summaryCharacterName {
    font-size: 16px;
    color: #fff;
    font-weight: bold;
}

.upgrade-summary-panel h3 {
    text-align: center;
    color: #ffdd44;
    margin-bottom: 15px;
    font-size: 18px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

#upgradeSummaryList {
    list-style: none;
}

#upgradeSummaryList li {
    background: rgba(255, 255, 255, 0.05);
    margin-bottom: 8px;
    padding: 8px;
    border-radius: 5px;
    border-left: 3px solid #ffdd44;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/** @tweakable Style for upgrade list items that have not been acquired yet. */
#upgradeSummaryList li.unowned {
    opacity: 0.6;
    border-left-color: #666;
}

#upgradeSummaryList li .upgrade-name {
    font-weight: bold;
    color: #fff;
    font-size: 14px;
    margin-bottom: 0; /* Remove margin-bottom as flex handles spacing */
}

#upgradeSummaryList li .upgrade-details {
    color: #ccc;
    font-size: 12px;
}

/** @tweakable Style for the level text in the upgrade panel list. */
#upgradeSummaryList li .upgrade-level {
    font-size: 14px;
    color: #ccc;
    font-weight: bold;
    white-space: nowrap; /* Prevent "Lv X / Y" from wrapping */
    margin-left: 10px;
}