*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: #0a0800;
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 1.5rem;
}

#root {
    width: 100%;
    max-width: 860px;
}

#screen {
    border: 1.5px solid rgba(255,179,71, 0.25);
    border-radius: 6px;
    padding: 1.25rem;
    min-height: 90vh;
    background: #0d0900;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/*CRT scanlines*/

#screen::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.07) 2px,
        rgba(0,0,0, 0.07) 4px
    );
    pointer-events: none;
    border-radius: 6px;
    z-index: 10;
}

#output {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 0.5rem;
    font-family: 'Courier New', Courier, monospace;
}

.line {
    font-family:'Courier New', Courier, monospace;
    font-size: 14px;
    line-height: 1.65;
    white-space: pre-wrap;
    word-break: break-all;
    color: #ffb347;
}

.line.bright { color: #ffd280;}
.line.dim { color: rgba(255, 179, 71, 0.55); }
.line.muted { color: rgba(255, 179, 71, 0.35); }
.line.err { color: #ff6b35;}
.line.white { color: #fff8e8;}

.line.blink {
    animation: blink 1s step-start infinite;
}

@keyframes blink {
    0%, 100% { opacity:1;}
    50% { opacity:0;}
}

#input-row {
    display: flex;
    align-items: center;
    border-top: 0.5px solid rgba(255,179,71,0.2);
    padding-top: 0.75rem;
    margin-top: 0.5rem;
}

#prompt {
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    color: #ffb280;
    white-space: nowrap;
}

#cmd {
    background: transparent;
    border: none;
    outline: none;
    color: #ffb347;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    flex: 1;
    caret-color: #ffb347;
    padding-left: 6px;
}

#player {
    display: none;
    margin: 0.75rem 0;
    border: 1px solid rgba(255, 179, 71, 0.3);
    border-radius: 4px;
    padding: 0.6rem 0.85rem;
    background: #110d00;
    font-family: 'Courier New', courier, monospace;
}

#player.active {
    display: block;
}

#player.active {
    display: block;
}

#player-title {
    font-size: 12px;
    color: #ffd280;
    margin-bottom: 8px;
}

#player-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

#play-btn {
    background: rgb(255, 179, 71, 0.12);
    border: 1px solid rgba(255, 179, 71, 0.4);
    color: #ffb347;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    padding: 3px 12px;
    cursor: pointer;
    border-radius: 3px;
    transition: background 0.15s;
}

#play-btn:hover {
    background: rgba(255, 179, 71, 0.25);
}

#player-bar {
    flex: 1;
    height: 3px;
    background: rgba(255, 179, 71, 0.15);
    border-radius: 2px;
    overflow: hidden; 
}

#player-progress {
    height: 100%;
    width: 0%;
    background: #ffb347;
    border-radius: 2px;
    transition: width 0.5s linear;
}

#player-time {
    font-size: 11px;
    color: #ffd280;
    min-width: 32px;
    text-align: right;
}

.term-link {
    color: #ffd280;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.term-link {
    color: #ffd280;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.term-link:hover {
    color: #fff;
}

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

#output::-webkit-scrollbar-track {
    background: transparent;
}

#output::-webkit-scrollbar-thumb {
    background: rgba(255,179,71,0.2);
    border-radius: 2px;
}