/* style.css - Retro OS with Splendid 66 font, sharp corners, halftone dots */

@font-face {
    font-family: 'Splendid 66';
    src: local('Courier New'), local('Courier'), monospace;
    font-weight: normal;
    font-style: normal;
}

* {
    user-select: none;
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background-color: #2a1e2c;
    font-family: 'Splendid 66', 'Courier New', 'VT323', monospace;
    overflow: hidden;
    position: relative;
}

/* DESKTOP BACKGROUND with retro halftone texture */
.desktop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI4MCIgaGVpZ2h0PSI4MCIgdmlld0JveD0iMCAwIDQwIDQwIj48Y2lyY2xlIGN4PSIyMCIgY3k9IjIwIiByPSIxLjUiIGZpbGw9IiM1MzI3M2MiIGZpbGwtb3BhY2l0eT0iMC4xIiAvPjwvc3ZnPg==');
    background-repeat: repeat;
    background-color: #f5d6a7;
    overflow: auto;
    padding: 20px;
    cursor: default;
}

/* ICON GRID */
.icons-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    align-items: flex-start;
    align-content: flex-start;
}

.desktop-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 85px;
    cursor: pointer;
    transition: 0.05s linear;
    padding: 6px 4px;
    border: 1px solid transparent;
}

.desktop-icon:hover {
    background-color: rgba(165, 73, 73, 0.15);
    border: 1px solid #53273c;
}

.desktop-icon img {
    width: 56px;
    height: 56px;
    image-rendering: crisp-edges;
    image-rendering: pixelated;
}

.icon-label {
    margin-top: 8px;
    font-size: 13px;
    font-weight: bold;
    text-align: center;
    color: #53273c;
    background: rgba(245, 214, 167, 0.7);
    padding: 2px 6px;
    border-radius: 0px;
    font-family: 'Splendid 66', 'Courier New', monospace;
    word-break: break-word;
    max-width: 80px;
}

/* WINDOW SYSTEM - sharp corners */
.window {
    position: absolute;
    min-width: 260px;
    min-height: 180px;
    background: #f5d6a7;
    border: 3px solid #53273c;
    box-shadow: 8px 8px 0px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    backdrop-filter: none;
    font-family: 'Splendid 66', monospace;
    resize: both;
    overflow: hidden;
}

.window-header {
    background-color: #a45749;
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: grab;
    border-bottom: 2px solid #53273c;
    color: #f5d6a7;
    font-weight: bold;
    font-size: 14px;
    font-family: 'Splendid 66', monospace;
    flex-shrink: 0;
}

.window-header:active {
    cursor: grabbing;
}

.close-btn {
    background: #be1267;
    color: white;
    border: none;
    width: 26px;
    height: 26px;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    text-align: center;
    line-height: 22px;
    font-family: monospace;
    border: 1px solid #53273c;
}

.close-btn:hover {
    background: #9e0a52;
}

.resize-handle {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 16px;
    height: 16px;
    background: #a45749;
    cursor: nw-resize;
    z-index: 10;
    border-top-left-radius: 0;
    border-left: 2px solid #53273c;
    border-top: 2px solid #53273c;
}

.window-content {
    flex: 1;
    padding: 12px;
    overflow: auto;
    background: #f5d6a7;
    color: #2c1a2c;
    font-family: 'Splendid 66', monospace;
    font-size: 13px;
    min-height: 0;
}

/* Halftone footer effect inside window */
.window::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 14px;
    background: radial-gradient(circle at 20% 40%, #da9055 1.2px, transparent 1.2px);
    background-size: 8px 8px;
    pointer-events: none;
    opacity: 0.65;
    z-index: 5;
}

/* FILE EXPLORER grid */
.explorer-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding: 10px 0;
}

.explorer-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 75px;
    cursor: pointer;
    padding: 4px;
}

.explorer-item img {
    width: 48px;
    height: 48px;
}

.explorer-item span {
    font-size: 11px;
    background: #e9cba7;
    padding: 2px;
    margin-top: 4px;
    text-align: center;
    width: 100%;
    font-family: 'Splendid 66', monospace;
}

.breadcrumb {
    margin-bottom: 12px;
    background: #da9055;
    padding: 6px;
    font-size: 12px;
    cursor: pointer;
    display: inline-block;
    color: #2e1a2a;
    font-family: 'Splendid 66', monospace;
}

.file-content {
    white-space: pre-wrap;
    background: #f0e0c0;
    padding: 12px;
    border: 1px solid #53273c;
    font-size: 13px;
    font-family: 'Splendid 66', monospace;
}

/* TERMINAL STYLES */
.terminal-output {
    background: #241d1a;
    color: #b7ff9e;
    font-family: 'Splendid 66', monospace;
    padding: 8px;
    height: 180px;
    overflow-y: auto;
    font-size: 12px;
    margin-bottom: 8px;
    border: 1px solid #53273c;
}

.terminal-input-line {
    display: flex;
    gap: 6px;
    align-items: center;
    background: #f5d6a7;
}

.terminal-input-line input {
    flex: 1;
    background: #fff2e0;
    border: 2px solid #53273c;
    font-family: 'Splendid 66', monospace;
    font-size: 12px;
    padding: 6px;
    color: #2c1a2c;
}

button {
    background: #a45749;
    border: 1px solid #53273c;
    color: white;
    font-weight: bold;
    cursor: pointer;
    font-family: 'Splendid 66', monospace;
}