:root {
    --primary: #FF6B6B;
    --secondary: #4ECDC4;
    --accent: #FFE66D;
    --text: #2D3436;
    --bg: #F7F9FB;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Comic Sans MS', 'Chalkboard SE', 'Arial Rounded MT Bold', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    display: flex;
    justify-content: center;
    align-items: center;
}

#global-logo {
    position: absolute;
    top: 20px;
    right: 20px;
    height: 50px;
    z-index: 100;
    pointer-events: none;
}

#game-container {
    width: 100%;
    height: 100%;
    position: relative;
    background-image: url('assets/images/start-bg.webp');
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    padding: 20px;
    transition: background-image 0.5s ease-in-out;
}

.screen {
    flex: 1;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    text-align: center;
    animation: fadeIn 0.5s ease-out;
    padding: 40px 0;
}

.screen.active {
    display: flex;
}

.guest-container {
    max-height: fit-content;
    flex: 1;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    width: 100%;
    position: relative;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes pop {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    70% {
        transform: scale(1.1);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes zoomIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-15px);
    }
    100% {
        transform: translateY(0px);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.title-image {
    position: absolute;
    top: 40px;
    left: 250px;
    width: 15%;
    object-fit: contain;
    height: auto;
    animation: pulse 2s infinite ease-in-out;
    z-index: 10;
}

.start-guest-image {
    width: 25%;
    object-fit: contain;
    height: auto;
    animation: float 4s infinite ease-in-out;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.3));
    margin-top: 40px;
}

.game-guest-image {
    width: auto;
    max-width: 85%;
    height: auto;
    animation: float 4s infinite ease-in-out;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.3));
    transition: all 0.5s ease-in-out;
}

.game-guest-image.standing {
    max-height: 65vh;
    margin-bottom: 100px;
}

.game-guest-image.sitting {
    max-height: 40vh;
    margin-bottom: 100px;
}

.game-guest-image.drinking {
    max-height: 40vh;
    margin-bottom: 100px;
    transform: scale(1.05);
}

.game-guest-image.eating {
    max-height: 40vh;
    margin-bottom: 100px;
    transform: scale(1.2);
}

.speech-bubble {
    position: absolute;
    top: 40%;
    left: 65%;
    background: white;
    border: 4px solid var(--primary);
    border-radius: 30px;
    padding: 15px 25px;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    z-index: 100;
    opacity: 0;
    transform: translateY(-50%) scale(0.8);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
    max-width: 250px;
    text-align: center;
}

/* The tail border */
.speech-bubble::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 15px 20px 15px 0;
    border-style: solid;
    border-color: transparent var(--primary) transparent transparent;
}

/* The tail fill */
.speech-bubble::after {
    content: '';
    position: absolute;
    left: -14px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 12px 16px 12px 0;
    border-style: solid;
    border-color: transparent white transparent transparent;
}

.speech-bubble.active {
    opacity: 1;
    transform: translateY(-50%) scale(1);
    animation: pop 0.4s ease-out;
}

.guest-image {
    width: auto;
    max-width: 80%;
    height: auto;
    animation: float 4s infinite ease-in-out;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.3));
}

.end-guest-image {
    width: auto;
    max-width: 60%;
    max-height: 40vh;
    margin-top: 100px;
    margin-bottom: -10px;
    height: auto;
    animation: float 4s infinite ease-in-out;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.3));
}

.feedback-text {
    font-size: 2.2rem;
    min-height: 4rem;
    margin: 10px 0 0 0;
    padding: 5px 30px;
    width: 95%;
    max-width: 800px;
    color: white;
    font-weight: 900;
    text-shadow:
        3px 3px 0px var(--primary),
        -1px -1px 0px var(--primary),
        1px -1px 0px var(--primary),
        -1px 1px 0px var(--primary),
        1px 1px 0px var(--primary);
    letter-spacing: 1px;
    animation: pop 0.4s ease-out;
}

#game-screen {
    position: relative;
    padding: 40px 0;
}

.button-grid {
    display: flex;
    flex-direction: column;
    gap: 40px;
    justify-content: center;
    width: auto;
    padding: 0;
    flex-wrap: nowrap;
    z-index: 10;
    position: absolute;
    left: 150px;
    top: 50%;
    transform: translateY(-50%);
}

