/* ============================================
   BRICK CLICKER — Upgrades Tray
   ============================================ */

#upgrades {
    width: 40vw;
    height: 22vh;
    display: flex;
    flex-flow: row wrap;
    padding: 10px 12px;
    margin-top: 70vh;           /* anchors to bottom of main area */
    justify-content: flex-start;
    align-content: flex-start;
    gap: 6px;
    overflow-y: scroll;
    position: relative;
    bottom: 0;

    /* Warm semi-transparent tray */
    background: linear-gradient(
        180deg,
        rgba(15, 7, 2, 0.80) 0%,
        rgba(25, 12, 4, 0.92) 100%
    );
    border-top: 2px solid rgba(200, 130, 50, 0.4);
    transition: height 0.4s ease, margin-top 0.4s ease;
    transition-delay: 80ms;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.5);
}

/* Expand on hover */
#upgrades:hover {
    height: 55vh;
    margin-top: 37vh;
}

/* Tab hint at top of tray */
#upgrades::before {
    content: '▲  Upgrades  ▲';
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    text-align: center;
    color: rgba(232, 164, 40, 0.55);
    font-size: 1vh;
    font-weight: 700;
    letter-spacing: 0.15em;
    pointer-events: none;
    display: block;
    flex: 0 0 100%;
    margin-bottom: 4px;
    font-family: 'Nunito', Arial, sans-serif;
}

/* Individual upgrade icons */
#upgrades > div {
    transition: transform 0.3s ease, filter 0.3s ease;
    border-radius: 8px;
    position: relative;
    border: 2px solid rgba(200, 130, 50, 0.2);
}

#upgrades > div:hover {
    transform: scale(1.14);
    filter: brightness(1.15) drop-shadow(0 4px 12px rgba(230, 160, 40, 0.5));
    border-color: rgba(255, 210, 80, 0.6);
    z-index: 5;
}

/* Scrollbar */
#upgrades::-webkit-scrollbar {
    width: 8px;
}

#upgrades::-webkit-scrollbar-track {
    background: rgba(20, 8, 3, 0.6);
    border-radius: 4px;
}

#upgrades::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #c0522a, #8b3a1f);
    border-radius: 4px;
    border: 2px solid #e8a428;
}