*{
    box-sizing:border-box;
}

html,body{
    margin:0;
    padding:0;
    background:#030003;
    color:#ff63b5;
    font-family:"Courier New", monospace;
    height:100%;
    overflow:hidden;
}

body{
    position:relative;
}

/* CRT OVERLAY */

#crt{
    position:fixed;
    inset:0;
    pointer-events:none;
    z-index:999;

    background:
    repeating-linear-gradient(
        to bottom,
        rgba(255,255,255,.02),
        rgba(255,255,255,.02) 1px,
        transparent 2px,
        transparent 4px
    );

    opacity:.25;
}

#crt::after{
    content:"";
    position:absolute;
    inset:0;

    background:
    radial-gradient(
        ellipse at center,
        transparent 55%,
        rgba(0,0,0,.55) 100%
    );
}

/* MAIN GAME */

#game{
    max-width:1000px;
    margin:auto;
    padding:24px;
    min-height:100vh;
}

#header{
    border-bottom:1px solid #ff63b5;
    padding-bottom:15px;
    margin-bottom:15px;
}

h1{
    margin:0;
    font-size:4rem;
    text-shadow:
        0 0 10px #ff63b5,
        0 0 25px #ff63b5;
}

.sub{
    color:#ddd;
    letter-spacing:3px;
    margin-top:5px;
}

/* OUTPUT */

#output{
    overflow-y:auto;
    white-space:pre-wrap;
    line-height:1.55;

    border:1px solid rgba(255,99,181,.25);

    padding:20px;

    background:
    linear-gradient(
        rgba(255,99,181,.03),
        rgba(0,0,0,.45)
    );

    box-shadow:
        inset 0 0 40px rgba(255,99,181,.06);
}

#output::-webkit-scrollbar{
    width:8px;
}

#output::-webkit-scrollbar-thumb{
    background:#ff63b5;
}

/* INPUT */

#inputRow{
    display:flex;
    align-items:center;
    gap:10px;
    margin-top:15px;
}

#inputRow span{
    color:white;
}

#command{
    flex:1;

    background:transparent;
    border:none;
    border-bottom:1px solid #ff63b5;

    color:#ff63b5;

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

    padding:8px 0;
}

#command:focus{
    outline:none;
}

#mainArea{
    display:grid;
    grid-template-columns:1fr 260px;
    gap:15px;
}

#sidebar{
    display:flex;
    flex-direction:column;
    gap:15px;
    overflow:auto;
}

#output{
    max-height:65vh;
    overflow-y:auto;
}

.panel{
    border:1px solid rgba(255,99,181,.35);
    padding:14px;
    background:rgba(255,99,181,.035);
    box-shadow:inset 0 0 25px rgba(255,99,181,.05);
}

.panel h2{
    margin:0 0 10px 0;
    font-size:14px;
    color:white;
    letter-spacing:2px;
}

#actionsList,
#inventoryList{
    font-size:14px;
    line-height:1.55;
}

@media(max-width:800px){
    #mainArea{
        grid-template-columns:1fr 210px;
    }
}

/* SPECIAL TEXT */

.glitch{
    color:white;
    text-shadow:
        -2px 0 cyan,
         2px 0 magenta;
}

.system{
    color:#fff;
}

.warning{
    color:#ff9fd4;
}

.link{
    color:#ff63b5;
    text-decoration:underline;
    cursor:pointer;
}

/* MOBILE */

@media(max-width:700px){

    h1{
        font-size:2.7rem;
    }

    #game{
        padding:14px;
    }

    #output{
        padding:14px;
        font-size:14px;
    }
}

/* SUBTLE FLICKER */

@keyframes flicker{

    0%{opacity:.96;}
    10%{opacity:1;}
    20%{opacity:.95;}
    30%{opacity:1;}
    40%{opacity:.98;}
    50%{opacity:1;}
    60%{opacity:.97;}
    70%{opacity:1;}
    80%{opacity:.95;}
    90%{opacity:1;}
    100%{opacity:.97;}

}

#game{
    animation:flicker 6s infinite;
}
