/* =========================================
   OS LAYOUT & DESKTOP (Not covered by 7.css)
   ========================================= */
body {
  margin: 0;
  padding: 0;
  overflow: hidden;
  height: 100vh;
  width: 100vw;
  font-family: "Segoe UI", Tahoma, sans-serif;
  background: url("../images/1566336.jpg") no-repeat center center fixed;
  background-size: cover;
}

#desktop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 40px;
  padding: 10px;
  z-index: 1;
}

.icon {
  width: 74px;
  text-align: center;
  color: white;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
  border: 1px solid transparent;
  padding: 5px;
  border-radius: 3px;
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: background 0.1s, border-color 0.1s;
  cursor: default;
}

.icon:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.icon img {
  width: 48px;
  height: 48px;
  margin-bottom: 2px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
}

.icon span {
  font-size: 11px;
  line-height: 1.25;
  user-select: none;
}

/* Taskbar */
#taskbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: rgba(10, 25, 45, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  padding-left: 55px;
  z-index: 10000;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

#start-orb {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 54px;
  height: 54px;
  z-index: 10002;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.orb-graphic {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, #1e3c5a, #0a1525);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.5), inset 0 0 10px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.2s;
}

.orb-graphic:hover {
  box-shadow: 0 0 15px rgba(50, 150, 255, 0.6), inset 0 0 5px rgba(255, 255, 255, 0.3);
}

.orb-graphic img {
  width: 28px;
  height: 28px;
}

#task-list {
  display: flex;
  height: 100%;
  align-items: center;
  padding-top: 2px;
}

.task-entry {
  width: 160px;
  height: 36px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  margin-right: 2px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  color: white;
  font-size: 12px;
  text-shadow: 0 0 2px black;
  box-shadow: inset 0 0 5px rgba(255, 255, 255, 0.05);
  transition: background 0.1s;
  cursor: pointer;
  user-select: none;
}

.task-entry:hover {
  background: rgba(255, 255, 255, 0.2);
}

.task-entry.active {
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1));
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.task-entry img {
  width: 18px;
  height: 18px;
  margin-right: 6px;
}

#tray {
  margin-left: auto;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 15px;
  color: white;
  font-size: 11px;
  user-select: none;
  text-align: right;
}

/* Context Menu */
.context-menu {
  position: absolute;
  background: white;
  border: 1px solid #ccc;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
  z-index: 10001;
  display: none;
  min-width: 150px;
}

.context-menu-item {
  padding: 5px 10px;
  cursor: pointer;
  user-select: none;
  font-size: 11px;
}

.context-menu-item:hover {
  background: #e8f4fd;
}

/* Start Menu */
#start-menu {
  position: fixed;
  bottom: 42px;
  left: 0;
  width: 400px;
  height: 520px;
  background: rgba(240, 248, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 6px 6px 0 0;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
  z-index: 9999;
  display: none;
  flex-direction: row;
  overflow: hidden;
}

.sm-left {
  width: 60%;
  padding: 8px;
  background: white;
  border-right: 1px solid #d9d9d9;
  display: flex;
  flex-direction: column;
}

.sm-right {
  width: 40%;
  padding: 8px;
  background: #f0f0f0;
  border-left: 1px solid white;
  color: #1e3a5f;
}

.sm-item {
  padding: 6px 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 3px;
  font-size: 11px;
  color: #1e3a5f;
  cursor: pointer;
  user-select: none;
}

.sm-item:hover {
  background: #e8f4fd;
  border: 1px solid #d9d9d9;
}

.sm-item img {
  width: 24px;
  height: 24px;
}

/* =========================================
   7.css Overrides & Window Positioning Fix
   ========================================= */

/* CRITICAL FIX: Override 7.css position:relative so windows float freely */
.window {
  position: absolute !important;
  display: flex;
  flex-direction: column;
}

.title-bar-text,
.sm-right * {
  user-select: none;
}

.title-bar-text {
  text-shadow: none !important;
}

/* Resize Handles */
.resize-handle {
  position: absolute;
  background: transparent;
  z-index: 10;
}

.resize-handle.nw {
  top: 0;
  left: 0;
  width: 8px;
  height: 8px;
  cursor: nw-resize;
}

.resize-handle.ne {
  top: 0;
  right: 0;
  width: 8px;
  height: 8px;
  cursor: ne-resize;
}

.resize-handle.sw {
  bottom: 0;
  left: 0;
  width: 8px;
  height: 8px;
  cursor: sw-resize;
}

.resize-handle.se {
  bottom: 0;
  right: 0;
  width: 8px;
  height: 8px;
  cursor: se-resize;
}

.resize-handle.n {
  top: 0;
  left: 8px;
  right: 8px;
  height: 4px;
  cursor: n-resize;
}

.resize-handle.s {
  bottom: 0;
  left: 8px;
  right: 8px;
  height: 4px;
  cursor: s-resize;
}

.resize-handle.w {
  top: 8px;
  left: 0;
  bottom: 8px;
  width: 4px;
  cursor: w-resize;
}

.resize-handle.e {
  top: 8px;
  right: 0;
  bottom: 8px;
  width: 4px;
  cursor: e-resize;
}

/* Browser window title bar override */
.window[key="czarny"] .title-bar {
  background: linear-gradient(to bottom, #003399, #001133) !important;
  background-color: #003399 !important;
  color: white !important;
}

.window[key="czarny"] .title-bar-text {
  color: white !important;
  font-family: "Segoe UI", Tahoma, sans-serif !important;
  font-size: 9pt !important;
  font-weight: normal !important;
}

.window.minimized {
  display: none;
}

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

.window-body {
  flex: 1;
  overflow: auto;
  margin: 0 !important;
}

button {
  font-family: inherit;
}

/* Calculator */
.calc-btn {
  padding: 15px;
  font-size: 18px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 5px;
  color: white;
  cursor: pointer;
  transition: all 0.2s;
}

.calc-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.calc-op {
  background: rgba(255, 165, 0, 0.3);
}

.calc-equals {
  background: rgba(46, 204, 113, 0.3);
}

/* Global Title Bar Text Override (for Aero theme) */
.title-bar-text {
  color: white !important;
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.8) !important;
}