/* ---- Themes and Resets ---- */ 
body { 
    margin:0; 
    font-family: 'Inter', sans-serif;
    overflow: hidden; /* Prevent scrolling */
    background-color: #000000;
    color: #ffffff;
    /* Disable text selection */
    -webkit-user-select: none; /* Safari */
    -ms-user-select: none; /* IE 10 and IE 11 */
    user-select: none; /* Standard syntax */
    opacity: 1;
    transition: opacity 0.5s ease-in-out;
} 

body.loading {
    opacity: 0;
}

canvas{ 
    display: block; 
} 
#particles-js{ 
    position:absolute; 
    width: 100%; 
    height: 100%; 
    top: 0;
    left: 0;
    z-index: 1;
    background-color: #000000;
    background-image: linear-gradient(to bottom, #020111, #191927);
} 
        
#desktop {
    position: relative; 
    z-index: 5;
}

.glassmorphism {
    background: rgba(10, 10, 30, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(20, 80, 180, 0.5);
}
        
.terraria-taskbar {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='64'%3E%3Cdefs%3E%3Cpattern id='terraria' patternUnits='userSpaceOnUse' width='32' height='64'%3E%3C!-- Snow Layer --%3E%3Crect x='0' y='0' width='32' height='4' fill='%23E5E7EB'/%3E%3Crect x='5' y='1' width='8' height='2' fill='%23F3F4F6'/%3E%3Crect x='20' y='0' width='6' height='2' fill='%23F3F4F6'/%3E%3C!-- Grass Layer --%3E%3Crect x='0' y='4' width='32' height='16' fill='%233E863E'/%3E%3Crect x='2' y='6' width='4' height='4' fill='%2359B759'/%3E%3Crect x='12' y='8' fill='%2359B759' width='4' height='4'/%3E%3Crect x='22' y='5' fill='%2359B759' width='4' height='4'/%3E%3C!-- Dirt Layer --%3E%3Crect x='0' y='20' width='32' height='44' fill='%23A56842'/%3E%3Crect x='4' y='24' fill='%237A4D30' width='8' height='8'/%3E%3Crect x='18' y='34' fill='%237A4D30' width='8' height='8'/%3E%3Crect x='8' y='44' fill='%237A4D30' width='8' height='8'/%3E%3Crect x='20' y='54' fill='%237A4D30' width='8' height='8'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='100%25' height='100%25' fill='url(%23terraria)'/%3E%3C/svg%3E");
    background-size: 32px 64px;
    image-rendering: pixelated;
    border-top: 2px solid black;
}

.font-vt323 { font-family: 'VT323', monospace; }

.terminal-font {
    font-family: 'JetBrains Mono', monospace;
    font-style: italic;
}

.window {
    position: absolute;
    resize: both;
    overflow: hidden; /* Let child handle scroll */
    min-width: 300px;
    min-height: 200px;
    display: flex;
    flex-direction: column;
}

/* Default Window Positions and Sizes */
#terminal-window { width: 550px; height: 350px; }
#about-window { width: 500px; height: 350px; }
#projects-window { width: 600px; height: auto; max-height: 500px; }
#vinyl-window { width: 400px; height: 450px; }

.icon-bg {
    background-color: rgba(55, 65, 81, 0);
    padding: 0.75rem;
    border: 2px solid rgba(107, 114, 128, 0);
    transition: border-color 0.2s;
    cursor: pointer;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20%;
}
.desktop-icon:hover .icon-bg {
    border-color: #888888;
}

.window-header { cursor: move; flex-shrink: 0; }
.window-content { flex-grow: 1; overflow-y: auto; }

/* Custom Scrollbar Styles */
.custom-scrollbar::-webkit-scrollbar {
    width: 8px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(100, 120, 150, 0.5);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(120, 140, 170, 0.7);
}
.custom-scrollbar::-webkit-scrollbar-corner {
    background: transparent;
}

/* Terminal Styles */
#terminal-output span { white-space: pre-wrap; }
#terminal-input-line { display: flex; }
#terminal-input {
    background: transparent;
    border: none;
    outline: none;
    flex-grow: 1;
    color: #ffffff;
}
.blinking-cursor {
    animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.copy-btn {
    cursor: pointer;
    text-decoration: underline;
    color: #a0aec0; /* A lighter gray */
}
.copy-btn:hover {
    color: #ffffff;
}

/* Clock text color fix */
#clock {
    color: white;
}

/* Vinyl Player Styles */
.control-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #cbd5e1;
    transition: color 0.2s;
}
.control-btn:hover {
    color: #ffffff;
}
        
#volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    background: #374151;
    border-radius: 5px;
    outline: none;
    opacity: 0.7;
    transition: opacity .2s;
}

#volume-slider:hover {
    opacity: 1;
}

#volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #4ade80;
    cursor: pointer;
    border-radius: 50%;
    border: 2px solid #1f2937;
}

#volume-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #4ade80;
    cursor: pointer;
    border-radius: 50%;
    border: 2px solid #1f2937;
}

/* Project Navigation Styles */
.project-nav-btn {
    
    border-radius: 50%;
    padding: 0.1rem;
    transition: background-color 0.2s;
}
.project-nav-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

/* Responsive adjustments for smaller screens */
@media screen and (max-width: 1024px) {
    .terraria-taskbar {
        height: 3rem; /* 48px */
    }
    .desktop-icon .icon-bg {
        width: 60px;
        height: 60px;
        padding: 0.5rem;
    }
    .window {
        resize: none; /* Disable resizing on touch devices */
    }
    .close-btn {
        width: 24px;
        height: 24px;
    }
    #terminal-window { width: 90vw; height: auto; max-height: 75vh; }
    #about-window { width: 90vw; height: auto; max-height: 75vh; }
    #projects-window { width: 90vw; height: auto; max-height: 75vh; }
    #vinyl-window { width: 90vw; max-width: 380px; height: auto; }
}
