* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  font-family: Tahoma, Verdana, Arial, sans-serif;
}

.desktop {
  position: relative;
  width: 100%;
  height: calc(100% - 40px);
  background-image: url("./resources/wallpapers/wallpaper.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-bottom: 1px solid #17336e;
}

.desktop::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 15%, rgba(255, 255, 255, 0.2), transparent 35%),
    radial-gradient(circle at 70% 10%, rgba(255, 255, 255, 0.16), transparent 30%);
  pointer-events: none;
}

.desktop-icons {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 5;
}

.desktop-icons td {
  padding-bottom: 8px;
}

.desktop-icon {
  width: 94px;
  min-height: 88px;
  border: 1px solid transparent;
  background: transparent;
  color: #fff;
  text-align: center;
  cursor: pointer;
  padding: 6px 3px;
}

.desktop-icon:hover {
  background: rgba(0, 98, 255, 0.25);
  border: 1px dotted #d9ecff;
}

.icon-pic {
  display: block;
  margin-bottom: 6px;
}

.icon-pic img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.icon-title {
  display: inline-block;
  font-size: 12px;
  line-height: 1.2;
  text-shadow: 0 1px 2px #000;
}

.xp-window {
  position: absolute;
  left: 180px;
  top: 64px;
  width: 840px;
  height: 560px;
  min-width: 420px;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  border: 1px solid #0c2d6d;
  border-radius: 7px 7px 0 0;
  background: #ece9d8;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
  resize: both;
  overflow: auto;
  z-index: 20;
}

.window-titlebar {
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5px 0 8px;
  border-bottom: 1px solid #1f4ca1;
  border-radius: 7px 7px 0 0;
  background: linear-gradient(180deg, #3d8cf6 0%, #1f63d1 45%, #1548a4 100%);
  color: #fff;
  user-select: none;
  cursor: move;
}

.title-left {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.window-icon img {
  width: 15px;
  height: 15px;
  object-fit: contain;
}

.window-title {
  font-size: 12px;
  font-weight: bold;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.title-right {
  display: flex;
  align-items: center;
  gap: 2px;
}

.title-btn {
  width: 21px;
  height: 21px;
  border: none;
  padding: 0;
  cursor: pointer;
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

#bioMinimizeBtn {
  background-image: url("./icon/minimize.svg");
}

#bioMinimizeBtn:hover {
  background-image: url("./icon/minimize-hover.svg");
}

#bioMinimizeBtn:active {
  background-image: url("./icon/minimize-active.svg");
}

#bioCloseBtn {
  background-image: url("./icon/close.svg");
}

#bioCloseBtn:hover {
  background-image: url("./icon/close-hover.svg");
}

#bioCloseBtn:active {
  background-image: url("./icon/close-active.svg");
}

.window-menubar {
  height: 26px;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 6px;
  background: #ece9d8;
  border-bottom: 1px solid #c6c2b3;
}

.window-menubar button {
  border: 1px solid transparent;
  background: transparent;
  color: #111;
  padding: 3px 7px;
  font-size: 12px;
  cursor: pointer;
}

.window-menubar button:hover {
  border: 1px solid #7da2ce;
  background: #dce7f7;
}

.window-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border-bottom: 1px solid #c6c2b3;
  background: linear-gradient(180deg, #f8f7f0, #e8e4d6);
}

.retro-btn {
  border: 1px solid #7f9db9;
  border-top-color: #fff;
  border-left-color: #fff;
  background: linear-gradient(180deg, #fff, #dfe8f3);
  color: #001a3a;
  padding: 4px 8px;
  font-size: 12px;
  cursor: pointer;
}

.retro-btn:active {
  border-top-color: #7f9db9;
  border-left-color: #7f9db9;
  border-right-color: #fff;
  border-bottom-color: #fff;
}

.address-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border-bottom: 1px solid #c6c2b3;
  background: #ece9d8;
  color: #222;
  font-size: 12px;
}

.address-row input {
  flex: 1;
  min-width: 100px;
  height: 24px;
  border: 1px solid #7f9db9;
  background: #fff;
  color: #111;
  padding: 2px 6px;
  font-size: 12px;
}

.window-content {
  flex: 1;
  background: #fff;
  color: #202020;
  overflow: auto;
  padding: 16px;
}

.bio-page h1 {
  margin: 0 0 12px;
  color: #1f3f7a;
  border-bottom: 2px solid #c7d7ef;
  padding-bottom: 8px;
}

