body {
    margin: 0;
    padding: 0;
    font-family: 'Malgun Gothic', 'Apple SD Gothic Neo', sans-serif;
    background-color: #ffe0b2;
    /* 연한 주황 배경 */
    color: #333;
    overflow: hidden;
    user-select: none;
}

#game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.bg-pattern {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 300px;
    font-weight: bold;
    color: rgba(255, 152, 0, 0.05);
    white-space: nowrap;
    z-index: -1;
    pointer-events: none;
}

#title-text {
    margin-top: 20px;
    font-size: 36px;
    color: #e65100;
    text-shadow: 2px 2px 0px #fff;
    z-index: 10;
}

/* Palette Area */
#palette-area {
    display: flex;
    gap: 20px;
    margin-top: 10px;
    padding: 15px 30px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    border: 3px solid #ffcc80;
    z-index: 10;
}

.hidden {
    display: none !important;
}

.ingredient {
    width: 80px;
    height: 80px;
    border-radius: 15px;
    cursor: grab;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2), inset -5px -5px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
    user-select: none;
}

.ingredient:hover {
    transform: scale(1.1);
}

.ingredient:active {
    cursor: grabbing;
    transform: scale(0.9);
}

/* specific ingredients */
.noodle {
    background: #ffe082;
    overflow: hidden;
}

.noodle-texture {
    width: 200%;
    height: 200%;
    background-image: repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(0, 0, 0, 0.1) 10px, rgba(0, 0, 0, 0.1) 20px);
}

.soup {
    background: #d32f2f;
}

.kirby-egg {
    background: #f8bbd0;
    border-radius: 50px 50px 40px 40px;
}

.green-onion {
    background: #66bb6a;
    border-radius: 50%;
    text-align: center;
    font-size: 14px;
    line-height: 1.2;
}

/* Kirby Egg face */
.kirby-egg {
    position: relative;
    color: transparent;
    text-shadow: none;
}

.ke-eye {
    position: absolute;
    top: 30px;
    width: 6px;
    height: 18px;
    background: #000;
    border-radius: 50%;
}

.ke-eye.left {
    left: 22px;
}

.ke-eye.right {
    right: 22px;
}

.ke-blush {
    position: absolute;
    top: 40px;
    width: 12px;
    height: 6px;
    background: #f50057;
    border-radius: 50%;
    opacity: 0.7;
}

.ke-blush.left {
    left: 10px;
}

.ke-blush.right {
    right: 10px;
}


/* Pot Area - Ramen Pot (Yang-eun냄비 스타일) */
#pot-area {
    position: relative;
    margin-top: 40px;
    width: 600px;
    height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#pot-back {
    position: absolute;
    width: 500px;
    height: 250px;
    background: #e6c229;
    /* Yellowish gold for aluminum pot */
    border-radius: 50%;
    top: 20px;
    box-shadow: inset 0 20px 30px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    /* to contain water */
}

#water {
    position: absolute;
    width: 100%;
    height: 100%;
    background: #81d4fa;
    /* clear water initially */
    border-radius: 50%;
    top: 250px;
    /* Hidden at first */
    opacity: 0.8;
    transition: top 2s ease-out, background-color 2s;
}

#water.filled {
    top: 50px;
    /* Water rises */
}

#water.spicy {
    background: #e64a19;
    /* Red broth */
    opacity: 0.95;
}

/* Bubbles inside water */
#water .bubble {
    position: absolute;
    bottom: -20px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    animation: boilUp 1s infinite ease-in;
}

@keyframes boilUp {
    0% {
        transform: translateY(0) scale(0.5);
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    100% {
        transform: translateY(-200px) scale(1.5);
        opacity: 0;
    }
}

#pot-contents {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    border-radius: 50%;
}

.dropped-item {
    position: absolute;
}

#pot-front {
    position: absolute;
    width: 500px;
    height: 125px;
    background: #ffd54f;
    /* Lighter yellow gold */
    border-radius: 0 0 250px 250px;
    bottom: 25px;
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.3), inset 0 -10px 20px rgba(255, 255, 255, 0.3);
    z-index: 10;
    pointer-events: none;
}

/* Pot Handles */
#pot-front::before,
#pot-front::after {
    content: '';
    position: absolute;
    top: 10px;
    width: 40px;
    height: 40px;
    border: 10px solid #fbc02d;
    border-radius: 50%;
    z-index: -1;
}

#pot-front::before {
    left: -30px;
}

#pot-front::after {
    right: -30px;
}


/* Controls Area */
#controls-area {
    position: absolute;
    bottom: 20px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    z-index: 20;
}

.btn {
    padding: 10px 20px;
    font-size: 18px;
    font-weight: bold;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.1s;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
    color: white;
}

.btn:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.btn:active {
    transform: scale(0.95);
}

.btn-action {
    padding: 15px 40px;
    font-size: 24px;
    background: #fb8c00;
    border-radius: 20px;
}

#timer-display {
    font-size: 30px;
    font-weight: bold;
    color: #e65100;
    background: rgba(255, 255, 255, 0.8);
    padding: 10px 20px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Confetti */
#confetti-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 40;
}

.confetti {
    position: absolute;
    width: 15px;
    height: 15px;
    animation: fall 3s linear forwards;
}

@keyframes fall {
    0% {
        transform: translateY(-50px) rotate(0);
        opacity: 1;
    }

    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}