@import url('https://cdn.jsdelivr.net/npm/dseg@0.46.0/css/dseg.css');
/* Styling for individual windows: Data Miner, Tetris, Minesweeper, Folders, Settings, Notepad */

.window {
    background-color: #ECE9D8; border-radius: 8px 8px 0 0;
    box-shadow: 4px 4px 0px rgba(0,0,0,0.3);
    display: none; flex-direction: column; position: absolute; z-index: 10;
}

/* Fullscreen Window State */
.window.maximized {
    top: 0 !important; left: 0 !important;
    width: 100vw !important; height: calc(100vh - 30px) !important;
    border-radius: 0; box-shadow: none; border-width: 0px 0px 1px 0px !important;
}
.window.maximized .title-bar { border-radius: 0; cursor: default; }

.title-bar {
    color: white; padding: 5px 8px; font-weight: bold; font-size: 13px; display: flex;
    justify-content: space-between; align-items: center; border-radius: 5px 5px 0 0;
    text-shadow: 1px 1px #0f1089; cursor: move;
}

/* Borderless image-only window control buttons */
.window-controls { display: flex; gap: 2px; align-items: center; }
.win-btn { background: transparent; border: none; padding: 0; margin: 0; cursor: pointer; display: flex; align-items: center; justify-content: center; line-height: 0; }
.win-btn img { width: 20px; height: 20px; display: block; pointer-events: none; }
.win-btn:hover img { opacity: 0.8; }
.win-btn:active img { opacity: 0.6; transform: scale(0.9); }

/* Borderless Go button for address bars */
.go-btn { background: transparent; border: none; padding: 0; margin: 0; margin-left: 2px; cursor: pointer; display: inline-flex; align-items: center; line-height: 0; vertical-align: middle; }
.go-btn img { width: 20px; height: 20px; display: block; pointer-events: none; }
.go-btn:hover img { opacity: 0.8; }
.go-btn:active img { opacity: 0.6; transform: scale(0.9); }

