@import url('https://fonts.googleapis.com/css2?family=Bangers&display=swap');

@font-face {
    font-family: 'Pokemon Classic';
    src: url('/media/games/workout-warrior/fonts/Pokemon Classic.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

#full-area {
    width: 100%;
    height: 100vh;
    position: absolute;
    overflow: hidden;
    user-select: none;
    font-family: 'Pokemon Classic', 'Bangers', cursive;
    background: #87CEEB;
}

#game-area {
    position: absolute;
    width: 1280px;
    height: 720px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    overflow: hidden;
}

#content {
    height: 100%;
    width: 100%;
    overflow: hidden;
    position: absolute;
    z-index: 9999;
}

#home-section {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-image: url('/media/games/workout-warrior/images/ww-backer.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.logo-img {
    max-width: 80%;
    max-height: 60%;
    animation: logoAnim 1.5s infinite;
}

.skip-intro-btn {
    margin-top: 20px;
    padding: 15px 50px;
    font-size: 24px;
    font-family: 'Pokemon Classic', 'Bangers', cursive;
    background: linear-gradient(180deg, #FF9800 0%, #F57C00 100%);
    color: #fff;
    border: 4px solid #E65100;
    border-radius: 15px;
    cursor: pointer;
    text-shadow: 2px 2px 0px #BF360C;
    box-shadow: 0 6px 0 rgba(0,0,0,0.3), 0 10px 20px rgba(0,0,0,0.3);
    transition: transform 0.2s, box-shadow 0.2s;
    letter-spacing: 2px;
}

.skip-intro-btn:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 8px 0 rgba(0,0,0,0.3), 0 15px 25px rgba(0,0,0,0.4);
}

.skip-intro-btn:active {
    transform: scale(1.05) translateY(2px);
    box-shadow: 0 3px 0 rgba(0,0,0,0.3), 0 5px 10px rgba(0,0,0,0.3);
}

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

#intro-section {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 99999;
    left: 0;
    top: 0;
}

.intro-scene {
    position: relative;
    width: 100%;
    height: 100%;
}

.intro-sergeant-container {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    width: 65%;
    height: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.intro-sergeant-img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.intro-speech-bubble-container {
    position: absolute;
    top: 3%;
    left: 2%;
    z-index: 20;
    width: 44%;
}

.intro-speech-text {
    position: absolute;
    top: 5%;
    left: 14%;
    right: 0;
    bottom: 20%;
    font-size: 35px;
    color: #000;
    text-align: center;
    width: 440px;
    height: 210px;
    line-height: 1.3;
    font-family: 'Pokemon Classic', 'Bangers', cursive;
    letter-spacing: 1px;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: introTextPulse 1s ease-in-out infinite;
}

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

#play-section,
#question-section {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 9999;
    left: 0;
    top: 0;
}

.game-scene {
    position: relative;
    width: 100%;
    height: 100%;
}

