/* Styling for Page 32 Game */

/* Compact layout for Page 32 text */
#page_32 h3 {
    margin-bottom: 5px;
    margin-top: 5px;
    padding-bottom: 0px;
    font-size: 14px;
}

#page_32 p {
    margin-top: 2px;
    margin-bottom: 2px;
    padding-top: 0px;
    padding-bottom: 0px;
    line-height: 1.2;
}

#page_32 .reading-box {
    margin-bottom: 2px;
    padding: 2px;
}

/* Game Styles */
#page_32 .game-container {
    display: flex;
    flex-direction: column; /* Stack board and button vertically */
    align-items: center; 
    margin-top: 5px; 
    gap: 5px;
    width: 100%;
}

#page_32 .game-board {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 15px; 
    width: 100%;
    padding: 10px;
    background: rgba(255, 255, 255, 0.5); /* Subtle background */
    border-radius: 12px;
    border: 1px dashed #ccc;
}

#page_32 .ingredients-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    justify-content: center;
}

#page_32 .ingredient {
    width: 60px; 
    height: 62px;
    background: white;
    border: 2px solid #ddd;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: grab;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s, border-color 0.2s;
}

#page_32 .ingredient:active {
    cursor: grabbing;
}

#page_32 .ingredient img {
    width: 50px; 
    height: 50px;
    object-fit: contain;
    pointer-events: none;
}

#page_32 .ingredient span {
    font-size: 8px; 
    margin-top: 2px;
}

#page_32 .bowl-area {
    width: 100px;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    position: relative;
}

#page_32 .bowl {
    width: 90px;
    height: 45px;
    background: #FFD700; 
    border-radius: 0 0 45px 45px;
    border: 3px solid #f6b93b; /* Slightly darker gold */
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* Contents inside the bowl */
#page_32 .bowl-contents {
    position: absolute;
    bottom: 5px;
    width: 120px;
    display: flex;
    flex-direction: column-reverse; /* Stack from bottom */
    align-items: center;
    z-index: 11;
}

#page_32 .bowl-item {
    width: 80%;
    height: 12px;
    margin-bottom: -3px;
    background: #ccc;
    border-radius: 5px;
    opacity: 0;
    transition: opacity 0.5s;
}

#page_32 .bowl-item.visible {
    opacity: 1;
}

/* Specific styles for added items */
#page_32 .bowl-item[data-type="noodles"] { background: #f4d03f; height: 15px; }
#page_32 .bowl-item[data-type="chicken"] { background: #e67e22; height: 12px; width: 60%; }
#page_32 .bowl-item[data-type="spices"] { background: #27ae60; height: 4px; width: 40%; }
#page_32 .bowl-item[data-type="soup"] { 
    background: rgba(211, 84, 0, 0.6); 
    width: 100%; 
    height: 45px; 
    position: absolute; 
    bottom: 0; 
    z-index: 12;
    border-radius: 0 0 60px 60px;
}

#page_32 .btn-reset-p32 {
    padding: 6px 15px;
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: background 0.3s;
}

#page_32 .btn-reset-p32:hover {
    background-color: #c0392b;
}

#page_32 .feedback {
    min-height: 18px;
    font-weight: bold;
    font-size: 12px;
    color: #e74c3c;
    text-align: center;
}

#page_32 .modal-success {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    text-align: center;
    display: none;
    z-index: 100;
}

#page_32 .modal-success.show {
    display: block;
}