/* In-App Dropdown Menus */
.menu-bar { background-color: #ECE9D8; border-bottom: 1px solid #ACA899; padding: 2px 10px; font-size: 12px; display: flex; gap: 15px; position: relative; }
.menu-bar span { cursor: pointer; padding: 2px 5px; color: black; }
.menu-bar span:hover { background-color: #316AC5; color: white; }

.menu-dropdown-container { position: relative; }
.app-menu-dropdown {
    display: none; position: absolute; top: 100%; left: 0; background: #fff;
    border: 1px solid #ACA899; box-shadow: 3px 3px 0px rgba(0,0,0,0.3); z-index: 5000;
    min-width: 120px; padding: 2px;
}
.app-menu-item { padding: 5px 15px; font-size: 11px; cursor: pointer; color: black; }
.app-menu-item:hover { background-color: #316AC5; color: white; }
.app-menu-divider { height: 1px; background-color: #ACA899; margin: 2px 0; }

.content { padding: 15px; border: 1px solid #fff; display: flex; gap: 15px; background-color: #ECE9D8; flex: 1; }

fieldset { border: 2px groove #fff; padding: 10px; margin: 0; background: #ECE9D8; }
legend { color: #0055E5; font-weight: bold; }

/* Classic Win32 Buttons */
button {
    font-family: Tahoma, 'MS Sans Serif', sans-serif; background-color: #ECE9D8;
    border-top: 2px solid #FFF; border-left: 2px solid #FFF; border-right: 2px solid #716F64; border-bottom: 2px solid #716F64;
    padding: 5px 15px; cursor: pointer; font-size: 12px; color: #000;
}
button:active { border-top: 2px solid #716F64; border-left: 2px solid #716F64; border-right: 2px solid #FFF; border-bottom: 2px solid #FFF; padding: 6px 14px 4px 16px; }
button:disabled { color: #ACA899; border-color: #ECE9D8; cursor: not-allowed; }

/* Fixed Window App Dimensions */
#main-window { width: 800px; height: 500px; top: 50px; left: 100px; }
#tetris-window { width: 320px; height: 450px; top: 100px; left: 500px; }
#minesweeper-window { width: 220px; height: 350px; top: 120px; left: 300px; }
#folder-window { width: 600px; height: 400px; top: 80px; left: 150px; }
#settings-window { width: 420px; height: 420px; top: 150px; left: 300px; }
#notepad-window { width: 500px; height: 350px; top: 100px; left: 200px; }
#xp-dialog { width: 350px; min-height: 150px; }

/* Data Miner Layout */
.left-panel { flex: 1; display: flex; flex-direction: column; gap: 15px; }
.right-panel { flex: 1.2; display: flex; flex-direction: column; }
#main-clicker { width: 100%; height: 100px; font-size: 20px; font-weight: bold; background-color: #D4D0C8; margin-top: 5px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.stat-box { background: #fff; border: 2px inset #ECE9D8; padding: 5px; margin-bottom: 5px; font-family: 'Courier New', Courier, monospace; font-size: 14px; font-weight: bold; color: #000; }
#upgrades-container { max-height: 400px; overflow-y: auto; padding-right: 5px; border: 2px inset #ECE9D8; background: #fff; }
.upgrade-item { display: flex; justify-content: space-between; align-items: center; padding: 8px; margin-bottom: 2px; border-bottom: 1px solid #D4D0C8; background: #ECE9D8; font-size: 11px; }
.upgrade-info { display: flex; flex-direction: column; width: 70%; }
.upgrade-name { font-weight: bold; font-size: 12px; color: #000; }
.upgrade-item button { width: 70px; padding: 3px; }
.system-controls { margin-top: 10px; display: flex; gap: 5px; justify-content: center; flex-wrap: wrap; }
#achievements-container { max-height: 120px; overflow-y: auto; border: 2px inset #ECE9D8; background: #fff; padding: 5px; margin-top: 5px; }
.achievement { font-size: 11px; margin-bottom: 3px; color: #888; }
.achievement.unlocked { color: #0055E5; font-weight: bold; }

/* Tetris App */
#tetris-canvas { border: 2px inset #ECE9D8; background-color: #000; display: block; margin: 0 auto; }
.tetris-sidebar { display: flex; flex-direction: column; gap: 10px; margin-left: 10px; font-size: 12px; font-weight: bold;}
.tetris-score-box { background: #fff; border: 2px inset #ECE9D8; padding: 5px; text-align: right; font-family: 'Courier New', Courier, monospace;}

/* Minesweeper App */
.minesweeper-header { display: flex; justify-content: space-between; align-items: center; width: 100%; border: 2px inset #ECE9D8; padding: 5px; background: #C0C0C0; box-sizing: border-box; margin-bottom: 10px;}
.mine-display { background: black; color: #ff0000; font-family: 'DSEG7 Classic', monospace; font-size: 26px; line-height: 26px; font-weight: bold; padding: 2px 5px; border: 1px inset #fff; letter-spacing: 2px; text-shadow: 0 0 2px #ff0000; display:flex; align-items:center; justify-content:center; }
#mine-face { font-size: 20px; width: 35px; height: 35px; padding: 0; display: flex; align-items: center; justify-content: center; }
.minesweeper-grid { display: grid; grid-template-columns: repeat(9, 20px); grid-template-rows: repeat(9, 20px); border: 3px inset #ECE9D8; background: #808080;}
.ms-cell { width: 20px; height: 20px; box-sizing: border-box; border-top: 2px solid #FFF; border-left: 2px solid #FFF; border-right: 2px solid #716F64; border-bottom: 2px solid #716F64; background: #C0C0C0; cursor: pointer; display: flex; align-items: center; justify-content: center; font-family: 'Courier New', monospace; font-size: 14px; font-weight: bold; user-select: none; }
.ms-cell:active { border: 1px solid #808080; background: #C0C0C0; }
.ms-cell.revealed { border: 1px solid #808080; border-right: 1px dotted #808080; border-bottom: 1px dotted #808080; background: #C0C0C0; cursor: default; }
.ms-cell.bomb { background-color: red; }
.ms-1 { color: blue; } .ms-2 { color: green; } .ms-3 { color: red; } .ms-4 { color: darkblue; } .ms-5 { color: darkred; } .ms-6 { color: darkcyan; } .ms-7 { color: black; } .ms-8 { color: gray; }

/* Folder Explorer App */
.explorer-toolbar { background: #ECE9D8; padding: 5px; border-bottom: 1px solid #ACA899; display: flex; gap: 5px; }
.explorer-toolbar button { padding: 3px 8px; }
.explorer-address { display: flex; align-items: center; padding: 3px 5px; border-bottom: 1px solid #ACA899; background: #ECE9D8; font-size: 12px;}
.explorer-address input { flex: 1; margin-left: 5px; border: 2px inset #ECE9D8; padding: 2px; font-family: Tahoma; }
.explorer-content { display: flex; flex: 1; background: #fff; border: 2px inset #ECE9D8; overflow-y: auto; padding: 10px; align-content: flex-start; gap: 15px; flex-wrap: wrap; }
.file-icon { width: 75px; height: 75px; display: flex; flex-direction: column; align-items: center; font-size: 11px; cursor: default; text-align: center; padding: 5px; box-sizing: border-box; }
.file-icon:hover { background-color: rgba(49, 106, 197, 0.1); border: 1px dotted rgba(49, 106, 197, 0.5); }
.file-icon.selected { background-color: #316AC5; color: white; }
.file-icon img { width: 32px; height: 32px; margin-bottom: 5px; pointer-events: none; image-rendering: pixelated;}
.file-icon svg { margin-bottom: 5px; pointer-events: none; }

/* Settings App Custom XP Structure */
.tabs { display: flex; margin-bottom: 10px; border-bottom: 1px solid #ACA899; padding-left:2px; }
.tab { padding: 4px 6px; border: 1px solid #ACA899; border-bottom: none; border-radius: 3px 3px 0 0; background: #ECE9D8; cursor: pointer; font-size: 11px; margin-right: 1px; color: black; position:relative; top:1px; z-index:0;}
.tab.active { background: #fff; border-top: 2px solid orange; padding-bottom: 5px; margin-bottom: -1px; z-index: 2; height: 16px; top: 0;}
.settings-content { background: #fff; border: 1px solid #ACA899; padding: 15px; height: 280px; overflow-y: auto; display:flex; flex-direction: column;}
.settings-row { font-size: 11px; color: black; }
.settings-row select, .settings-row input { font-family: Tahoma; font-size: 11px; width: 100%; box-sizing: border-box; margin-top: 3px; border: 2px inset #ECE9D8; padding: 2px;}

/* Data Miner Enhanced Visual Effects */
.turbo-glow {
    animation: turbo-pulse 0.5s infinite alternate;
    border: 3px inset #FFDD00 !important;
}

@keyframes turbo-pulse {
    0% { background-color: #D4D0C8; box-shadow: 0 0 5px #FFDD00; }
    100% { background-color: #FFDD00; box-shadow: 0 0 20px #FFDD00, inset 0 0 10px white; color: #000; }
}

/* Clicker Expansion Styles */
.cl-tabs {
    display: flex;
    margin-bottom: 5px;
    border-bottom: 1px solid #ACA899;
}
.cl-tab {
    padding: 3px 8px;
    border: 1px solid #ACA899;
    border-bottom: none;
    border-radius: 3px 3px 0 0;
    font-size: 10px;
    cursor: pointer;
    background: #ECE9D8;
    margin-right: 2px;
}
.cl-tab.active {
    background: #fff;
    font-weight: bold;
    color: #0055E5;
    position: relative;
    top: 1px;
}
.cl-tab:hover { background: #fff; }
.sys-icon-remotedesktop { width: 16px; height: 16px; background-image: url('../Windows XP Icons/Remote Desktop.png'); background-size: cover; display: inline-block; }
#help-window .window-content {
    user-select: text;
}