.background-img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.sergeant-container {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 15;
    width: 65%;
    height: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.sergeant-img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.speech-bubble-container {
    position: absolute;
    top: 3%;
    left: 2%;
    z-index: 20;
    width: 44%;
}

.speech-bubble-img {
    width: 100%;
    height: auto;
}

.speech-bubble-question {
    width: 100%;
}

.speech-text {
    position: absolute;
    top: 32%;
    left: 53%;
    transform: translate(-50%, -50%);
    font-size: 40px;
    color: #000;
    text-align: center;
    width: 90%;
    line-height: 1.3;
    font-family: 'Pokemon Classic', 'Bangers', cursive;
    letter-spacing: 1px;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.question-text {
    font-size: 28px;
    transform: translate(-50%, -50%);
    top: 40%;
    width: 90%;
    height: 260px;
    margin-left: -15px;
    line-height: 1.3;
}

.flipboard-container {
    position: absolute;
    right: 5%;
    bottom: 4%;
    z-index: 10;
    width: 50%;
    height: 90%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.flipboard-img {
    position: absolute;
    height: 100%;
    width: auto;
    z-index: 1;
}

.animal-display {
    position: relative;
    z-index: 2;
    width: 40%;
    height: 35%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 5%;
    overflow: hidden;
}

.animal-display img {
    max-width: 85%;
    max-height: 85%;
    object-fit: contain;
    animation: animalBounce 0.5s ease-in-out infinite;
}

@keyframes animalBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

#result-section {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 99999;
    left: 0;
    top: 0;
}

.result-scene {
    position: relative;
    width: 100%;
    height: 100%;
}

.result-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.result-exercise-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

.result-animal-display {
    width: 150px;
    height: 150px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
    margin-top: -45px;
}

.result-animal-display img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    animation: animalBounce 0.5s ease-in-out infinite;
}

.result-exercise-text {
    font-family: 'Pokemon Classic', 'Bangers', cursive;
    font-size: 42px;
    color: #fff;
    text-shadow: 4px 4px 0px #000, -2px -2px 0px #000, 2px -2px 0px #000, -2px 2px 0px #000;
    letter-spacing: 2px;
    text-align: center;
}

.result-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 60px;
    border-radius: 30px;
    border: 5px solid #ffd700;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.result-box.correct {
    background: linear-gradient(180deg, #00b894 0%, #00a876 100%);
}

.result-box.incorrect {
    background: linear-gradient(180deg, #e74c3c 0%, #c0392b 100%);
}

.result-emoji {
    font-size: 80px;
    margin-bottom: 10px;
}

.result-text {
    font-size: 48px;
    color: #fff;
    text-shadow: 4px 4px 0px #000;
    text-align: center;
    letter-spacing: 3px;
}

.result-subtext {
    font-size: 28px;
    color: #ffd700;
    text-shadow: 2px 2px 0px #000;
    margin-top: 10px;
}

#end-section {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 999999;
    left: 0;
    top: 0;
    display: none;
}

.end-scene {
    position: relative;
    width: 100%;
    height: 100%;
}

.end-content-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.end-logo-img {
    max-width: 50%;
    max-height: 30%;
    margin-bottom: 20px;
    animation: logoAnim 1.5s infinite;
}

.game-over-title {
    font-family: 'Pokemon Classic', 'Bangers', cursive;
    font-size: 56px;
    color: #fff;
    text-shadow: 4px 4px 0px #000, -2px -2px 0px #000, 2px -2px 0px #000, -2px 2px 0px #000;
    letter-spacing: 5px;
    margin-bottom: 30px;
}

.end-buttons {
    display: flex;
    gap: 40px;
    margin-top: 20px;
}

.pokemon-btn {
    padding: 20px 40px;
    font-size: 24px;
    font-family: 'Pokemon Classic', 'Bangers', cursive;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    letter-spacing: 2px;
    text-transform: uppercase;
    box-shadow: 0 6px 0 rgba(0,0,0,0.3), 0 10px 20px rgba(0,0,0,0.3);
}

.pokemon-btn:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 8px 0 rgba(0,0,0,0.3), 0 15px 25px rgba(0,0,0,0.4);
}

.pokemon-btn:active {
    transform: scale(1.05) translateY(2px);
    box-shadow: 0 3px 0 rgba(0,0,0,0.3), 0 5px 10px rgba(0,0,0,0.3);
}

.pokemon-btn.play-again-btn {
    background: linear-gradient(180deg, #4CAF50 0%, #388E3C 100%);
    color: #fff;
    border: 4px solid #2E7D32;
    text-shadow: 2px 2px 0px #1B5E20;
}

.pokemon-btn.switch-game-btn {
    background: linear-gradient(180deg, #FF9800 0%, #F57C00 100%);
    color: #fff;
    border: 4px solid #E65100;
    text-shadow: 2px 2px 0px #BF360C;
}

.dev-input-container {
    position: absolute;
    bottom: 15%;
    left: 5%;
    z-index: 100;
    display: flex;
    gap: 10px;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 15px;
    border-radius: 10px;
}

.dev-answer-input {
    padding: 10px 15px;
    font-size: 18px;
    border: 2px solid #ffd700;
    border-radius: 8px;
    background: #fff;
    width: 150px;
    font-family: 'Pokemon Classic', sans-serif;
    text-transform: uppercase;
}

.dev-submit-btn {
    padding: 10px 20px;
    font-size: 18px;
    background: #00b894;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Pokemon Classic', sans-serif;
    font-weight: bold;
}

.dev-submit-btn:hover {
    background: #00a876;
}

#full-area button,
#full-area input {
    outline: none;
}

#full-area button:focus,
#full-area input:focus {
    outline: none;
}

