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

body {
    font-family: 'MS Sans Serif', sans-serif;
    font-size: 11px;
    background: #008080;
    overflow: hidden;
    cursor: default;
}

#desktop {
    height: 100vh;
    position: relative;
    background: linear-gradient(45deg, #008080 0%, #004040 100%);
}

#canvas {
    display: block;
    cursor: default;
}

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

#start-button {
    height: 32px;
    padding: 0 15px;
    background: #c0c0c0;
    border: 2px outset #c0c0c0;
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: bold;
    margin: 4px;
}

#start-button:active {
    border: 2px inset #c0c0c0;
}

#start-button:hover {
    background: #d4d4d4;
}

#taskbar-apps {
    flex: 1;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 10px;
}

#clock {
    padding: 0 10px;
    border: 2px inset #c0c0c0;
    height: 32px;
    display: flex;
    align-items: center;
    margin: 4px;
    font-family: monospace;
    font-size: 12px;
}

/* Start Menu */
#start-menu {
    position: fixed;
    bottom: 42px;
    left: 4px;
    width: 200px;
    background: #c0c0c0;
    border: 2px outset #c0c0c0;
    z-index: 1001;
    box-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.menu-item {
    padding: 8px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.menu-item:hover {
    background: #316ac5;
    color: white;
}

.separator {
    height: 1px;
    background: #808080;
    margin: 2px 0;
}

/* Windows */
.window {
    position: absolute;
    background: #c0c0c0;
    border: 2px outset #c0c0c0;
    box-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    min-width: 200px;
    min-height: 150px;
}

.window.maximized {
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: calc(100vh - 40px) !important;
}

.title-bar {
    height: 32px;
    background: linear-gradient(90deg, #0000ff 0%, #000080 100%);
    color: white;
    display: flex;
    align-items: center;
    padding: 0 8px;
    cursor: move;
    user-select: none;
}

.title-text {
    flex: 1;
    font-weight: bold;
    font-size: 12px;
}

.title-buttons {
    display: flex;
    gap: 2px;
}

.title-button {
    width: 20px;
    height: 18px;
    background: #c0c0c0;
    border: 1px outset #c0c0c0;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.title-button:hover {
    background: #d4d4d4;
}

.window-content {
    padding: 8px;
    height: calc(100% - 32px);
    overflow: auto;
}

/* App-specific styles */
.win95-button {
    background: #c0c0c0;
    border: 2px outset #c0c0c0;
    padding: 4px 8px;
    font-family: inherit;
    font-size: 11px;
    cursor: pointer;
}

.win95-button:active {
    border: 2px inset #c0c0c0;
}

.win95-button:hover {
    background: #d4d4d4;
}

.paint-toolbar {
    margin-bottom: 8px;
    display: flex;
    gap: 8px;
    align-items: center;
}

.calculator {
    width: 200px;
}

.calc-display {
    width: 100%;
    height: 32px;
    background: white;
    border: 2px inset #c0c0c0;
    text-align: right;
    padding: 0 8px;
    font-family: monospace;
    font-size: 16px;
    margin-bottom: 8px;
}

.calc-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2px;
}

.calc-button {
    height: 32px;
    font-size: 14px;
    font-weight: bold;
}

.notepad-content {
    width: 100%;
    height: 100%;
    background: white;
    border: 2px inset #c0c0c0;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    padding: 8px;
    resize: none;
    outline: none;
}

.minesweeper {
    text-align: center;
}

.solitaire {
    text-align: center;
}

/* App Launcher Modal */
#app-launcher {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1002;
}

#app-launcher .window-content {
    width: 400px;
}

#app-prompt {
    width: 100%;
    padding: 8px;
    margin: 10px 0;
    border: 2px inset #c0c0c0;
    font-family: inherit;
    font-size: 11px;
}

.button-row {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 15px 0;
}

#launcher-examples {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #808080;
    font-size: 10px;
}

#launcher-examples ul {
    text-align: left;
    margin-left: 20px;
}

#launcher-examples li {
    margin: 4px 0;
    color: #0000ff;
    cursor: pointer;
}

#launcher-examples li:hover {
    text-decoration: underline;
}

/* Utility classes */
.hidden {
    display: none !important;
}

/* Footer */
#footer {
    position: fixed;
    bottom: -30px;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.8);
    color: white;
    text-align: center;
    padding: 5px;
    font-size: 10px;
    z-index: 999;
    transition: bottom 0.3s ease;
}

#footer:hover {
    bottom: 0;
}

#footer a {
    color: #00ffff;
    text-decoration: none;
}

#footer a:hover {
    text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .window {
        max-width: 95vw;
        max-height: 80vh;
    }
    
    #start-menu {
        width: 150px;
    }
    
    .title-bar {
        height: 36px;
    }
    
    .title-button {
        width: 24px;
        height: 22px;
    }
}

/* Animation effects */
.window {
    animation: windowOpen 0.2s ease-out;
}

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

/* Custom scrollbars for authenticity */
.window-content::-webkit-scrollbar {
    width: 16px;
}

.window-content::-webkit-scrollbar-track {
    background: #c0c0c0;
    border: 1px inset #c0c0c0;
}

.window-content::-webkit-scrollbar-thumb {
    background: #c0c0c0;
    border: 1px outset #c0c0c0;
}

.window-content::-webkit-scrollbar-thumb:hover {
    background: #d4d4d4;
}