/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow: hidden;
    font-family: 'MS Sans Serif', sans-serif;
    font-size: 14px;
}

/* Desktop */
.desktop {
    width: 100vw;
    height: 100vh;
    background: linear-gradient(45deg, #008080 25%, transparent 25%),
                linear-gradient(-45deg, #008080 25%, transparent 25%),
                linear-gradient(45deg, transparent 75%, #008080 75%),
                linear-gradient(-45deg, transparent 75%, #008080 75%);
    background-size: 2px 2px;
    background-position: 0 0, 0 1px, 1px -1px, -1px 0px;
    background-color: #008080;
    position: relative;
    overflow: hidden;
}

/* Desktop Icons */
.desktop-icons {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    flex-direction: column;
    gap: 25px;
    z-index: 1;
}

.desktop-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100px;
    padding: 8px;
    cursor: pointer;
    border: 1px solid transparent;
    background: transparent;
    user-select: none;
}

.desktop-icon:hover {
    background: rgba(255, 255, 255, 0.1);
    border: 1px dotted #ffffff;
}

.desktop-icon.selected {
    background: rgba(0, 0, 139, 0.3);
    border: 1px dotted #ffffff;
}

.icon-image {
    width: 64px;
    height: 64px;
    margin-bottom: 6px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* Icon types */
.folder-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath fill='%23ffff80' d='M2 6h12l2 2h14v18H2z'/%3E%3Cpath fill='%23c0c0c0' d='M2 6v2h12l2 2h14v-2H16l-2-2z'/%3E%3C/svg%3E");
}

.pdf-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath fill='%23ffffff' d='M6 4h14l6 6v18H6z'/%3E%3Cpath fill='%23c0c0c0' d='M20 4v6h6l-6-6z'/%3E%3Cpath fill='%23ff0000' d='M8 12h16v2H8z'/%3E%3Cpath fill='%23ff0000' d='M8 16h16v2H8z'/%3E%3Cpath fill='%23ff0000' d='M8 20h12v2H8z'/%3E%3Ctext x='16' y='24' text-anchor='middle' font-family='Arial' font-size='6' fill='%23000' font-weight='bold'%3EPDF%3C/text%3E%3C/svg%3E");
}

.shortcut-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath fill='%23008000' d='M4 4h24v24H4z'/%3E%3Cpath fill='%23ffffff' d='M8 8h16v16H8z'/%3E%3Cpath fill='%23000' d='M10 12h12v2H10zm0 4h12v2H10zm0 4h8v2h-8z'/%3E%3Cpath fill='%23000080' d='M24 20l4 4-4 4v-2h-4v-4h4v-2z'/%3E%3C/svg%3E");
}

.text-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath fill='%23ffffff' d='M6 4h20v24H6z'/%3E%3Cpath fill='%23c0c0c0' d='M6 4h20v2H6z'/%3E%3Cpath fill='%23000' d='M8 8h16v2H8zm0 4h16v2H8zm0 4h16v2H8zm0 4h12v2H8z'/%3E%3C/svg%3E");
}

.system-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath fill='%23800080' d='M8 4h16v24H8z'/%3E%3Cpath fill='%23ffffff' d='M10 8h12v2H10zm0 4h12v2H10zm0 4h12v2H10zm0 4h8v2h-8z'/%3E%3Cpath fill='%23ff0000' d='M12 6h8v2h-8z'/%3E%3C/svg%3E");
}

.icon-label {
    color: white;
    text-align: center;
    font-size: 13px;
    line-height: 1.3;
    text-shadow: 1px 1px 0px #000000;
    word-wrap: break-word;
    max-width: 100px;
}

/* Windows Container */
.windows-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: calc(100% - 40px); /* Account for taskbar */
}

/* Window Styles */
.window {
    position: absolute;
    min-width: 300px;
    min-height: 200px;
    background: #c0c0c0;
    border: 2px outset #c0c0c0;
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    z-index: 100;
}

.window.active {
    z-index: 1000;
}

/* Title Bar */
.title-bar {
    background: linear-gradient(90deg, #000080 0%, #0000ff 100%);
    color: white;
    padding: 2px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    cursor: move;
}

.window:not(.active) .title-bar {
    background: linear-gradient(90deg, #808080 0%, #c0c0c0 100%);
    color: #c0c0c0;
}

.title-bar-text {
    padding: 4px 8px;
    font-size: 13px;
}

.title-bar-controls {
    display: flex;
    gap: 2px;
    padding-right: 2px;
}

.title-bar-controls button {
    width: 16px;
    height: 14px;
    border: 1px outset #c0c0c0;
    background: #c0c0c0;
    font-size: 6px;
    padding: 0;
    cursor: pointer;
}

.title-bar-controls button:active {
    border: 1px inset #c0c0c0;
}

/* Window Body */
.window-body {
    padding: 8px;
    background: #c0c0c0;
    height: 400px;
    overflow: auto;
}

/* File List (for projects window) */
.file-list {
    background: white;
    border: 2px inset #c0c0c0;
    padding: 4px;
    height: 100%;
    font-family: 'Courier New', monospace;
    font-size: 14px;
}

/* Notepad Content */
.notepad-content {
    background: white;
    border: 2px inset #c0c0c0;
    padding: 8px;
    height: 100%;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    white-space: pre-wrap;
    overflow: auto;
}

/* Browser Content */
.browser-content {
    background: white;
    border: 2px inset #c0c0c0;
    height: 100%;
    padding: 8px;
}

/* System Info */
.system-info {
    background: #c0c0c0;
    padding: 16px;
    font-size: 13px;
}

/* Taskbar */
.taskbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: #c0c0c0;
    border-top: 1px solid #808080;
    display: flex;
    align-items: center;
    padding: 2px 4px;
    z-index: 2000;
}

/* Remove Start Button and Taskbar Items styles */

/* Terminal Display - Now takes 80% of taskbar */
.terminal-display {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: #00ff00;
    background: #000;
    padding: 4px 8px;
    border: 1px inset #c0c0c0;
    height: 32px;
    display: flex;
    align-items: center;
    flex: 1;
    margin-right: 8px;
}

.terminal-prompt {
    color: #00ff00;
}

.terminal-command {
    color: #ffffff;
    margin-left: 6px;
}

.terminal-cursor {
    animation: blink 1s infinite;
    margin-left: 2px;
    color: #00ff00;
}

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

/* System Tray - Now just holds the clock */
.system-tray {
    height: 32px;
    padding: 4px 12px;
    border: 1px inset #c0c0c0;
    background: #c0c0c0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 80px;
}

/* Clock */
.clock {
    font-size: 13px;
    color: #000;
    text-align: center;
    font-weight: normal;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .desktop-icons {
        gap: 15px;
    }

    .desktop-icon {
        width: 80px;
    }

    .icon-image {
        width: 48px;
        height: 48px;
    }

    .icon-label {
        font-size: 12px;
        max-width: 80px;
    }

    .window {
        min-width: 250px;
        min-height: 150px;
        left: 5% !important;
        top: 10% !important;
        width: 90% !important;
        max-width: 90vw !important;
    }

    .terminal-display {
        font-size: 12px;
    }

    .clock {
        font-size: 11px;
    }
}

/* Drag and drop states */
.dragging {
    cursor: move;
    opacity: 0.8;
}

.no-select {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}