@media (max-width: 600px) {
    #game-area {
        width: 100%;
        height: 100%;
        transform: translate(-50%, -50%) scale(1);
    }

    .logo-img {
        max-width: 100%;
        max-height: 80%;
        animation: logoAnim 1.5s infinite;
    }
        
    .intro-sergeant-container {
        width: 100%;
    }

    .intro-sergeant-img {
        max-width: 130%;
    }

    .intro-speech-bubble-container {
        position: absolute;
        top: 8%;
        left: 2%;
        z-index: 20;
        width: 90%;
    }

    .intro-speech-text {
        position: absolute;
        top: 5%;
        left: 14%;
        right: 0;
        bottom: 20%;
        font-size: 45px;
        color: #000;
        text-align: center;
        width: 560px;
        height: 270px;
        line-height: 1.3;
        font-family: 'Pokemon Classic', 'Bangers', cursive;
        letter-spacing: 1px;
        padding: 15px;
        display: flex;
        align-items: center;
        justify-content: center;
        animation: introTextPulse 1s ease-in-out infinite;
    }

    .sergeant-img {
        max-width: 130%;
    }
    
    .speech-bubble-container {
        width: 65%;
        top: 2%;
        left: 1%;
    }

    .speech-bubble-question {
        width: 100%;
    }

    .speech-text {
        top: 0%;
        left: 50%;
        width: 100%;
        border-radius: 58px;
    }

    #speech-text{
        top: 36%;
        font-size: 35px;
        margin-left: 14px;
        width: 430px;
        height: 200px;
    }

    #speech-container .speech-bubble-img{

    }

    .question-text {
        font-size: 28px;
        transform: translate(-50%, -50%);
        top: 40%;
        height: 275px;
        line-height: 1.3;
    }

    #question-text{
        width: 90%;
        margin-left: 0px;
    }
        
    .flipboard-container {
        width: 55%;
        height: 70%;
        right: 2%;
        bottom: 8%;
    }
    
    .animal-display {
        width: 60%;
        height: 37%;
    }
    
    .sergeant-container {
        width: 80%;
    }
    
    .result-animal-display {
        width: 200px;
        height: 200px;
        margin-top: -120px;
    }
    
    .result-exercise-text {
        font-size: 54px;
    }
    
    .result-box {
        padding: 20px 30px;
        border-radius: 20px;
        width: 650px;
        margin-top: 50px;
    }
    
    .result-emoji {
        font-size: 80px;
    }
    
    .result-text {
        font-size: 48px;
    }
    
    .result-subtext {
        font-size: 36px;
        text-align: center;
    }
    
    .end-logo-img {
        max-width: 90%;
        max-height: 35%;
        margin-top: -150px;
    }
    
    .game-over-title {
        font-size: 55px;
        letter-spacing: 2px;
        margin-bottom: 20px;
    }
    
    .end-buttons {
        flex-direction: column;
        gap: 30px;
        margin-top: 65px;
    }
    
    .pokemon-btn {
        padding: 15px 30px;
        font-size: 40px;
        border-radius: 10px;
    }
    
    .skip-intro-btn {
        padding: 10px 30px;
        font-size: 40px;
        margin-top: 15px;
    }
    
    .dev-input-container {
        bottom: 5%;
        left: 2%;
        padding: 8px 10px;
    }
    
    .dev-answer-input {
        padding: 8px 10px;
        font-size: 14px;
        width: 100px;
    }
    
    .dev-submit-btn {
        padding: 8px 15px;
        font-size: 14px;
    }
}