.game-main-content {
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

.action-btn {
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: pulse 3s infinite ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-btn img {
    width: 200px;
    height: auto;
    filter: drop-shadow(0 8px 15px rgba(0, 0, 0, 0.2));
    transition: all 0.2s;
}

.action-btn:hover {
    transform: scale(1.1) rotate(2deg);
}

.action-btn:active {
    transform: scale(0.9) rotate(-2deg);
}

.action-btn.disabled {
    pointer-events: none;
    filter: grayscale(1) opacity(0.5);
    animation: none;
    cursor: not-allowed;
}

.action-btn.shake {
    animation: shake 0.4s;
}

@keyframes shake {
    0%,
    100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-10px);
    }
    75% {
        transform: translateX(10px);
    }
}

.start-btn-img {
    width: 160px;
    max-height: 12vh;
    object-fit: contain;
    cursor: pointer;
    transition: transform 0.2s;
    animation: pulse 1.5s infinite ease-in-out;
    position: relative;
    z-index: 100;
}

.start-btn-img:hover {
    transform: scale(1.1);
}

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

.success-img-asset {
    max-width: 95%;
    max-height: 22vh;
    object-fit: contain;
    animation: greatJobAnim 1.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) infinite alternate;
    margin-bottom: 10px;
    z-index: 20;
}

@keyframes greatJobAnim {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 0 0px var(--secondary));
    }
    100% {
        transform: scale(1.2);
        filter: drop-shadow(0 0 25px var(--secondary));
    }
}

/* Sparkle Animation */
.sparkle {
    position: absolute;
    width: 30px;
    height: 30px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23FFE66D'%3E%3Cpath d='M12 2L14.5 9.5H22L16 14L18.5 21.5L12 17L5.5 21.5L8 14L2 9.5H9.5L12 2Z'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
    pointer-events: none;
    z-index: 1000;
    animation: sparkle-anim 1s ease-out forwards;
}

@keyframes sparkle-anim {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: scale(1.5) rotate(180deg);
        opacity: 0;
    }
}

/* Gift Rain Animation */
.gift {
    position: absolute;
    width: 50px;
    height: 50px;
    background: url('assets/images/gift.webp') no-repeat center;
    background-size: contain;
    pointer-events: none;
    z-index: 1001;
    animation: gift-fall 3s linear forwards;
}

@keyframes gift-fall {
    0% {
        transform: translateY(-100px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(110vh) rotate(360deg);
        opacity: 0.8;
    }
}:root {
    --primary: #FF6B6B;
    --secondary: #4ECDC4;
    --accent: #FFE66D;
    --text: #2D3436;
    --bg: #F7F9FB;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Comic Sans MS', 'Chalkboard SE', 'Arial Rounded MT Bold', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    display: flex;
    justify-content: center;
    align-items: center;
}

#global-logo {
    position: absolute;
    top: 20px;
    right: 20px;
    height: 50px;
    z-index: 100;
    pointer-events: none;
}

#game-container {
    width: 100%;
    height: 100%;
    position: relative;
    background-image: url('assets/images/start-bg.webp');
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    padding: 20px;
    transition: background-image 0.5s ease-in-out;
}

.screen {
    flex: 1;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    text-align: center;
    animation: fadeIn 0.5s ease-out;
    padding: 40px 0;
}

.screen.active {
    display: flex;
}

.guest-container {
    max-height: fit-content;
    flex: 1;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    width: 100%;
    position: relative;

}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes pop {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    70% {
        transform: scale(1.1);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes zoomIn {
    from {
        transform: scale(0);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }

    100% {
        transform: translateY(0px);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.title-image {
    position: absolute;
    top: 40px;
    left: 250px;
    width: 15%;
    object-fit: contain;
    height: auto;
    animation: pulse 2s infinite ease-in-out;
    z-index: 10;
}

.start-guest-image {
    width: 25%;

    object-fit: contain;
    height: auto;
    animation: float 4s infinite ease-in-out;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.3));
    margin-top: 40px;
}

.game-guest-image {
    width: auto;
    max-width: 85%;
    height: auto;
    animation: float 4s infinite ease-in-out;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.3));
    transition: all 0.5s ease-in-out;
}

.game-guest-image.standing {
    max-height: 65vh;
    margin-bottom: 100px;
}

.game-guest-image.sitting {
    max-height: 40vh;
    margin-bottom: 100px;
}

.game-guest-image.drinking {
    max-height: 40vh;
    margin-bottom: 100px;
    transform: scale(1.05);
}

.game-guest-image.eating {
    max-height: 40vh;
    margin-bottom: 100px;
    transform: scale(1.2);
}

