/* ============================================
   BRICK CLICKER — Buildings Panel
   ============================================ */

#building {
    width: 25%;
    height: 90vh;
    padding: 4px 6px;
    overflow-y: scroll;
    background: linear-gradient(
        180deg,
        rgba(18, 8, 3, 0.88) 0%,
        rgba(25, 12, 4, 0.84) 100%
    );
    border-left: 2px solid rgba(200, 130, 50, 0.3);
    display: flex;
    flex-flow: column nowrap;
    align-items: center;
    position: relative;
}

/* Subtle brick-pattern mask at top */
#building::before {
    content: '';
    position: sticky;
    top: 0;
    height: 8px;
    width: 100%;
    background: linear-gradient(180deg, rgba(15,6,2,0.9) 0%, transparent 100%);
    z-index: 5;
    pointer-events: none;
    display: block;
}

#building::-webkit-scrollbar {
    width: 10px;
}

#building::-webkit-scrollbar-track {
    background: rgba(20, 8, 3, 0.7);
}

#building::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #c0522a, #8b3a1f);
    border-radius: 6px;
    border: 2px solid #e8a428;
}

/* Building cards */
#building > div {
    margin-top: 6px;
    margin-bottom: 2px;
    transition: transform 0.3s ease, filter 0.3s ease, opacity 0.3s ease;
    border-radius: 8px;
    position: relative;
    /* Subtle inner glow on hover handled below */
}

#building > div:hover {
    transform: scale(1.07) translateX(-3px);
    filter: brightness(1.1) drop-shadow(0 4px 14px rgba(200, 110, 40, 0.45));
    cursor: pointer;
}

/* Count badge sitting over the building image */
#building > div > div {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Show count badge text on hover */
#building > div:hover > div {
    font-size: 2.5vw;
    font-weight: 900;
    color: #ffe8c0;
    text-shadow:
        -2px 0 #3a1a06,
        0 2px #3a1a06,
        2px 0 #3a1a06,
        0 -2px #3a1a06,
        0 0 12px rgba(230, 150, 50, 0.6);
}

/* Count element below each building image */
#building > div + div {
    font-family: 'Nunito', Arial, sans-serif;
    font-weight: 900;
    color: #f4e9d8;
    text-shadow: -1px 0 #3a1a06, 0 1px #3a1a06, 1px 0 #3a1a06, 0 -1px #3a1a06;
    text-align: center;
}