@import url('https://fonts.googleapis.com/css2?family=VT323&family=Share+Tech+Mono&display=swap');

:root {
    --dos-bg: #000000;
    --dos-blue: #0000aa;
    --dos-cyan: #00aaaa;
    --dos-red: #aa0000;
    --dos-magenta: #aa00aa;
    --dos-yellow: #ffff55;
    --dos-white: #ffffff;
    --dos-grey: #aaaaaa;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
}

body {
    background-color: #0c0d12;
    color: #e0e0e0;
    font-family: 'Share Tech Mono', 'VT323', monospace;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.crt-container {
    background: #181920;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(0, 170, 255, 0.15);
    border: 1px solid #2a2c3a;
    max-width: 900px;
    width: 100%;
}

.crt-screen {
    position: relative;
    background: var(--dos-bg);
    border: 4px solid #333644;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.9);
}

.crt-screen::before {
    content: " ";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
    z-index: 10;
    background-size: 100% 3px, 6px 100%;
    pointer-events: none;
}

.header-bar {
    background: #252836;
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #3a3d52;
}

.dos-title {
    font-weight: bold;
    color: #00d2ff;
    letter-spacing: 1px;
}

.dos-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.badge {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.sound-on {
    background: #1b4332;
    color: #40c057;
    border: 1px solid #2b8a3e;
}

.sound-off {
    background: #49111c;
    color: #f87171;
    border: 1px solid #991b1b;
}

.btn-small {
    background: #34384c;
    color: #ffffff;
    border: 1px solid #4a4f6b;
    padding: 5px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    transition: all 0.15s ease;
}

.btn-small:hover {
    background: #464c67;
    border-color: #00d2ff;
}

.canvas-wrapper {
    display: flex;
    justify-content: center;
    background: #000;
    padding: 10px;
}

canvas {
    width: 100%;
    max-width: 800px;
    height: auto;
    aspect-ratio: 80 / 25;
    image-rendering: pixelated;
    background-color: #000000;
}

.virtual-keyboard {
    background: #181924;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-top: 1px solid #2a2c3d;
}

.kb-row {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.kb-key {
    background: #282c3f;
    color: #ffffff;
    border: 1px solid #3f4561;
    padding: 10px 18px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 0 3px 0 #181a26;
    transition: transform 0.05s ease, background 0.15s ease;
}

.kb-key:hover {
    background: #383e58;
    border-color: #00aaaa;
}

.kb-key:active {
    transform: translateY(2px);
    box-shadow: 0 1px 0 #181a26;
}

.action-key {
    background: #1e3a5f;
    border-color: #2b5488;
}

.action-key:hover {
    background: #294d7c;
    border-color: #00d2ff;
}

.footer-info {
    padding: 8px 16px;
    background: #12131a;
    font-size: 12px;
    color: #888d9e;
    display: flex;
    justify-content: space-between;
}