.speech-bubble {
    position: absolute;
    top: 40%;
    left: 65%;
    background: white;
    border: 4px solid var(--primary);
    border-radius: 30px;
    padding: 15px 25px;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    z-index: 100;
    opacity: 0;
    transform: translateY(-50%) scale(0.8);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
    max-width: 250px;
    text-align: center;
}

/* The tail border */
.speech-bubble::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 15px 20px 15px 0;
    border-style: solid;
    border-color: transparent var(--primary) transparent transparent;
}

/* The tail fill */
.speech-bubble::after {
    content: '';
    position: absolute;
    left: -14px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 12px 16px 12px 0;
    border-style: solid;
    border-color: transparent white transparent transparent;
}

.speech-bubble.active {
    opacity: 1;
    transform: translateY(-50%) scale(1);
    animation: pop 0.4s ease-out;
}

.guest-image {
    width: auto;
    max-width: 80%;
    height: auto;
    animation: float 4s infinite ease-in-out;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.3));
}

.end-guest-image {
    width: auto;
    max-width: 60%;
    max-height: 40vh;
    margin-top: 100px;
    margin-bottom: -10px;
    height: auto;
    animation: float 4s infinite ease-in-out;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.3));
}

.feedback-text {
    font-size: 2.2rem;
    min-height: 4rem;
    margin: 10px 0 0 0;
    padding: 5px 30px;
    width: 95%;
    max-width: 800px;
    color: white;
    font-weight: 900;
    text-shadow:
        3px 3px 0px var(--primary),
        -1px -1px 0px var(--primary),
        1px -1px 0px var(--primary),
        -1px 1px 0px var(--primary),
        1px 1px 0px var(--primary);
    letter-spacing: 1px;
    animation: pop 0.4s ease-out;
}

#game-screen {
    position: relative;
    padding: 40px 0;
}

.button-grid {
    display: flex;
    flex-direction: column;
    gap: 40px;
    justify-content: center;
    width: auto;
    padding: 0;
    flex-wrap: nowrap;
    z-index: 10;
    position: absolute;
    left: 150px;
    top: 50%;
    transform: translateY(-50%);
}

.game-main-content {
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

.action-btn {
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: pulse 3s infinite ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-btn img {
    width: 200px;
    height: auto;
    filter: drop-shadow(0 8px 15px rgba(0, 0, 0, 0.2));
    transition: all 0.2s;
}

.action-btn:hover {
    transform: scale(1.1) rotate(2deg);
}

.action-btn:active {
    transform: scale(0.9) rotate(-2deg);
}

.action-btn.disabled {
    pointer-events: none;
    filter: grayscale(1) opacity(0.5);
    animation: none;
    cursor: not-allowed;
}

.action-btn.shake {
    animation: shake 0.4s;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-10px);
    }

    75% {
        transform: translateX(10px);
    }
}

.start-btn-img {
    width: 160px;
    max-height: 12vh;
    object-fit: contain;
    cursor: pointer;
    transition: transform 0.2s;
    animation: pulse 1.5s infinite ease-in-out;
}

.start-btn-img:hover {
    transform: scale(1.1);
}

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

.success-img-asset {
    max-width: 95%;
    max-height: 22vh;
    object-fit: contain;
    animation: greatJobAnim 1.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) infinite alternate;
    margin-bottom: 10px;
    z-index: 20;
}

@keyframes greatJobAnim {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 0 0px var(--secondary));
    }

    100% {
        transform: scale(1.2);
        filter: drop-shadow(0 0 25px var(--secondary));
    }
}

/* Sparkle Animation */
.sparkle {
    position: absolute;
    width: 30px;
    height: 30px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23FFE66D'%3E%3Cpath d='M12 2L14.5 9.5H22L16 14L18.5 21.5L12 17L5.5 21.5L8 14L2 9.5H9.5L12 2Z'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
    pointer-events: none;
    z-index: 1000;
    animation: sparkle-anim 1s ease-out forwards;
}

@keyframes sparkle-anim {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: scale(1.5) rotate(180deg);
        opacity: 0;
    }
}

/* Gift Rain Animation */
.gift {
    position: absolute;
    width: 50px;
    height: 50px;
    background: url('assets/images/gift.webp') no-repeat center;
    background-size: contain;
    pointer-events: none;
    z-index: 1001;
    animation: gift-fall 3s linear forwards;
}

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

