:root {
    --amber: #f59e0b;
    --amber-dark: #92400e;
    --terminal-bg: rgba(2, 6, 23, 0.95);
    --scan-line: rgba(245, 158, 11, 0.1);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'JetBrains Mono', monospace;
    background: #000;
}

.font-mono {
    font-family: 'JetBrains Mono', monospace;
}

/* CRT Scanline Effect */
.scanlines {
    background: linear-gradient(
        to bottom,
        rgba(255,255,255,0),
        rgba(255,255,255,0) 50%,
        rgba(0,0,0,0.2) 50%,
        rgba(0,0,0,0.2)
    );
    background-size: 100% 4px;
    animation: scanline 10s linear infinite;
}

@keyframes scanline {
    0% { background-position: 0 0; }
    100% { background-position: 0 100%; }
}

/* Starfield Background */
.stars {
    background-image: 
        radial-gradient(2px 2px at 20px 30px, #eee, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 40px 70px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 50px 160px, #ddd, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 90px 40px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 130px 80px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 160px 120px, #ddd, rgba(0,0,0,0));
    background-repeat: repeat;
    background-size: 200px 200px;
    animation: twinkle 5s ease-in-out infinite alternate;
}

@keyframes twinkle {
    from { opacity: 0.3; }
    to { opacity: 0.6; }
}

/* Glass Effect */
.glass {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Window Styles */
.window {
    min-width: 300px;
    min-height: 200px;
    resize: both;
    overflow: auto;
    transition: transform 0.1s ease;
    animation: windowOpen 0.3s ease-out;
}

.window.dragging {
    opacity: 0.9;
    transform: scale(1.02);
    box-shadow: 0 20px 50px rgba(245, 158, 11, 0.2);
}

.window.minimized {
    display: none !important;
}

.window.active {
    z-index: 9999 !important;
    border-color: rgba(245, 158, 11, 0.8);
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.15);
}

@keyframes windowOpen {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, var(--amber-dark), var(--amber));
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.5);
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: var(--amber);
}

/* Window Header Hover Effects */
.window-header:hover {
    background: linear-gradient(to right, rgba(245, 158, 11, 0.1), rgba(0, 0, 0, 0.3));
}

/* Terminal Text Effects */
.window-content p {
    text-shadow: 0 0 1px rgba(245, 158, 11, 0.1);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .window {
        position: fixed !important;
        top: 60px !important;
        left: 10px !important;
        right: 10px !important;
        width: auto !important;
        bottom: 60px !important;
        height: auto !important;
    }
    
    .window-header {
        cursor: default;
    }
}

/* Blinking Cursor Effect */
.blink {
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

/* Selection Color */
::selection {
    background: rgba(245, 158, 11, 0.3);
    color: #fff;
}

/* Taskbar Button Active State */
.taskbar-btn.active {
    background: rgba(245, 158, 11, 0.3);
    border-color: var(--amber);
}

/* Hover Effects */
.window-content img {
    transition: all 0.3s ease;
}

.window-content img:hover {
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
}

/* Typewriter Effect */
.typewriter {
    overflow: hidden;
    border-right: 2px solid var(--amber);
    white-space: nowrap;
    animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: var(--amber) }
}