/* Chest Screen */
#chest-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 25; /* Above upgrade screen */
    color: white;
}

#chest-container {
    background-color: #1a1a1a;
    border: 2px solid #ffd700; /* Gold border */
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    width: 80%;
    max-width: 500px;
    max-height: 92vh; /* ensure it doesn't overflow tall/narrow screens */
    box-sizing: border-box; /* include padding in size */
    overflow-y: auto; /* allow internal scroll when content is large */
    box-shadow: 0 0 30px rgba(255, 223, 0, 0.5);
}

#chest-container h2 {
    margin-top: 0;
    color: #ffd700;
    text-shadow: 0 0 10px #ffd700;
}

#chest-options {
    margin: 20px 0;
}

#chest-options button {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    border: 2px solid #ffd700;
    background-color: #332e00;
    color: #ffd700;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    text-align: center;
}

#chest-options button:hover {
    background-color: #ffd700;
    color: #1a1a1a;
}

#chest-options button img {
    width: 64px;
    height: 64px;
    margin-bottom: 15px;
}

#chest-options button .upgrade-text {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

#chest-options button h3 {
    margin: 0;
    font-size: 1.2em;
}

#chest-options button p {
    margin: 0;
    font-size: 0.9em;
    opacity: 0.8;
}

#chest-upgrade-gear-button {
    width: 70%;
    max-width: 300px;
    padding: 15px;
    margin: 20px auto 0;
    border: 2px solid #aaa;
    background-color: transparent;
    color: #aaa;
    font-size: 18px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
    display: block;
}

#chest-upgrade-gear-button:hover {
    background-color: #aaa;
    color: #1a1a1a;
    border-color: #aaa;
}