.bio-page h2 {
  margin-top: 20px;
  color: #234f96;
}

.bio-page p,
.bio-page li {
  line-height: 1.5;
  font-size: 15px;
}

.statusbar {
  height: 24px;
  padding: 4px 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #c6c2b3;
  background: #ece9d8;
  color: #2d2d2d;
  font-size: 11px;
}

.start-menu {
  position: fixed;
  left: 0;
  bottom: 40px;
  width: 390px;
  border: 1px solid #19459b;
  border-radius: 6px 6px 0 0;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  z-index: 100;
  display: none;
}

.start-menu.show {
  display: block;
}

.start-header {
  height: 58px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  background: linear-gradient(180deg, #2f7be5 0%, #0d58c3 100%);
  color: #fff;
  font-size: 20px;
  font-weight: bold;
}

.start-header img {
  width: 36px;
  height: 36px;
  border-radius: 3px;
  background: #fff;
  padding: 2px;
  object-fit: contain;
}

.start-body {
  display: grid;
  grid-template-columns: 1fr 165px;
  min-height: 320px;
}

.start-left {
  background: #fff;
  padding: 8px;
}

.start-right {
  background: linear-gradient(180deg, #d7e8ff 0%, #c5ddff 100%);
  border-left: 1px solid #9bb9e6;
  padding: 8px 6px;
}

.start-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: #111;
  text-align: left;
  padding: 6px;
  cursor: pointer;
  border-radius: 2px;
}

.start-item img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.start-item:hover {
  background: #2e73dc;
  color: #fff;
}

.start-item div {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.start-item small {
  font-size: 11px;
  opacity: 0.9;
}

.start-left hr {
  border: 0;
  border-top: 1px solid #e3e3e3;
  margin: 8px 0;
}

.all-programs {
  font-weight: bold;
}

.start-side-item {
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  color: #12386e;
  text-align: left;
  padding: 7px 8px;
  font-size: 13px;
  cursor: pointer;
  border-radius: 2px;
}

.start-side-item:hover {
  background: #2e73dc;
  color: #fff;
}

.start-footer {
  height: 44px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
  background: linear-gradient(180deg, #2f7be5 0%, #0d58c3 100%);
}

.footer-btn {
  height: 28px;
  border: 1px solid #80aef1;
  background: linear-gradient(180deg, #fff, #d7e7ff);
  color: #083e8a;
  font-size: 12px;
  padding: 0 10px;
  cursor: pointer;
  border-radius: 3px;
}

.footer-btn.danger {
  color: #8a1808;
}

.taskbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 40px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 6px;
  background: linear-gradient(180deg, #3068d6 0%, #1f4fb6 45%, #153b95 100%);
  border-top: 1px solid #7ca7f8;
  z-index: 90;
}

.start-btn {
  height: 32px;
  min-width: 108px;
  border-radius: 16px;
  border: 1px solid #2d6e19;
  background: linear-gradient(180deg, #63c84d 0%, #3ca02c 65%, #2f7f23 100%);
  color: #fff;
  font-size: 19px;
  font-style: italic;
  font-weight: bold;
  text-shadow: 0 1px 1px #234f16;
  cursor: pointer;
  padding: 0 14px 0 10px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.start-btn img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  border-radius: 2px;
}

.start-btn.active {
  filter: brightness(0.9);
}

.task-btn {
  height: 30px;
  min-width: 170px;
  max-width: 280px;
  border: 1px solid #7ca7f8;
  background: linear-gradient(180deg, #4d86ef, #2a5fc7);
  color: #fff;
  font-size: 12px;
  text-align: left;
  padding: 0 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.task-btn img {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.task-btn.active {
  background: linear-gradient(180deg, #7ea9f7, #3f74dd);
  border-color: #cde0ff;
}

.tray {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border: 1px solid rgba(0, 0, 0, 0.25);
  background: rgba(255, 255, 255, 0.16);
  height: 30px;
}

.tray-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffd447;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.45);
}

.taskbar-clock {
  min-width: 46px;
  text-align: center;
  color: #ecf4ff;
  font-size: 12px;
}

@media (max-width: 1000px) {
  .xp-window {
    left: 110px;
    top: 52px;
    width: calc(100% - 130px);
    height: calc(100% - 120px);
    min-width: 320px;
  }

  .start-menu {
    width: 340px;
  }

  .start-body {
    grid-template-columns: 1fr 140px;
  }
}
