/* Application-specific styles */

/* ---------- Notepad ---------- */
.notepad-area {
  flex: 1; border: none; resize: none; outline: none; padding: 3px 4px;
  font-family: "Lucida Console", Monaco, monospace; font-size: 13px;
  background: #fff; user-select: text; -webkit-user-select: text; cursor: text;
  white-space: pre; overflow: auto;
}
.notepad-area.wrap { white-space: pre-wrap; word-wrap: break-word; }
.finddlg-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.finddlg-row input { flex: 1; }

/* ---------- Paint ---------- */
.paint-root { display: flex; flex-direction: column; flex: 1; overflow: hidden; }
.paint-main { flex: 1; display: flex; overflow: hidden; }
.paint-tools {
  width: 56px; background: var(--face); border-right: 1px solid #d4d0c8;
  display: flex; flex-wrap: wrap; align-content: flex-start; padding: 4px 2px; gap: 0;
}
.ptool {
  width: 25px; height: 25px; display: flex; align-items: center; justify-content: center;
  border: 1px solid transparent; cursor: default;
}
.ptool svg { width: 17px; height: 17px; pointer-events: none; }
.ptool:hover { border-color: #aca899; background: #f4f1e4; }
.ptool.on { border-color: #716f64; background: #dcd8c4; box-shadow: inset 1px 1px 2px rgba(0,0,0,.25); }
.paint-toolopts {
  width: 56px; min-height: 70px; border-top: 1px solid #d4d0c8; background: var(--face);
  display: flex; flex-wrap: wrap; padding: 4px; gap: 3px; align-content: flex-start; justify-content: center;
}
.popt { border: 1px solid #aca899; background: #fff; cursor: default; }
.popt.on { outline: 2px solid #316ac5; }
.paint-canvas-wrap {
  flex: 1; overflow: auto; background: #808080;
  padding: 8px; position: relative;
}
.paint-canvas-holder {
  background: #fff; box-shadow: 2px 2px 6px rgba(0,0,0,.4); display: inline-block;
  cursor: crosshair; position: relative; line-height: 0;
}
#paint-canvas { display: block; }
.paint-bottom {
  display: flex; border-top: 1px solid #d4d0c8; background: var(--face); padding: 3px 6px; gap: 10px;
  align-items: center; flex: 0 0 auto;
}
.paint-colors { display: flex; align-items: flex-end; position: relative; height: 34px; }
.pcolor-cur {
  width: 26px; height: 30px; position: relative; margin-right: 6px;
}
.pcolor-cur .c1 { position: absolute; left: 0; top: 0; width: 17px; height: 17px; border: 1px solid #716f64; }
.pcolor-cur .c2 { position: absolute; left: 9px; top: 12px; width: 17px; height: 17px; border: 1px solid #716f64; background: #fff; }
.pcolor-grid { display: grid; grid-template-columns: repeat(14, 14px); grid-template-rows: repeat(2, 14px); }
.pcolor { width: 14px; height: 14px; border: 1px solid rgba(0,0,0,.35); cursor: default; }
.pcolor:hover { outline: 1px solid #fff; }
.paint-coords { margin-left: auto; color: #555; width: 130px; }

/* ---------- Minesweeper ---------- */
.mine-root { display: flex; flex-direction: column; flex: 1; background: #c0c0c0; padding: 6px; overflow: auto; }
.mine-panel {
  border: 3px solid; border-color: #7b7b7b #fff #fff #7b7b7b;
  padding: 6px; display: flex; flex-direction: column; gap: 6px; width: fit-content;
}
.mine-top {
  display: flex; align-items: center; justify-content: space-between;
  border: 2px solid; border-color: #7b7b7b #fff #fff #7b7b7b;
  padding: 4px 5px; background: #c0c0c0; gap: 10px;
}
.mine-lcd {
  font-family: "Courier New", monospace; font-weight: bold; font-size: 22px; letter-spacing: 1px;
  color: #ff0d0d; background: #000; padding: 0 3px; line-height: 1; border: 1px solid #555;
  min-width: 46px; text-align: center;
}
.mine-face {
  width: 32px; height: 32px; font-size: 17px; cursor: default;
  border: 2px solid; border-color: #fff #7b7b7b #7b7b7b #fff; background: #c0c0c0;
  display: flex; align-items: center; justify-content: center; padding: 0;
}
.mine-face:active { border-color: #7b7b7b #fff #fff #7b7b7b; }
.mine-grid {
  display: grid; border: 3px solid; border-color: #7b7b7b #fff #fff #7b7b7b; width: fit-content;
  background: #c0c0c0; line-height: 0;
}
.mcell {
  width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: bold; cursor: default;
  border: 2px solid; border-color: #fff #7b7b7b #7b7b7b #fff; background: #c0c0c0;
  box-sizing: border-box;
}
.mcell.open { border: 1px solid #808080; background: #c6c6c6; }
.mcell.minehit { background: #ff0000; }
.mcell.n1 { color: #0000ff; } .mcell.n2 { color: #007b00; } .mcell.n3 { color: #ff0000; }
.mcell.n4 { color: #00007b; } .mcell.n5 { color: #7b0000; } .mcell.n6 { color: #007b7b; }
.mcell.n7 { color: #000; } .mcell.n8 { color: #7b7b7b; }
.mine-rules { padding: 8px 10px; line-height: 1.5; user-select: text; -webkit-user-select: text; }

/* ---------- Explorer / My Computer ---------- */
.explorer-root { display: flex; flex-direction: column; flex: 1; overflow: hidden; background: var(--face); }
.addrbar {
  display: flex; align-items: center; gap: 6px; padding: 3px 6px;
  background: linear-gradient(to bottom, #faf9f4, #ece9d8); border-bottom: 1px solid #d4d0c8; flex: 0 0 auto;
}
.addr-input {
  flex: 1; display: flex; align-items: center; gap: 6px; background: #fff; border: 1px solid #7f9db9;
  padding: 2px 6px; height: 22px;
}
.addr-input svg { width: 14px; height: 14px; }
.addr-input input { flex: 1; border: none; outline: none; font-size: 11px; }
.explorer-main { flex: 1; display: flex; overflow: hidden; }
.explorer-side {
  width: 178px; flex: 0 0 auto; overflow-y: auto; padding: 8px;
  background: linear-gradient(to bottom, #7ba7e7 0%, #6e9fe3 60px, #eef4fd 61px, #eef4fd 100%);
}
.sidebox { margin-bottom: 10px; border-radius: 4px; overflow: hidden; border: 1px solid rgba(255,255,255,.7); }
.sidebox h4 {
  background: linear-gradient(to bottom, #f5fafe, #d6e4f7); color: #215dc6; font-size: 11px;
  padding: 4px 8px; border-bottom: 1px solid rgba(255,255,255,.8);
}
.sidebox .sidebox-body { background: rgba(255,255,255,.72); padding: 6px 8px; }
.sidelink { display: flex; align-items: center; gap: 6px; padding: 2px 0; color: #215dc6; cursor: pointer; }
.sidelink:hover { text-decoration: underline; }
.sidelink svg { width: 15px; height: 15px; }
.explorer-view { flex: 1; background: #fff; overflow: auto; position: relative; padding: 4px; }
.explorer-view.icons { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 2px; }
.xfile {
  width: 76px; padding: 5px 2px; text-align: center; border: 1px solid transparent; cursor: default;
}
.xfile svg { width: 32px; height: 32px; display: block; margin: 0 auto 3px; }
.xfile .xname { font-size: 11px; line-height: 1.2; word-wrap: break-word; max-height: 27px; overflow: hidden; padding: 0 2px; }
.xfile:hover { background: #e8f0fd; border-color: #b8d2f5; }
.xfile.selected { background: #d3e2f7; border-color: #98b8e8; }
.xfile.rename input { width: 72px; font-size: 11px; text-align: center; }
.explorer-view.details { padding: 0; }
.xtable { width: 100%; border-collapse: collapse; }
.xtable th {
  text-align: left; font-weight: normal; font-size: 11px; padding: 2px 8px;
  background: linear-gradient(to bottom, #fff, #ece9d8); border: 1px solid #d4d0c8; border-left: none;
}
.xtable td { padding: 2px 8px; font-size: 11px; border-bottom: 1px solid #f0f0f0; white-space: nowrap; }
.xtable tr:hover td { background: #e8f0fd; }
.xtable tr.selected td { background: #316ac5; color: #fff; }
.xtable td svg { width: 16px; height: 16px; vertical-align: -4px; margin-right: 5px; }
.xrow { cursor: default; }
.mycomputer-note { padding: 30px; text-align: center; color: #666; }

/* ---------- Internet Explorer ---------- */
.ie-root { display: flex; flex-direction: column; flex: 1; overflow: hidden; }
.ie-page { flex: 1; overflow: auto; background: #fff; }
.ie-frame { padding: 0; user-select: text; -webkit-user-select: text; cursor: text; }
.ie-frame h1, .ie-frame h2, .ie-frame h3 { cursor: text; }
.ie-loading { display: flex; align-items: center; gap: 8px; padding: 20px; color: #555; }
.ie-spinner { width: 14px; height: 14px; border: 2px solid #ccc; border-top-color: #316ac5; border-radius: 50%; animation: iespin .8s linear infinite; }
@keyframes iespin { 100% { transform: rotate(360deg); } }
.ie-error { padding: 40px 60px; }
.ie-error h2 { font-size: 15px; margin-bottom: 10px; color: #000; }
.ie-error p { margin-bottom: 8px; line-height: 1.5; }
.ie-content a { color: #0000cc; cursor: pointer; }
.ie-content a:hover { color: #cc0000; }

/* ---------- Media Player ---------- */
.wmp-root { display: flex; flex-direction: column; flex: 1; background: linear-gradient(to bottom, #3d4a6b 0%, #232c47 100%); overflow: hidden; }
.wmp-top { display: flex; align-items: center; padding: 6px 12px 2px; gap: 8px; }
.wmp-title { color: #cfd9f2; font-size: 12px; font-weight: bold; letter-spacing: .5px; flex: 1; }
.wmp-vizwrap {
  flex: 1; margin: 6px 14px; border-radius: 6px; overflow: hidden; position: relative;
  background: radial-gradient(ellipse at 50% 60%, #101a38 0%, #05080f 100%);
  border: 1px solid #131a30; box-shadow: inset 0 0 22px rgba(0,0,0,.8);
}
#wmp-viz { width: 100%; height: 100%; display: block; }
.wmp-trackname {
  position: absolute; top: 8px; left: 12px; color: #9db8e8; font-size: 12px; text-shadow: 0 1px 2px #000;
}
.wmp-time { position: absolute; bottom: 8px; right: 12px; color: #7d9cd8; font-family: "Courier New", monospace; font-size: 13px; }
.wmp-controls {
  display: flex; align-items: center; gap: 8px; padding: 8px 16px 12px; justify-content: center;
}
.wmp-btn {
  width: 34px; height: 30px; border-radius: 15px; border: 1px solid #55648f; cursor: pointer;
  background: linear-gradient(to bottom, #5a6b99, #3a4a76 55%, #2c3a60);
  color: #dfe7fa; display: flex; align-items: center; justify-content: center; font-size: 11px;
  box-shadow: inset 0 1px 1px rgba(255,255,255,.3), 0 1px 2px rgba(0,0,0,.4);
}
.wmp-btn:hover { filter: brightness(1.25); }
.wmp-btn:active { filter: brightness(.8); }
.wmp-btn.big { width: 42px; height: 34px; }
.wmp-seek {
  flex: 1; max-width: 300px; height: 8px; -webkit-appearance: none; appearance: none; border-radius: 4px;
  background: linear-gradient(to bottom, #161d33, #232f52); outline: none; border: 1px solid #101728;
}
.wmp-seek::-webkit-slider-thumb {
  -webkit-appearance: none; width: 10px; height: 16px; border-radius: 4px;
  background: linear-gradient(to bottom, #b8c8ee, #7d93c8); border: 1px solid #33415f;
}
.wmp-playlist {
  height: 92px; margin: 0 14px 10px; overflow-y: auto; border: 1px solid #131a30; border-radius: 4px;
  background: rgba(6,10,22,.85);
}
.wmp-pl-item { padding: 3px 10px; color: #b7c6e8; font-size: 11px; cursor: default; display: flex; justify-content: space-between; }
.wmp-pl-item:hover { background: rgba(90,120,200,.25); }
.wmp-pl-item.playing { background: rgba(90,120,200,.4); color: #fff; }
.wmp-pl-item .dur { color: #6f83b5; }

/* ---------- Control Panel / Display Properties ---------- */
.cp-root { display: flex; flex-direction: column; flex: 1; overflow: hidden; background: var(--face); }
.cp-grid { flex: 1; overflow-y: auto; background: #fff; display: flex; flex-wrap: wrap; align-content: flex-start; padding: 10px; gap: 4px; }
.cp-item { width: 130px; display: flex; flex-direction: column; align-items: center; padding: 12px 6px 8px; gap: 7px; cursor: default; border: 1px solid transparent; }
.cp-item svg { width: 34px; height: 34px; }
.cp-item:hover { background: #e8f0fd; border-color: #b8d2f5; }
.cp-item span { font-size: 11px; text-align: center; }
.tabs { display: flex; padding: 6px 8px 0; gap: 1px; background: var(--face); flex: 0 0 auto; }
.tab {
  padding: 4px 14px 5px; border: 1px solid #919b9c; border-bottom: none; border-radius: 4px 4px 0 0;
  background: linear-gradient(to bottom, #f5f4ec, #e3e1d2); cursor: default; position: relative; top: 1px;
}
.tab.active { background: #fff; padding: 5px 14px 6px; top: 0; border-radius: 4px 4px 0 0; margin-top: -2px; z-index: 2; font-weight: bold; }
.tabpanel { flex: 1; background: #fff; border-top: 1px solid #919b9c; overflow-y: auto; padding: 14px; position: relative; }
.dprop-monitor {
  width: 150px; height: 112px; margin: 0 auto 14px; border-radius: 4px; position: relative;
  background: linear-gradient(to bottom, #d8d8d8, #b0b0b0); border: 1px solid #888;
  display: flex; align-items: center; justify-content: center; flex-direction: column;
}
.dprop-screen {
  width: 120px; height: 82px; border: 2px solid #666; border-radius: 2px; overflow: hidden; position: relative;
  background: #3a6ea5;
}
.dprop-screen img, .dprop-screen canvas { width: 100%; height: 100%; object-fit: cover; display: block; }
.dprop-screen .none-x {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 30px; background: repeating-linear-gradient(45deg, #3a6ea5 0 8px, #2f5d8a 8px 16px);
}
.bglist { border: 1px solid #7f9db9; height: 130px; overflow-y: auto; background: #fff; margin-bottom: 8px; }
.bglist .bgitem { padding: 2px 6px; cursor: default; }
.bglist .bgitem.selected { background: #316ac5; color: #fff; }
.scheme-preview-row { display: flex; gap: 14px; margin-bottom: 12px; align-items: flex-start; }
.scheme-box {
  width: 90px; height: 62px; border: 1px solid #888; position: relative; overflow: hidden; border-radius: 3px;
}
.scheme-sample-title { height: 16px; display: flex; align-items: center; padding: 0 4px; gap: 3px; }
.scheme-sample-title i { display: block; width: 8px; height: 8px; border-radius: 2px; margin-left: auto; }
.scheme-sample-body { position: absolute; inset: 16px 0 0; }
.scheme-sample-taskbar { position: absolute; bottom: 0; left: 0; right: 0; height: 9px; }
.scheme-sample-start { width: 22px; height: 7px; margin: 1px; border-radius: 2px; background: #3e9c3e; }

/* ---------- Shutdown dialogs ---------- */
.turnoff-dlg .dlg-content { padding: 0; display: block; }
.turnoff-inner {
  width: 340px; padding: 24px 20px 16px;
  background: linear-gradient(to bottom, #2a55c0, #1a3a90);
  display: flex; justify-content: center; gap: 28px;
}
.to-opt { display: flex; flex-direction: column; align-items: center; gap: 7px; cursor: default; color: #fff; }
.to-opt.disabled { opacity: .4; pointer-events: none; }
.to-circle {
  width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 19px; color: #fff;
  box-shadow: inset 0 2px 3px rgba(255,255,255,.45), inset 0 -2px 3px rgba(0,0,0,.3), 0 2px 5px rgba(0,0,0,.5);
  border: 2px solid rgba(255,255,255,.6);
}
.to-opt:hover .to-circle { filter: brightness(1.2); }
.to-opt:active .to-circle { filter: brightness(.85); }
.to-circle.standby { background: linear-gradient(to bottom, #f8b13c, #d07800); }
.to-circle.turnoff { background: linear-gradient(to bottom, #e8847c, #b23225); }
.to-circle.restart { background: linear-gradient(to bottom, #8fd86f, #3d9b3d); }
.to-label { font-size: 12px; font-weight: bold; text-shadow: 1px 1px 2px rgba(0,0,0,.6); }
.turnoff-foot { background: linear-gradient(to bottom, #1a3a90, #122a6c); padding: 10px 14px; text-align: right; }

/* log off dialog */
.logoff-inner { width: 300px; padding: 22px 20px; background: linear-gradient(to bottom, #2a55c0, #1a3a90); display: flex; justify-content: center; gap: 24px; }
.logoff-opt { display: flex; flex-direction: column; align-items: center; gap: 7px; color: #fff; cursor: default; }
.logoff-circle { width: 44px; height: 44px; border-radius: 8px; border: 2px solid rgba(255,255,255,.6); display: flex; align-items: center; justify-content: center; font-size: 19px; color: #fff; box-shadow: inset 0 2px 3px rgba(255,255,255,.4), 0 2px 5px rgba(0,0,0,.5); }
.logoff-circle.switch { background: linear-gradient(to bottom, #8fd86f, #3d9b3d); }
.logoff-circle.logoff { background: linear-gradient(to bottom, #f8b13c, #c57600); }
.logoff-opt:hover .logoff-circle { filter: brightness(1.2); }
.logoff-opt.disabled { opacity: .4; pointer-events: none; }

/* end program dialog */
.endprog-bar { height: 14px; border: 1px solid #919b9c; background: #fff; width: 220px; margin: 8px 0; }
.endprog-fill { height: 100%; width: 0%; background: repeating-linear-gradient(90deg, #3d9b3d 0 8px, #54b054 8px 10px); transition: width 5s linear; }

/* properties dialog */
.props-grid { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; padding: 4px 0 10px; }
.props-grid dt { font-weight: normal; color: #333; }
.props-grid dd { user-select: text; -webkit-user-select: text; }
.props-ico { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.props-ico svg { width: 32px; height: 32px; }

/* hung app */
.hungapp-root { flex: 1; padding: 14px; background: #fff; line-height: 1.6; user-select: text; -webkit-user-select: text; overflow: auto; }
.hungapp-root .spinner { display: inline-block; width: 13px; height: 13px; border: 2px solid #ccc; border-top-color: #316ac5; border-radius: 50%; animation: iespin .9s linear infinite; vertical-align: -2px; margin-right: 6px; }

/* run dialog */
.run-row { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.run-row input { flex: 1; }
