* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #111;
  overflow: hidden;
}

button,
input,
a {
  font: inherit;
}

a {
  color: inherit;
}

.hidden {
  display: none;
}

.desktop {
  width: 100vw;
  height: 100vh;
  background-image: url("../images/background.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  color: #ffffff;
  overflow: hidden;
}

.taskbar {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 56px;
  background: rgba(20, 20, 30, 0.88);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  backdrop-filter: blur(10px);
  z-index: 1000;
}

.taskbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  overflow: hidden;
}

.start-button {
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.start-button img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  display: block;
}

.taskbar-pages {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.taskbar-pages::-webkit-scrollbar {
  display: none;
}

.taskbar-item {
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  flex-shrink: 0;
  transition: background 0.2s ease;
}

.taskbar-item:hover {
  background: rgba(255, 255, 255, 0.18);
}

.taskbar-item.active {
  background: rgba(255, 255, 255, 0.24);
}

.taskbar-item img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.taskbar-right {
  font-size: 14px;
  flex-shrink: 0;
  margin-left: 12px;
  min-width: 48px;
  text-align: right;
}

.start-menu {
  position: fixed;
  left: 14px;
  bottom: 64px;
  width: 280px;
  max-width: calc(100vw - 28px);
  background: rgba(28, 28, 40, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  z-index: 1100;
  backdrop-filter: blur(14px);
}

.start-menu-header {
  padding: 14px 16px;
  font-weight: bold;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.start-menu-list {
  display: flex;
  flex-direction: column;
  padding: 10px;
}

.start-menu-item {
  border: none;
  background: transparent;
  color: #fff;
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease;
}

.start-menu-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.start-menu-item img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
}

.desktop-area {
  position: absolute;
  top: 20px;
  left: 20px;
  right: 20px;
  bottom: 76px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  align-content: flex-start;
  flex-wrap: wrap;
  gap: 20px;
  overflow: hidden;
}

.desktop-icon {
  width: 92px;
  border: none;
  background: transparent;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  text-align: center;
  padding: 6px;
  border-radius: 12px;
  text-decoration: none;
  flex-shrink: 0;
  transition: background 0.2s ease;
}

.desktop-icon:hover {
  background: rgba(255, 255, 255, 0.08);
}

.desktop-icon img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  display: block;
}

.desktop-icon span {
  font-size: 13px;
  line-height: 1.35;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.75);
  word-break: break-word;
}

.window {
  position: relative;
  margin: 28px 24px 90px 140px;
  width: min(820px, calc(100vw - 180px));
  max-height: calc(100vh - 130px);
  background: rgba(250, 250, 255, 0.97);
  color: #222;
  border: 1px solid #b8bfd3;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

.home-window {
  min-height: 260px;
}

.content-window {
  min-height: 320px;
}

.post-window {
  max-width: 900px;
}

.window-header {
  background: linear-gradient(90deg, #ff9ec4, #ffd7e6);
  color: #4b2a37;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  font-weight: bold;
}

.window-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.window-title img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex-shrink: 0;
}

.window-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.window-control {
  border: none;
  background: #ffffff;
  color: #444;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: default;
  font-size: 18px;
  line-height: 1;
}

.window-control.is-disabled {
  opacity: 0.45;
}

.window-body {
  padding: 20px;
  max-height: calc(100vh - 190px);
  overflow: auto;
}

.post-list {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}

.post-card {
  background: #ffffff;
  border: 1px solid #d9dce8;
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

.post-card h2 {
  margin-top: 6px;
  margin-bottom: 8px;
}

.post-date {
  font-size: 13px;
  color: #666;
  margin: 0;
}

.post-link {
  display: inline-block;
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #ff77aa;
  color: #fff;
  text-decoration: none;
}

.secret-form {
  display: flex;
  gap: 8px;
  margin: 16px 0;
}

.secret-form input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #bbb;
  border-radius: 8px;
}

.secret-form button {
  border: none;
  background: #ff77aa;
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
}

#secretMessage {
  min-height: 24px;
  font-weight: bold;
  margin-bottom: 12px;
}

#secretContent {
  padding: 14px;
  border-radius: 12px;
  background: #fff4fa;
  border: 1px solid #f3bfd4;
}

@media (max-width: 900px) {
  .desktop-area {
    top: 12px;
    left: 12px;
    right: 12px;
    bottom: 72px;
    gap: 16px;
  }

  .window {
    margin: 12px 12px 82px 12px;
    width: calc(100vw - 24px);
    max-height: calc(100vh - 106px);
  }

  .window-body {
    max-height: calc(100vh - 166px);
  }
}

@media (max-width: 768px) {
  html,
  body {
    overflow: hidden;
  }

  .taskbar {
    height: 60px;
    padding: 0 8px;
  }

  .taskbar-left {
    gap: 8px;
    min-width: 0;
    flex: 1;
  }

  .taskbar-right {
    font-size: 12px;
    margin-left: 8px;
    min-width: 42px;
  }

  .start-button {
    width: 40px;
    height: 40px;
  }

  .start-button img {
    width: 40px;
    height: 40px;
  }

  .taskbar-pages {
    gap: 6px;
    max-width: 100%;
  }

  .taskbar-item {
    height: 34px;
    padding: 0 10px;
    gap: 6px;
    border-radius: 9px;
    max-width: 140px;
    font-size: 12px;
  }

  .taskbar-item img {
    width: 18px;
    height: 18px;
  }

  .taskbar-item span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .start-menu {
    left: 8px;
    right: 8px;
    bottom: 68px;
    width: auto;
    max-width: none;
    border-radius: 14px;
  }

  .start-menu-header {
    padding: 12px 14px;
    font-size: 14px;
  }

  .start-menu-list {
    padding: 8px;
  }

  .start-menu-item {
    padding: 12px 10px;
    gap: 10px;
    border-radius: 10px;
    font-size: 14px;
  }

  .start-menu-item img {
    width: 24px;
    height: 24px;
  }

  .desktop-area {
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 74px;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-content: flex-start;
    align-items: flex-start;
    gap: 14px 10px;
  }

  .desktop-icon {
    width: 78px;
    padding: 4px;
    gap: 6px;
  }

  .desktop-icon img {
    width: 52px;
    height: 52px;
  }

  .desktop-icon span {
    font-size: 11px;
    line-height: 1.3;
  }

  .window {
    margin: 12px 8px 76px 8px;
    width: calc(100vw - 16px);
    max-height: calc(100vh - 88px);
    border-radius: 12px;
  }

  .window-header {
    padding: 10px 10px;
  }

  .window-title {
    gap: 8px;
  }

  .window-title img {
    width: 20px;
    height: 20px;
  }

  .window-title span {
    font-size: 14px;
  }

  .window-controls {
    gap: 6px;
  }

  .window-control {
    width: 28px;
    height: 28px;
    font-size: 16px;
    border-radius: 7px;
  }

  .window-body {
    padding: 14px;
    max-height: calc(100vh - 140px);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  .window-body h1 {
    font-size: 22px;
    margin-top: 0;
  }

  .post-list {
    gap: 12px;
    margin-top: 16px;
  }

  .post-card {
    padding: 14px;
    border-radius: 12px;
  }

  .post-card h2 {
    font-size: 18px;
  }

  .post-date {
    font-size: 12px;
  }

  .post-link {
    padding: 9px 12px;
    font-size: 14px;
  }

  .secret-form {
    flex-direction: column;
    gap: 10px;
  }

  .secret-form input,
  .secret-form button {
    width: 100%;
  }
}