* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Tahoma', sans-serif;
  overflow: hidden;
  height: 100vh;
  background: #5da3db url('assets/bliss.png') center/cover no-repeat;
  user-select: none;
}

.desktop {
  height: calc(100vh - 30px);
  position: relative;
}

.icon {
  width: 80px;
  text-align: center;
  padding: 8px;
  cursor: pointer;
  position: absolute;
}

.icon:hover {
  background: rgba(255, 255, 255, 0.3);
  border: 1px dotted #fff;
}

.icon img {
  width: 48px;
  height: 48px;
  margin-bottom: 4px;
  image-rendering: pixelated;
}

.icon-label {
  color: white;
  font-size: 11px;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
  word-wrap: break-word;
}

.window {
  position: absolute;
  background: #ECE9D8;
  border: 3px solid;
  border-color: #0054E3 #003CC4 #003CC4 #0054E3;
  box-shadow: 4px 4px 10px rgba(0,0,0,0.4);
  min-width: 400px;
  min-height: 300px;
  display: none;
}

.window.active {
  display: block;
  z-index: 1000;
}

.title-bar {
  background: linear-gradient(to bottom, #0997FF 0%, #0053EE 8%, #0050EE 40%, #06F 88%, #06F 93%, #1A4FBE 95%, #003DD1 96%);
  padding: 3px 4px 3px 4px;
  cursor: move;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 28px;
}

.title-text {
  color: white;
  font-weight: bold;
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 4px;
  text-shadow: 1px 1px 1px rgba(0,0,0,0.5);
  padding-left: 2px;
}

.title-buttons {
  display: flex;
  gap: 2px;
}

.title-btn {
  width: 21px;
  height: 21px;
  background: linear-gradient(to bottom, #FEAC5E 0%, #FF8B00 90%);
  border: 1px solid #fff;
  border-right-color: #7A3D06;
  border-bottom-color: #7A3D06;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
}

.title-btn:hover {
  background: linear-gradient(to bottom, #FFCD8B 0%, #FFA040 90%);
}

.title-btn:active {
  background: linear-gradient(to bottom, #FF8B00 0%, #FEAC5E 90%);
  border: 1px solid #7A3D06;
  border-right-color: #fff;
  border-bottom-color: #fff;
}

.window-content {
  padding: 16px;
  height: calc(100% - 28px);
  overflow-y: auto;
  background: white;
}

.folder-view {
  display: grid;
  grid-template-columns: repeat(auto-fill, 100px);
  gap: 16px;
  padding: 16px;
}

.folder {
  text-align: center;
  cursor: pointer;
  padding: 8px;
}

.folder:hover {
  background: #E0E0FF;
  border: 1px dotted #0054E3;
}

.folder img {
  width: 48px;
  height: 48px;
  image-rendering: pixelated;
}

.folder-label {
  font-size: 11px;
  margin-top: 4px;
}

.taskbar {
  height: 30px;
  background: linear-gradient(to bottom, #245EDC 0%, #3F8CF3 9%, #245EDC 18%, #245EDC 92%, #1941A5 93%);
  border-top: 1px solid #1941A5;
  display: flex;
  align-items: center;
  padding: 0 2px;
  position: fixed;
  bottom: 0;
  width: 100%;
  z-index: 10000;
}

.start-btn {
  background: linear-gradient(to bottom, #5EBF68 0%, #3FA547 50%, #2F8D3B 51%, #3FA547 100%);
  border: 1px solid #16591C;
  border-radius: 6px;
  padding: 3px 10px 3px 4px;
  color: white;
  font-weight: bold;
  font-style: italic;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  text-shadow: 1px 1px 1px rgba(0,0,0,0.4);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.3);
  height: 24px;
}

.start-flag {
  height: 18px;
  width: auto;
  display: block;
}

.start-btn:hover {
  background: linear-gradient(to bottom, #6BD074 0%, #50C05A 50%, #3FA547 51%, #50C05A 100%);
}

.start-btn:active {
  background: linear-gradient(to bottom, #2F8D3B 0%, #3FA547 50%, #50C05A 51%, #5EBF68 100%);
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.3);
}

.taskbar-items {
  flex: 1;
  display: flex;
  gap: 4px;
  margin-left: 8px;
}

.taskbar-item {
  background: linear-gradient(to bottom, #3C8CF3 0%, #2373E8 9%, #245EDC 18%, #245EDC 92%, #1941A5 93%);
  border: 1px solid #1941A5;
  border-radius: 3px;
  padding: 3px 8px;
  color: white;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 1px 1px 1px rgba(0,0,0,0.3);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
}

.taskbar-item:hover {
  background: linear-gradient(to bottom, #5AA4FF 0%, #3D8BF0 9%, #3680E8 18%, #3680E8 92%, #2563C7 93%);
}

.system-tray {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding: 0 8px;
  background: linear-gradient(to bottom, #0EB5EE 0%, #12A6DD 9%, #0F9BCB 18%, #0F9BCB 92%, #0C7BA5 93%);
  border: 1px solid #0C7BA5;
  border-radius: 3px;
  height: 22px;
  color: white;
  font-size: 11px;
  text-shadow: 1px 1px 1px rgba(0,0,0,0.3);
}

.start-menu {
  position: absolute;
  bottom: 30px;
  left: 0;
  width: 380px;
  background: white;
  border: 3px solid;
  border-color: #2B5FBD #2B5FBD #2B5FBD #2B5FBD;
  border-radius: 8px 8px 0 0;
  display: none;
  box-shadow: 4px 4px 12px rgba(0,0,0,0.5);
}

.start-menu.active {
  display: block;
}

.start-menu-header {
  background: linear-gradient(180deg, #4284F5 0%, #2968E5 50%, #1753D1 100%);
  color: white;
  padding: 12px 8px;
  font-weight: bold;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 18px;
  width: 50px;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
  border-radius: 6px 0 0 0;
}

.content-section {
  line-height: 1.6;
}

.content-section h2 {
  color: #0054E3;
  margin-bottom: 12px;
  font-size: 18px;
}

.content-section p {
  margin-bottom: 12px;
}

.project-item {
  background: #F0F0F0;
  padding: 12px;
  margin-bottom: 12px;
  border-left: 3px solid #0054E3;
}

.project-item h3 {
  color: #0054E3;
  margin-bottom: 6px;
}

.notepad-content {
  font-family: 'Courier New', monospace;
  white-space: pre-wrap;
  padding: 8px;
  background: white;
  height: 100%;
  overflow-y: auto;
}

.browser-chrome {
  display: flex;
  flex-direction: column;
  height: calc(100% - 28px);
}

.browser-bar {
  background: #F0F0F0;
  padding: 8px;
  border-bottom: 1px solid #CCC;
  display: flex;
  gap: 8px;
  align-items: center;
}

.browser-btn {
  width: 24px;
  height: 24px;
  background: #E0E0E0;
  border: 1px solid #999;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.browser-btn:hover {
  background: #D0D0D0;
}

.url-bar {
  flex: 1;
  padding: 4px 8px;
  border: 1px solid #999;
  background: white;
  font-size: 11px;
}

.browser-content {
  flex: 1;
  background: white;
  overflow-y: auto;
  padding: 20px;
}

.portfolio-section {
  max-width: 800px;
  margin: 0 auto;
}

.portfolio-header {
  text-align: center;
  padding: 40px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 8px;
  margin-bottom: 30px;
}

.portfolio-header h1 {
  font-size: 36px;
  margin-bottom: 10px;
}

.portfolio-card {
  background: #F9F9F9;
  padding: 20px;
  margin-bottom: 20px;
  border-radius: 8px;
  border-left: 4px solid #667eea;
}

.game-canvas {
  background: white;
  display: block;
  margin: 20px auto;
  border: 2px solid #333;
  touch-action: none;
}

.game-info {
  text-align: center;
  font-family: 'Courier New', monospace;
  margin-top: 10px;
}

.game-over {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 30px;
  border-radius: 8px;
  text-align: center;
  display: none;
}

.game-over.active {
  display: block;
}

.game-over button {
  margin-top: 20px;
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
  background: #4CAF50;
  color: white;
  border: none;
  border-radius: 4px;
}

.fps-game {
  background: #000;
  position: relative;
  width: 100%;
  height: calc(100% - 28px);
}

.fps-viewport {
  width: 100%;
  height: calc(100% - 60px);
  position: relative;
  overflow: hidden;
}

.fps-hud {
  position: absolute;
  bottom: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.8);
  color: #0F0;
  font-family: 'Courier New', monospace;
  padding: 8px;
  display: flex;
  justify-content: space-between;
}

.fps-crosshair {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #0F0;
  font-size: 24px;
  pointer-events: none;
}

.enemy {
  position: absolute;
  font-size: 40px;
  cursor: crosshair;
  transition: transform 0.1s;
}

.enemy:hover {
  transform: scale(1.2);
}

.muzzle-flash {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #FFD700;
  font-size: 60px;
  pointer-events: none;
  opacity: 0;
}

.muzzle-flash.active {
  opacity: 1;
}

.minesweeper-board {
  display: grid;
  grid-template-columns: repeat(8, 30px);
  grid-template-rows: repeat(8, 30px);
  gap: 2px;
  background: #808080;
  padding: 10px;
  margin: 20px auto;
  width: fit-content;
}

.mine-cell {
  width: 30px;
  height: 30px;
  background: #C0C0C0;
  border: 2px outset #FFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  cursor: pointer;
  font-size: 14px;
}

.mine-cell:active {
  border-style: inset;
}

.mine-cell.revealed {
  background: #E0E0E0;
  border: 1px solid #808080;
}

.mine-cell.mine {
  background: #FF0000;
}

.mine-cell.flagged::before {
  content: '🚩';
}

.mine-status {
  text-align: center;
  font-family: 'Courier New', monospace;
  margin-top: 10px;
  font-size: 16px;
  font-weight: bold;
}

.secret-window {
  background: linear-gradient(45deg, #FF00FF, #00FFFF);
  animation: rainbow 3s infinite;
}

@keyframes rainbow {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

.secret-content {
  text-align: center;
  padding: 40px;
  color: white;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

.secret-content h1 {
  font-size: 48px;
  margin-bottom: 20px;
  animation: bounce 1s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

.recycle-bin-content {
  text-align: center;
  padding: 60px 20px;
  color: #666;
}

.recycle-bin-content img {
  width: 128px;
  height: 128px;
  margin-bottom: 20px;
  opacity: 0.3;
}

.start-menu-item {
  padding: 6px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  border-radius: 3px;
  color: #000;
}

.start-menu-item:hover {
  background: linear-gradient(to right, #3D7EF5 0%, #4A8EFF 100%);
  color: white;
}

.wmp-window {
  background: #1d2c5c;
  border-color: #2c4d99 #112048 #112048 #2c4d99;
}

.wmp-title-bar {
  background: linear-gradient(to bottom, #3567c6 0%, #1d2c5c 50%, #2c4d99 100%);
}

.wmp-body {
  display: flex;
  flex-direction: column;
  height: calc(100% - 28px);
  background: linear-gradient(180deg, #1d2c5c 0%, #0c1840 100%);
  color: #cfe0ff;
}

.wmp-now-playing {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 14px;
  background: linear-gradient(180deg, #2c4d99 0%, #1d2c5c 100%);
  border-bottom: 1px solid #87a8e1;
  font-family: 'Tahoma', sans-serif;
}

.wmp-np-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #87a8e1;
}

.wmp-np-track {
  font-size: 13px;
  font-weight: bold;
  color: #fff;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.4);
}

.wmp-video-area {
  flex: 1;
  background: radial-gradient(ellipse at center, #0a1430 0%, #000 100%);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.wmp-visualizer {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
  height: 70%;
  padding: 0 24px 16px;
}

.wmp-bar {
  display: block;
  width: 14px;
  border-radius: 2px 2px 0 0;
  background: linear-gradient(to top, #00ff66 0%, #66ffcc 35%, #66d9ff 70%, #3399ff 100%);
  box-shadow: 0 0 8px rgba(102, 255, 204, 0.5);
  animation: wmp-pulse 0.8s ease-in-out infinite alternate;
}

.wmp-visualizer.paused .wmp-bar {
  animation-play-state: paused;
  opacity: 0.4;
}

.wmp-bar:nth-child(1)  { animation-delay: 0.00s; animation-duration: 0.70s; }
.wmp-bar:nth-child(2)  { animation-delay: 0.12s; animation-duration: 0.55s; }
.wmp-bar:nth-child(3)  { animation-delay: 0.04s; animation-duration: 0.90s; }
.wmp-bar:nth-child(4)  { animation-delay: 0.20s; animation-duration: 0.60s; }
.wmp-bar:nth-child(5)  { animation-delay: 0.08s; animation-duration: 0.80s; }
.wmp-bar:nth-child(6)  { animation-delay: 0.16s; animation-duration: 0.65s; }
.wmp-bar:nth-child(7)  { animation-delay: 0.02s; animation-duration: 0.95s; }
.wmp-bar:nth-child(8)  { animation-delay: 0.18s; animation-duration: 0.50s; }
.wmp-bar:nth-child(9)  { animation-delay: 0.06s; animation-duration: 0.85s; }
.wmp-bar:nth-child(10) { animation-delay: 0.14s; animation-duration: 0.70s; }
.wmp-bar:nth-child(11) { animation-delay: 0.10s; animation-duration: 0.60s; }
.wmp-bar:nth-child(12) { animation-delay: 0.22s; animation-duration: 0.75s; }
.wmp-bar:nth-child(13) { animation-delay: 0.05s; animation-duration: 0.55s; }
.wmp-bar:nth-child(14) { animation-delay: 0.17s; animation-duration: 0.95s; }
.wmp-bar:nth-child(15) { animation-delay: 0.09s; animation-duration: 0.65s; }
.wmp-bar:nth-child(16) { animation-delay: 0.13s; animation-duration: 0.80s; }

@keyframes wmp-pulse {
  0%   { height: 8%;  }
  100% { height: 95%; }
}

.wmp-track-info {
  position: absolute;
  top: 18px;
  left: 0;
  right: 0;
  text-align: center;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.7);
  pointer-events: none;
}

.wmp-track-title {
  font-size: 24px;
  font-weight: bold;
  letter-spacing: 1px;
}

.wmp-track-artist {
  font-size: 14px;
  margin-top: 4px;
  color: #cfe0ff;
  letter-spacing: 0.5px;
}

.wmp-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: linear-gradient(180deg, #2c4d99 0%, #1d2c5c 100%);
  border-top: 1px solid #87a8e1;
  font-family: 'Tahoma', sans-serif;
  font-size: 11px;
  color: #cfe0ff;
}

.wmp-play-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid #87a8e1;
  background: linear-gradient(180deg, #4e7fcb 0%, #1d2c5c 100%);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
}

.wmp-play-btn:hover {
  background: linear-gradient(180deg, #6090d9 0%, #2c4d99 100%);
}

.wmp-play-btn:active {
  background: linear-gradient(180deg, #1d2c5c 0%, #4e7fcb 100%);
}

.wmp-time {
  font-family: 'Courier New', monospace;
  min-width: 38px;
  text-align: center;
}

.wmp-progress {
  flex: 1;
  height: 10px;
  background: #0c1840;
  border: 1px solid #87a8e1;
  border-radius: 3px;
  cursor: pointer;
  overflow: hidden;
  position: relative;
}

.wmp-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(180deg, #66d9ff 0%, #3399ff 100%);
  transition: width 0.1s linear;
}

.xp-login {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: linear-gradient(180deg, #5b86c8 0%, #527cbe 25%, #4877b8 55%, #3a6da3 100%);
  display: flex;
  flex-direction: column;
  font-family: 'Tahoma', sans-serif;
  color: #fff;
  transition: opacity 0.6s ease;
  cursor: default;
}

.xp-login.dismissed {
  opacity: 0;
  pointer-events: none;
}

.xp-login-top {
  background: linear-gradient(180deg, #4e7fcb 0%, #2c5fb1 100%);
  border-bottom: 2px solid #87a8e1;
  padding: 14px 36px;
  display: flex;
  align-items: baseline;
  gap: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

.xp-logo-text {
  font-size: 30px;
  font-weight: bold;
  font-style: italic;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.4);
}

.xp-logo-text sup {
  font-size: 18px;
  color: #ffd700;
  margin-left: 2px;
}

.xp-logo-tag {
  font-size: 14px;
  font-style: italic;
  opacity: 0.85;
}

.xp-login-body {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 64px;
  gap: 36px;
}

.xp-login-welcome {
  font-size: 28px;
  font-weight: 300;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.4);
  text-align: right;
  line-height: 1.35;
}

.xp-login-divider {
  width: 2px;
  height: 60%;
  background: linear-gradient(180deg, transparent 0%, rgba(255,255,255,0.6) 50%, transparent 100%);
}

.xp-user-tile {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.15s;
  max-width: fit-content;
}

.xp-user-tile:hover {
  background: rgba(255, 255, 255, 0.15);
}

.xp-avatar {
  width: 64px;
  height: 64px;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.4);
  padding: 2px;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.xp-avatar img {
  width: 100%;
  height: 100%;
  display: block;
}

.xp-user-name {
  font-size: 17px;
  font-weight: bold;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.xp-login-bottom {
  background: linear-gradient(180deg, #2c5fb1 0%, #4e7fcb 100%);
  border-top: 2px solid #87a8e1;
  padding: 18px 36px;
  text-align: left;
  box-shadow: 0 -2px 6px rgba(0,0,0,0.25);
}

.xp-login-hint {
  font-size: 12px;
  color: rgba(255,255,255,0.85);
  line-height: 1.45;
}

@media (max-width: 768px) {
  .desktop {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    padding: 12px 8px;
    align-content: start;
    height: calc(100vh - 36px);
    overflow-y: auto;
  }

  .icon {
    position: static !important;
    left: auto !important;
    top: auto !important;
    width: auto;
    padding: 8px 4px;
  }

  .icon img {
    width: 44px;
    height: 44px;
  }

  .icon-label {
    font-size: 12px;
  }

  .window {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 36px !important;
    width: 100vw !important;
    height: calc(100vh - 36px) !important;
    max-width: 100vw;
    max-height: calc(100vh - 36px);
    min-width: 0;
    min-height: 0;
    border-width: 0;
    box-shadow: none;
  }

  .title-bar {
    cursor: default;
    height: 40px;
    padding: 6px 8px;
  }

  .title-text {
    font-size: 13px;
  }

  .title-btn {
    width: 32px;
    height: 32px;
    font-size: 18px;
  }

  .taskbar {
    height: 36px;
  }

  .taskbar-items {
    display: none;
  }

  .start-btn {
    height: 28px;
    font-size: 14px;
  }

  .start-flag {
    height: 20px;
  }

  .start-menu {
    width: 100vw;
    bottom: 36px;
  }

  .folder-view {
    grid-template-columns: repeat(auto-fill, 90px);
    padding: 12px;
  }

  .folder {
    padding: 12px 6px;
  }

  .game-canvas {
    max-width: 100%;
    height: auto;
  }

  .minesweeper-board {
    grid-template-columns: repeat(8, 34px);
    grid-template-rows: repeat(8, 34px);
  }

  .mine-cell {
    width: 34px;
    height: 34px;
    font-size: 16px;
  }

  .browser-content embed {
    height: 100%;
  }

  .xp-login-top {
    padding: 12px 18px;
  }

  .xp-logo-text {
    font-size: 22px;
  }

  .xp-logo-tag {
    display: none;
  }

  .xp-login-body {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 24px 18px;
    align-content: center;
  }

  .xp-login-welcome {
    font-size: 22px;
    text-align: center;
  }

  .xp-login-divider {
    display: none;
  }

  .xp-user-tile {
    justify-self: center;
  }

  .xp-login-bottom {
    padding: 14px 18px;
  }

  .xp-login-hint {
    text-align: center;
    font-size: 11px;
  }
}
