*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family: "Courier New", monospace;
}
body{
    background:rgb(214, 175, 143);
    color:#3d2a00;
}

#game3{
    width:100%;
    max-width:1200px;
    margin:0px auto;
    padding:18px;
}

.game-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    flex-wrap:wrap;
    gap:15px;
    margin-bottom:20px;
}

.game-header h2{
    font-size:40px;
    color:#8c5a00;
}

.stats{
    display:flex;
    gap:20px;
}

.stats span{
    background:white;
    padding:12px 20px;
    border-radius:12px;
    font-weight:bold;
    box-shadow:0 5px 15px rgba(0,0,0,.08);
}

.back-btn{
    background:#9b6300;
    color:white;
    border:none;
    padding:14px 24px;
    border-radius:12px;
    cursor:pointer;
    font-size:16px;
    transition:.3s;
}

.back-btn:hover{
    background:#7f5000;
}

/* ========================= */

.duel-field{
    background:white;
    border-radius:25px;
    padding:35px;
    position:relative;
    box-shadow:0 15px 40px rgba(0,0,0,.08);
}

.duel-round{
    text-align:center;
    font-size:32px;
    color:#9b6300;
    font-weight:bold;
    margin-bottom:40px;
}

.arena{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:40px;
}

.fighter{
    width:250px;
    text-align:center;
}

.avatar{

    width:130px;
    height:130px;
    margin:auto;

    display:flex;
    justify-content:center;
    align-items:center;

    font-size:70px;

    background:#faf6f3;
    border:5px solid #9b6300;
    border-radius:50%;

    transition:.3s;
}
.player .avatar{
    box-shadow:0 0 20px rgba(0,180,255,.25);
}

.enemy .avatar{
    box-shadow:0 0 20px rgba(255,0,0,.20);
}

.name-tag{

    margin-top:18px;
    font-size:22px;
    font-weight:bold;

}

.hp-bar{

    margin-top:20px;
    width:100%;
    height:18px;
    background:#ddd;
    border-radius:50px;
    overflow:hidden;

}

.hp-fill{

    width:100%;
    height:100%;
    background:#4CAF50;
    transition:.4s;

}

.enemy-fill{

    background:#ff5252;

}

.vs{

    font-size:60px;
    color:#9b6300;
    font-weight:bold;

}

.word-prompt{

    margin:55px auto 30px;

    width:fit-content;

    min-width:260px;

    padding:18px 35px;

    border-radius:15px;

    background:#9b6300;

    color:white;

    text-align:center;

    font-size:38px;

    font-weight:bold;

    letter-spacing:4px;

    box-shadow:0 8px 20px rgba(155,99,0,.35);

    animation:glow 1s infinite alternate;

}

@keyframes glow{

from{

transform:scale(1);

box-shadow:0 5px 15px rgba(155,99,0,.25);

}

to{

transform:scale(1.05);

box-shadow:0 10px 30px rgba(155,99,0,.45);

}

}

.timer-bar{

    width:100%;
    height:18px;

    background:#ddd;

    border-radius:50px;

    overflow:hidden;

}

.timer-fill{

    width:100%;

    height:100%;

    background:linear-gradient(to right,#2ecc71,#f1c40f,#e74c3c);

    transition:width .1s linear;

}

.game-overlay{

    position:absolute;

    inset:0;

    background:rgba(245,239,235,.95);

    border-radius:25px;

    display:flex;

    flex-direction:column;

    justify-content:center;

    align-items:center;

    text-align:center;

    padding:40px;

}

.game-overlay h3{

    font-size:45px;

    color:#9b6300;

    margin-bottom:20px;

}

.game-overlay p{

    max-width:650px;

    font-size:18px;

    line-height:1.8;

    color:#555;

    margin-bottom:35px;

}

.play-btn{
    background:#9b6300;
    color:white;
    border:none;
    padding:16px 45px;
    border-radius:12px;
    font-size:20px;
    cursor:pointer;
    transition:.3s;

}
.play-btn:hover{

    background:#7f5000;

    transform:translateY(-3px);

}

.duel-toast{
    position:absolute;
    top:20px;
    left:50%;
    transform:translateX(-50%);
    background:#9b6300;
    color:white;
    padding:12px 28px;
    border-radius:10px;
    font-weight:bold;
    opacity:0;
    transition:.3s;

}


.attack{
    animation:attack .35s;

}

@keyframes attack{

0%{

transform:translateX(0);

}

50%{

transform:translateX(35px);

}

100%{

transform:translateX(0);

}

}

.hit{

    animation:hit .35s;

}

@keyframes hit{

0%{

transform:translateX(0);

}

20%{

transform:translateX(-12px);

}

40%{

transform:translateX(12px);

}

60%{

transform:translateX(-12px);

}

100%{

transform:translateX(0);

}

}

/* ========================= */

@media(max-width:900px){

.arena{

flex-direction:column;

}

.vs{

font-size:45px;

}

.word-prompt{

font-size:28px;

}

.game-header{

justify-content:center;

text-align:center;

}

}

@media(max-width:600px){

.game-header h2{

font-size:30px;

}

.word-prompt{

font-size:22px;

padding:15px 20px;

}

.avatar{

width:100px;

height:100px;

font-size:55px;

}

.fighter{

width:100%;

}

.stats{

flex-direction:column;

}

}