/* ============ 增强 Windows XP Luna 拟真度 ============ */

/* 窗口主体：Luna 蓝色主题 */
.window {
  position: absolute;
  display: flex;
  flex-direction: column;
  min-width: 320px;
  max-width: 92vw;
  max-height: calc(100vh - 60px);
  background: #ece9d8; /* XP Luna 窗口背景 */
  border: 3px solid;
  border-color: #0054e3 #003c9e #003c9e #0054e3; /* 立体边框 */
  border-radius: 8px 8px 0 0;
  box-shadow: 
    0 0 0 1px rgba(255,255,255,0.3) inset,
    4px 4px 24px rgba(0,0,0,0.5),
    0 0 0 1px rgba(0,0,0,0.15);
  pointer-events: auto;
  overflow: hidden;
}
.window.dragging { opacity: .96; }

/* 标题栏：经典 Luna 蓝色渐变 */
.title-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  flex: none;
  padding: 0 6px 0 8px;
  background: linear-gradient(to bottom, 
    #0997ff 0%,
    #0053ee 8%,
    #0050ee 40%,
    #06f 100%
  );
  border-bottom: 1px solid #003c9e;
  border-radius: 5px 5px 0 0;
  color: #fff;
  cursor: move;
}
.window:not(.is-active) .title-bar {
  background: linear-gradient(to bottom, #7a96df 0%, #5478c4 50%, #3c5d9e 100%);
}
.title-bar .ico { width: 16px; height: 16px; flex: none; }
.title-bar .label {
  flex: 1;
  font-family: "Trebuchet MS", "Tahoma", sans-serif;
  font-weight: 700;
  font-size: 12px;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.6);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* 控制按钮：经典 XP 按钮样式 */
.title-bar .ctrl {
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  background: linear-gradient(to bottom, #f5f5f5 0%, #dfe1e4 50%, #d3d7dc 100%);
  border: 1px solid;
  border-color: #fff #888 #888 #fff;
  border-radius: 2px;
  color: #000;
  cursor: pointer;
  flex: none;
}
.title-bar .ctrl:hover {
  background: linear-gradient(to bottom, #ffeaa7 0%, #ffd700 50%, #ffc107 100%);
}
.title-bar .ctrl:active {
  background: linear-gradient(to bottom, #d3d7dc 0%, #dfe1e4 100%);
  border-color: #888 #fff #fff #888;
}
.title-bar .ctrl.close {
  background: linear-gradient(to bottom, #ff9999 0%, #ff6666 50%, #ff3333 100%);
  color: #fff;
}
.title-bar .ctrl.close:hover {
  background: linear-gradient(to bottom, #ffbbbb 0%, #ff8888 50%, #ff5555 100%);
}
