/***** RESET *****/

h1, h2, h3, p, ul, ol {
    margin: 0;
    padding: 0;
}

ul, ol {
    list-style-type: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/***** START PAGE TYPOGRAPHY *****/

h1 {
    font-family: "Press Start 2P";
    font-weight: 400;  
    -webkit-text-stroke-width: 12px;
    -webkit-text-stroke-color: #D3212A;
    paint-order: stroke fill;
    color: white;
    font-size: 200px;
    text-transform: uppercase;
    line-height: normal;
}

#start {
    font-family: "Press Start 2P";
    font-weight: 400;  
    text-transform: uppercase;
    color: white;
    font-size: 22px;
    border: none;
    /* border: solid 2.5px; */
}

#start-message {
    color: white;
    -webkit-text-stroke-width: 7px;
    -webkit-text-stroke-color: #417A48;
    font-family: "Press Start 2P";
    font-size: 20px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    paint-order: stroke fill;
}

/***** INDEX TYPOGRAPHY *****/

body {
    font-family: "Press Start 2P";
    font-weight: 400;
    color: white;
}

.name h2 {
    font-size: 0.75em;
    -webkit-text-stroke-width: 7px;
    -webkit-text-stroke-color: #D3212A;
    paint-order: stroke fill;
}

.health {
    font-size: 0.75em;
}

#attack {
    font-size: 22px;
    text-transform: uppercase;
}

#quit {
    font-size: 0.9em;
    text-transform: uppercase;
}

#messages p {
    font-size: 0.85em;
    color: black;
}

.health {
    color: white;
    -webkit-text-stroke-width: 7px;
    -webkit-text-stroke-color: black;
    paint-order: stroke fill;
}

/***** START PAGE ELEMENTS *****/

#home {
    position: relative;
    display: block;
    margin: auto;
}

#background {
    position: relative;
    display: block;
    margin: auto;
    width: 75%;
    object-fit: cover;
    overflow: hidden;
}

#title-name {
    position: absolute;
    /* display: block;
    margin: 0 auto; */
    top: 36%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50%;
    animation: opacity 4s;
    animation-iteration-count: infinite;
}

#start-message {
    position: absolute;
    top: 628px;
    left: 355px;
    /* transform: translate(-50%, -50%); */
    overflow: hidden;
    width: fit-content;
    margin: 0 auto;
    white-space: nowrap;
    animation: typing 4s steps(20);
}

#start {
    position: absolute;
    top: 92%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 205px;
    height: 60px;
    border-radius: 14.385px;
    background: #D3212A;
    display: block;
    margin: auto;
}

#start a {
    padding-left: 8px;
    text-decoration: none;
    color: inherit;
}

#volume {
    background-color: #D3212A;
    border-radius: 9px;
    border: none;
    position: absolute;
    top: 50px;
    left: 1150px;
}

#volume img {
    padding: 7px;
}

@keyframes opacity {
    0% { opacity: 1; }
    12.5% { opacity: .95; }
    25% { opacity: .9; }
    37.5% { opacity: .85; }
    50% { opacity: .8; }
    62.5% { opacity: .85; }
    75% { opacity: .9; }
    87.5% { opacity: .95; }
    100% { opacity: 1; }
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

/***** INDEX ELEMENTS *****/

body {
    background: white;
}

#keva {
    position: absolute;
    top: 225px;
    left: 480px;
}

#whispurr {
    position: absolute;
    top: 120px;
    left: 780px;
}

#attack {
    color: white;
    background-color: #D3212A;
    border: none;
    width: 205px;
    height: 60px;
    /* padding: 12px; */
    border-radius: 9px;
}

#quit {
    color: white;
    background-color: #D3212A;
    border: none;
    width: 90px;
    height: 40px;
    /* padding: 12px; */
    border-radius: 9px;
    position: absolute;
    top: 50px;
    left: 238px;
    padding-top: 2px;
}

#messages {
    width: 440px;
    height: 130px;
    border-radius: 20px;
    border: 5px solid #D3212A;
    background: white;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 0 25px;
}

#messages p {
    flex: 0 0;
}

#start:hover, #quit:hover, #volume:hover, #attack:hover {
    border: 4px solid white;
}

#start, #quit, #volume, #attack {
    border: 4px solid #811016;
}

.name-display {
    width: 240px;
    height: 90px;
    position: absolute;
    background-color: white;
    border-radius: 14px;
    padding: 0 20px;
    align-content: center;
}

#k-name {
    top: 440px;
    left: 250px;
}

#w-name {
    top: 350px;
    left: 900px;
}

.name {
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: center;
    padding-bottom: 10px;
}

.health {
    display: flex;
    align-items: center;
    gap: 15px;
}

#healthbar0, #healthbar1 {
    width: 75%;
    height: 20px;
    border: 3px solid #2C8035;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

#healthbar0 div, #healthbar1 div{
    width: 100%;
    height: 20px;
    position: absolute;
    top: 0;
    left: 0;
    background: #56C763;
    border-radius: 9px;
}

#action {
    display: grid;
    grid-template-areas: 
        "A B";
        gap: 20px;
    align-items: center;
    width: 50%;
    position: absolute;
    top: 604px;
    left: 350px;
}

#messages {
    grid-area: A;
}

#attack {
    grid-area: B;
}