/* =====================================================================
   MODES CSS - ESCENARIO PRINCIPAL Y LOS 8 MINIJUEGOS
   ===================================================================== */

/* Escenario Principal */
#game-stage {
    position: relative;
    z-index: 15;
    flex: 1;
    width: 100%;
    max-width: 860px;
    margin: 0 auto;
    padding: 6px 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Cuadrícula de 6 tarjetas (Animalitos y Huevos) */
.grid-6 {
    width: 100%;
    height: 100%;
    max-height: 520px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 12px;
    place-items: center;
}

@media (min-width: 600px) {
    .grid-6 {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(2, 1fr);
        gap: 18px;
    }
}

.animal-card, .egg-card {
    width: 100%;
    height: 100%;
    max-width: 178px;
    max-height: 155px;
    border-radius: 34px;
    padding: 10px;
}

.talk-mini-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #FFFFFF;
    border: 3px solid #FDE047;
    box-shadow: 0 4px 8px rgba(0,0,0,0.16);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

/* Bocadillo de ondas sonoras que sale encima del animalito al hablar */
.animal-sound-waves {
    position: absolute;
    top: -12px;
    left: -8px;
    background: #FFFFFF;
    border: 3px solid #EC4899;
    border-radius: 999px;
    padding: 4px 8px;
    display: none;
    align-items: center;
    gap: 3px;
    box-shadow: 0 6px 14px rgba(0,0,0,0.18);
    pointer-events: none;
    z-index: 30;
}
.card-speaking .animal-sound-waves {
    display: flex;
}

/* Modo Monstruito Tragón */
#mode-feed {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
}

#monster-stage {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

#monster-wrapper {
    position: relative;
    width: 185px;
    height: 185px;
    cursor: pointer;
}

#monster-craving-bubble {
    position: absolute;
    right: -46px;
    top: -6px;
    width: 82px;
    height: 82px;
    background: #FFFFFF;
    border-radius: 50%;
    border: 4px solid #FDE047;
    box-shadow: 0 10px 20px rgba(0,0,0,0.16);
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: floatSlow 2.8s infinite ease-in-out;
}

#feed-fruits-tray {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    place-items: center;
    padding: 6px 4px;
}

.fruit-btn {
    width: 78px;
    height: 78px;
    border-radius: 26px;
    padding: 8px;
}

/* Modo Dedito Pintor */
#mode-paint {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
}

.paint-canvas-area {
    position: relative;
    flex: 1;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#paint-stage-card {
    width: 245px;
    height: 245px;
    background: #FFFFFF;
    border-radius: 38px;
    border: 7px solid #FFFFFF;
    box-shadow: 0 16px 32px rgba(0,0,0,0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
}

#btn-next-drawing {
    position: absolute;
    right: 8px;
    bottom: 10px;
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: #0EA5E9;
    color: #FFFFFF;
}

#paint-pots-bar {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 6px 2px;
}

.paint-pot-btn {
    width: 52px;
    height: 52px;
    border-radius: 18px;
}
.paint-pot-active {
    transform: translateY(-6px) scale(1.14) !important;
    box-shadow: 0 10px 0 rgba(0,0,0,0.22), 0 0 0 5px #FEF08A !important;
}

/* Modo Pompas */
#mode-bubbles {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 28px;
}
#bubbles-stage {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Modo Xilófono */
#mode-xylophone {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 4px;
}
#xylophone-board {
    width: 100%;
    height: 100%;
    max-height: 380px;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    align-items: center;
    background: rgba(120, 53, 15, 0.22);
    padding: 12px 10px;
    border-radius: 34px;
    border: 4px solid rgba(255, 255, 255, 0.65);
}
.xylo-key {
    width: 100%;
    border-radius: 22px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 12px 4px;
}
.xylo-screw {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
}

/* Modo 6: ¿Dónde está? */
#mode-find {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    padding: 6px 0;
}

#find-prompt-card {
    position: relative;
    width: 124px;
    height: 124px;
    background: #FFFFFF;
    border-radius: 34px;
    border: 6px solid #FACC15;
    box-shadow: 0 12px 24px rgba(0,0,0,0.16);
    padding: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: floatSlow 2.8s infinite ease-in-out;
}

.find-question-icon {
    width: 100%;
    height: 100%;
    border-radius: 24px;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.find-question-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #FEF08A;
    border: 3px solid #FFFFFF;
    box-shadow: 0 4px 10px rgba(0,0,0,0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

#find-choices-grid {
    width: 100%;
    max-width: 620px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    place-items: center;
    padding: 8px 4px;
}

.find-option-card {
    width: 100%;
    max-width: 175px;
    height: 145px;
    border-radius: 34px;
    padding: 12px;
}

/* Modo 7: 1, 2, 3 ¡A Contar! */
#mode-count {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
}

.count-top-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    width: 100%;
}

#count-number-badge {
    width: 86px;
    height: 86px;
    border-radius: 28px;
    border: 5px solid #FFFFFF;
    box-shadow: 0 8px 0 rgba(0,0,0,0.2), 0 12px 24px rgba(0,0,0,0.16);
    color: #FFFFFF;
    font-size: 50px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-shadow: 0 3px 6px rgba(0,0,0,0.22);
}

#count-items-grid {
    flex: 1;
    width: 100%;
    max-width: 640px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 8px;
}

.count-animal-btn {
    width: 112px;
    height: 112px;
    border-radius: 30px;
    padding: 10px;
    position: relative;
}

@media (min-width: 600px) {
    .count-animal-btn {
        width: 138px;
        height: 138px;
    }
}

.count-step-tag {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #FEF08A;
    border: 4px solid #FFFFFF;
    color: #0F172A;
    font-size: 22px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 12px rgba(0,0,0,0.22);
    z-index: 20;
}

.counted-done {
    box-shadow: 0 0 0 5px #FEF08A, 0 8px 18px rgba(0,0,0,0.2) !important;
}

#btn-next-count {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: #0EA5E9;
    color: #FFFFFF;
}
