/* =========================
   GENERAL
   ========================= */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Courier New", monospace;
    background-color: #323437;
    color: #d1d0c5;
}


/* =========================
   HEADER
   ========================= */

header {
    text-align: center;
    padding: 30px;
}

header h1 {
    margin-bottom: 5px;
}

header p {
    color: #8a8a8a;
}


/* =========================
   MAIN GAME
   ========================= */

main {
    display: flex;
    justify-content: center;
}

#game-container {
    width: 80%;
    max-width: 900px;
}


/* =========================
   GAME INFORMATION
   ========================= */

#game-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
}

#game-info p {
    margin: 0;
}


/* =========================
   PHRASE
   ========================= */

#phrase-container {
    margin-bottom: 25px;
}

#phrase {
    font-size: 28px;
    line-height: 1.5;
}


/* =========================
   TYPING INPUT
   ========================= */

#typing-input {
    width: 100%;
    padding: 15px;

    font-family: "Courier New", monospace;
    font-size: 20px;

    background-color: #2c2e31;
    color: #d1d0c5;

    border: 1px solid #646669;
    border-radius: 5px;

    outline: none;
}


/* =========================
   BUTTONS
   ========================= */

#game-controls {
    margin-top: 25px;
    text-align: center;
}

button {
    padding: 10px 20px;
    margin: 5px;

    font-size: 16px;
    cursor: pointer;
}


/* =========================
   FOOTER
   ========================= */

footer {
    text-align: center;
    margin-top: 50px;
    color: #646669;
}



/* =========================
   GAME SCENE
   ========================= */

#game-scene {
    width: 100%;
    height: 300px;

    display: flex;
    justify-content: space-between;
    align-items: flex-end;

    padding: 30px;
    box-sizing: border-box;

    background-image: url("../assets/images/backgrounds/forest.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    border-radius: 10px;
    margin-bottom: 30px;
}


/* Player */

#player-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
}

#player-character {
    width: 190px;
    height: auto;
    display: block;
}


/* Player health */

#player-health-container {
    width: 150px;
    height: 12px;

    background-color: #323437;
    border: 2px solid #d1d0c5;
    border-radius: 10px;

    overflow: hidden;
    margin-bottom: 8px;
}

#player-health-bar {
    width: 100%;
    height: 100%;

    background-color: #4caf50;

    transition: width 0.3s ease;
}



/* Enemy */

#enemy-character {
    width: 190px;
    height: auto;
    display: block;
}

#enemy-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
}




/* Enemy health */

#enemy-health-container {
    width: 150px;
    height: 12px;

    background-color: #323437;
    border: 2px solid #d1d0c5;
    border-radius: 10px;

    overflow: hidden;
    margin-bottom: 8px;
}

#enemy-health-bar {
    width: 100%;
    height: 100%;

    background-color: #ca4754;

    transition: width 0.3s ease;
}



/* =========================
   TAMA ATTACK ANIMATION
   ========================= */

@keyframes tamaAttack {

    0% {
        transform: translateX(0);
    }

    50% {
        transform: translateX(80px);
    }

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

.tama-attack {
    animation: tamaAttack 0.4s ease;
}