/*---------------------------------------TOC---------------------------------------------------------------------------------*/
/*---------------------------------------base elements---------------------------------------------------------------------------------*/
:root{
    color-scheme: dark;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background:rgb(0, 0, 48);
    color:rgb(247, 247, 247);
}

*{box-sizing:border-box;}
[hidden]{display:none;}
body{
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(circle at top, rgb(0, 0, 0) 0%, rgb(163, 0, 0) 700%);


}
/*---------------------------------------sections---------------------------------------------------------------------------------*/
.shell{
    width:min(900px, 100%);
    margin: 0 auto;
    padding: 1rem;
}
.game-header{
    text-align: center;
    margin-bottom: 2rem;
}
.eyebrow,.scene-tag{
    color:white;
    font-size: 0.875rem;
    font-weight: bold;
    letter-spacing: .16em;
    text-align: center;
}
/*---------------------------------------status panel---------------------------*/
.status-panel{
    display: grid;
    grid-template-columns:1.2fr 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}
.stat,.story-card{
    background: rgba(68, 88, 72, 0.753);
    padding: 17px 19px;
    border-radius: 16px;
}
.stat{
    min-height:104px;
    padding: 17px;

}
.stat-label{
    display:block;
    color:orange;
    font-size:.8rem;
    margin-bottom: 0.5rem;
}
.stat strong{
    font-size:1rem;
    overflow-wrap:anywhere;
}
/*---------------------------------------health panel---------------------------------------------------------------------------------*/
.health-track{
    height:9px;
    background: rgb(0, 0, 0,0.4);
    border-radius: 20px;
    margin-top: 12px;
    overflow: hidden;
    position: relative;
}
.health-fill{
    height: 100%;
    width: 100%;
    display: block;
    background: rgba(71, 189, 91, 1);
   transition: width 0.3s ease,background 0.25s ease;

}
/*---------------------------------------story card panel---------------------------------------------------------------------------------*/
.story-card{
    padding:clamp(24px,5vw,40px);
    min-height:350px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.story-card h2{
    font-size:clamp(1.5rem, 4vw, 2rem);margin:8px 0 18px;
}
/*---------------------------------------scene/choices panel---------------------------------------------------------------------------------*/
.scene-description{
    margin-bottom: 1rem;
}
.choices{
    display: grid;
    gap: 12px;
    margin-top: 28px;
}
.choice-button{
    text-align: left;
    font:inherit;
    padding:17px 20px;
    color:white;
    background:purple;
    border:1px solid white;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease;
}
.choice-button:hover{
    background: white;
    color: purple;
}
.choice-button:focus-visible,.restart-button:focus-visible{
    outline: 2px solid white;
    outline-offset: 2px;
}
.message{
    padding: 14px 17px;
    border-left: 4px solid purple;
    border-radius: 8px;
    background: yellow;
    color: black;
    line-height: 1.5;
}
/*---------------------------------------2d footer---------------------------------------------------------------------------------*/
.game-footer{
    text-align: center;
    margin-top: 20px;
}
.restart-button{
    font:inherit;
    font-weight: 700;
    color: white;
    border:0;border-radius: 12px;
    padding: 10px 20px;
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease;
}
.restart-button:hover{
    background: white;
    color: purple;
}
.game-footer-p{
    color:white;
}
/*---------------------------------------Typography---------------------------------------------------------------------------------*/
h1{
    margin: 10px 0;
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.12;

}
.subtitle{
    max-width: 620px;
    margin: 12px auto 0;
    color:white;
    line-height:1.65;

}

/*---------------------------------------responsive---------------------------------------------------------------------------------*/
@media (max-width:650px){
    .game-shell{padding-top: 20px;}
    .status-panel{grid-template-columns: 1fr 1fr;}
    .stat:first-child{grid-column:1/-1;}
    .story-card{min-height:0;}


}
@media (prefers-reduced-motion: reduce){
    *,*::before,
    *::after{
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
