@font-face {
    font-family: 'VT323';
    src: local('VT323'), url('https://fonts.googleapis.com/css2?family=VT323&display=swap');
    font-display: swap;
}

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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000;
    color: #00ff66;
    font-family: 'VT323', 'Courier New', monospace;
    cursor: default;
    -webkit-font-smoothing: none;
    -moz-osx-font-smoothing: unset;
    font-smooth: never;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    background: #0a0a0a;
}

::selection {
    background: #00ff66;
    color: #001100;
}

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

::-webkit-scrollbar-track {
    background: #001100;
}

::-webkit-scrollbar-thumb {
    background: #005522;
    border: 1px solid #00aa44;
}

#crt-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 800px;
}

#monitor-frame {
    position: relative;
    width: 95vw;
    height: 90vh;
    max-width: 1200px;
    max-height: 900px;
    background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 50%, #1a1a1a 100%);
    border: 3px solid #333;
    border-radius: 24px;
    padding: 20px;
    box-shadow:
        0 0 20px rgba(0, 255, 102, 0.05),
        inset 0 0 40px rgba(0, 0, 0, 0.8),
        0 0 0 2px #222,
        0 0 0 4px #111;
}

#monitor-frame::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    border-radius: 50%;
}

#monitor-frame::after {
    content: '';
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: #333;
    border-radius: 50%;
    box-shadow: 0 0 2px #222;
}

#screen-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 12px;
    background: #000;
}

#screen-content {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 12px;
}

canvas#matrix-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#content-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    overflow: hidden;
    padding: 20px;
}

canvas#crt-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
}

canvas#oscilloscope-canvas {
    position: absolute;
    bottom: 60px;
    right: 30px;
    width: 300px;
    height: 180px;
    z-index: 5;
    border: 1px solid #005522;
    border-radius: 4px;
    background: rgba(0, 10, 0, 0.85);
    display: none;
}

#bios-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    padding: 30px;
    font-size: 14px;
    line-height: 1.4;
    color: #00ff66;
    display: none;
    overflow-y: auto;
}

#terminal-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 4;
    display: none;
    flex-direction: column;
    padding: 20px;
}

#terminal-output {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px 0;
    font-size: 14px;
    line-height: 1.3;
    white-space: pre-wrap;
    word-wrap: break-word;
    scroll-behavior: smooth;
}

#terminal-input-line {
    display: flex;
    align-items: center;
    padding: 8px 0;
    font-size: 14px;
    border-top: 1px solid #005522;
    flex-shrink: 0;
}

#terminal-prompt {
    color: #00aa44;
    margin-right: 8px;
    white-space: nowrap;
}

#terminal-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #00ff66;
    font-family: 'VT323', 'Courier New', monospace;
    font-size: 14px;
    outline: none;
    caret-color: #00ff66;
}

#terminal-input::placeholder {
    color: #005522;
}

/* Profile card */
#profile-card {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 6;
    display: none;
    flex-direction: column;
    align-items: center;
    padding: 40px;
    border: 1px solid #00aa44;
    background: rgba(0, 17, 0, 0.9);
    box-shadow: 0 0 30px rgba(0, 255, 102, 0.15), inset 0 0 30px rgba(0, 255, 102, 0.05);
    animation: profileAppear 0.8s ease-out;
}

#profile-card canvas#avatar-canvas {
    width: 96px;
    height: 96px;
    image-rendering: pixelated;
    border: 2px solid #00aa44;
    margin-bottom: 16px;
}

#profile-card .username {
    font-size: 24px;
    color: #00ff66;
    text-shadow: 0 0 10px rgba(0, 255, 102, 0.5);
    margin-bottom: 8px;
}

#profile-card .status {
    font-size: 14px;
    color: #00aa44;
    animation: blink 1s step-end infinite;
}

/* DOS Buttons */
#dos-buttons {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 7;
    display: none;
    gap: 10px;
}

.dos-btn {
    background: #001100;
    border: 1px solid #005522;
    color: #00aa44;
    font-family: 'VT323', 'Courier New', monospace;
    font-size: 12px;
    padding: 6px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.dos-btn:hover {
    background: #003311;
    border-color: #00ff66;
    color: #00ff66;
    box-shadow: 0 0 10px rgba(0, 255, 102, 0.3), inset 0 0 10px rgba(0, 255, 102, 0.1);
}

.dos-btn:active {
    transform: scale(0.97);
}

/* Status LED */
#power-led {
    position: absolute;
    bottom: 8px;
    right: 40px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #005500;
    box-shadow: none;
    z-index: 8;
    transition: all 0.5s ease;
}

#power-led.on {
    background: #00ff00;
    box-shadow: 0 0 8px #00ff00, 0 0 15px rgba(0, 255, 0, 0.3);
}
