/*--------------CSS for Adventure Game written by Kaylynn Lupien------------- */

/*------------------------------------BASE ELEMENTS------------------------------------------------------*/
/*Root is the highest level parent element in the DOM (in this case and typically HTML*/

:root {
    color-scheme: dark;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: rgb(22, 22, 24);
    color: rgb(223, 223, 223);
}

/*Common CSS reset rule, tells the browser to understand everything as this*/
*{box-sizing: border-box;} /*Keeps the element within the same size box without having to worry about msaller incremental changes*/
[hidden] /*Targets any hidden HTML element and forces the browser to hide it visually and from assistance (highlights and stuff)*/
{ display: none !important; } /*This rule overrides any other rule added later*/

body {
    margin: 0;
    min-height: 100vh; /*Viewport Height*/
    min-width: 100vw; /*Viewport Width*/
    background: radial-gradient(circle at top, #1b1b1a 0%, #0b1220 90%);
}

/*----------------------------------------SECTIONS-----------------------------------------------------------------*/

.shell {
    width: min(900px);
     margin: 0 auto;
    padding: 48px 0 28px
}

.game-header {
    text-align: center;
    margin-bottom: 28px;
}

.eyebrow, .scene-tag {
    color: #67e8f9;
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .16em;
}

/*------------------------Status Panel------------------------*/

.status-panel {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.stat, .story-card {
    background: rgb(23, 22, 24);
    border: 1px solid #334155;
    border-radius: 16px;
}

.stat {
    min-height: 104px;
    padding: 17px 19px;
}

.stat-label {
    display: block;
    color: #94a3b8;
    font-size: .85rem;
    margin-bottom: 9px;
}

.stat strong {
    font-size: 1rem;
    overflow-wrap: anywhere;
}

/*------------------------Health Panel------------------------*/

.health-track {
    height: 9px;
    background: #334155;
    border-radius: 20px;
    margin-top: 12px;
    overflow: hidden;
}

.health-fill {
    height: 100%;
    width: 100%;
    background: white;
    transition: width .25s ease, background .25s ease;
}

/*------------------------Story Panel------------------------*/

.story-card {
    padding: clamp(24px, 5vw, 40px);
    min-height: 350px;
    box-shadow: 0 18px 50px #0005;
}

.story-card h2 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin: 8px 0 18px;
}

/*------------------------Scene Choice Panel------------------------*/

.scene-description {
    color: #e2e8f0;
    line-height: 1.8;
    font-size: 1.08rem;
    white-space: pre-line;
}

.choices {
    display: grid;
    gap: 12px;
    margin-top: 28px;
}

.choice-button {
    text-align: left;
    font: inherit;
    font-weight: 650;
    padding: 17px 20px;
    color: #f8fafc;
    background: #1e3a5f;
    border: 1px solid #47729c;
    border-radius: 12px;
    cursor: pointer;
    transition: background .15s, transform .15s;
}

.choice-button:hover {
    background: #285481;
    transform: translateY(-1px);
}

.choice-button:focus-visible, .restart-button:focus-visible {
    outline: 3px solid #67e8f9;
    outline-offset: 3px;
}

.message {
    padding: 14px 17px;
    border-left: 4px solid #fbbf24;
    border-radius: 8px;
    background: #3b2d18;
    color: #fde68a;
    line-height: 1.5;
}

.game-footer {
    text-align: center;
    margin-top: 23px;
}

.restart-button {
    font: inherit;
    font-weight: 700;
    color: #0b1220;
    background: #0b1220;
    border: 0;
    border-radius: 10px;
    padding: 13px 22px;
    cursor: pointer;
}

.restart-button:hover {
    background: #a5f3fc;
}

.game-footer p {
    color: #94a3b8;
    font-size: .8rem;
    margin-top: 18px;
}

img {
    height: 800px;
}

/*---------------------------------------TYPOGRAPHY----------------------------------------------------------------*/

h1 {
    margin: 10px 0;
    font-size: clamp(2remm 5vw, 3.3rem);
    line-height: 1.12;
}

.subtitle {
    max-width: 630px;
    margin: 12px;
    color: #cbd5e1;
    line-height: 1.65;
}

/*--------------------------------------RESPONSIVENESS--------------------------------------------------------------*/

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

@media (prefers-reduced-motion: reduce) {
    *, *::before,
    *::after { transition: none !important; }
}