:root {
  --xp-blue-1: #1674c9;
  --xp-blue-2: #06458e;
  --xp-blue-3: #69b8f5;
  --xp-border: #0756a7;
  --xp-window: #ece9d8;
  --xp-green: #39a936;
  --xp-green-dark: #1d7d26;
  --xp-taskbar: #0d5ea7;
  --shadow: rgba(0, 0, 0, 0.22);
  --glass: rgba(255, 255, 255, 0.14);
  --text: #1d1d1d;
  --muted: #575757;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
  font-family: Tahoma, Arial, sans-serif;
  background: #4a9bd5;
  color: var(--text);
}

body {
  min-height: 100vh;
  overflow-x: hidden;
}

button, input {
  font: inherit;
}

img {
  max-width: 100%;
  display: block;
}

.wallpaper {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: linear-gradient(#59b6ee 0%, #a9ddfa 55%, #65b95b 56%, #2d873b 100%);
  overflow: hidden;
}

.sun {
  position: absolute;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: #ffe990;
  right: 13%;
  top: 12%;
  box-shadow: 0 0 45px #ffe990;
}

.cloud {
  position: absolute;
  width: 130px;
  height: 25px;
  background: #fff;
  box-shadow: 20px -20px 0 #fff, 45px -30px 0 #fff, 70px -15px 0 #fff, 95px 0 0 #fff;
  opacity: 0.9;
  animation: clouds 45s linear infinite;
}

.cloud.one { top: 20%; left: -180px; }
.cloud.two { top: 38%; left: -350px; animation-delay: -20s; transform: scale(0.7); }

@keyframes clouds {
  to { left: 120%; }
}

.hill {
  position: absolute;
  bottom: 38px;
  width: 120%;
  height: 150px;
  background: #3c9c43;
  border-radius: 50% 50% 0 0;
  left: -10%;
}

.hill.second {
  height: 110px;
  background: #287e35;
  bottom: 35px;
  left: 25%;
}

.language {
  position: absolute;
  right: 25px;
  top: 20px;
  display: flex;
  gap: 7px;
  z-index: 10;
}

.language a {
  background: #ece9d8;
  border: 2px solid #fff;
  outline: 1px solid #555;
  padding: 8px 12px;
  text-decoration: none;
  font-size: 20px;
  box-shadow: 2px 2px 0 #555;
}

.language a.active {
  background: #b8d9f5;
  outline-color: var(--xp-blue-2);
}

#desktop {
  position: absolute;
  inset: 0;
  padding: 24px 18px 60px;
  z-index: 1;
}

.desktop-icons {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: max-content;
}

.desktop-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 76px;
  border: 1px solid transparent;
  background: transparent;
  color: #fff;
  text-shadow: 1px 1px #333;
  cursor: pointer;
  padding: 6px 4px;
  user-select: none;
}

.desktop-icon:hover,
.desktop-icon:focus-visible {
  border-color: rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.05);
  outline: none;
}

.desktop-icon .emoji {
  font-size: 38px;
  line-height: 1;
  display: block;
}

.desktop-icon .label {
  display: block;
  font-size: 12px;
  text-align: center;
  line-height: 1.2;
}

.windows-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 15;
}

.window {
  position: absolute;
  width: min(760px, calc(100vw - 120px));
  min-width: 300px;
  background: var(--xp-window);
  border: 3px solid #fff;
  outline: 2px solid #164c87;
  box-shadow: 8px 8px 0 rgba(0,0,0,0.3);
  pointer-events: auto;
  overflow: hidden;
}

.window.minimized {
  display: none;
}

.window.is-active {
  box-shadow: 8px 8px 0 rgba(0,0,0,.28), 0 0 0 2px rgba(19, 78, 150, 0.3);
}

.titlebar {
  background: linear-gradient(180deg, #2996ee, #0862bd 50%, #0752a2);
  color: white;
  padding: 10px 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-shadow: 1px 1px #164477;
  cursor: move;
  user-select: none;
}

.titlebar-left {
  display: flex;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.titlebar-title {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.window-controls {
  display: flex;
  gap: 4px;
}

.window-controls button {
  border: 1px solid #fff;
  background: linear-gradient(#fff, #c5d7ed);
  color: #123e72;
  width: 23px;
  height: 22px;
  font-size: 12px;
  padding: 0;
  cursor: pointer;
}

.window-body {
  padding: 24px 28px 18px;
}

.content-card,
.feature,
.story-box,
.panel-box {
  background: #fff;
  border: 1px solid #a7a7a7;
  box-shadow: inset 1px 1px 0 rgba(255,255,255,0.8);
}

.hero {
  text-align: center;
}

.tag {
  display: inline-block;
  background: #fff;
  border: 1px solid #999;
  padding: 8px 14px;
  font-family: 'VT323', monospace;
  font-size: 22px;
  letter-spacing: 2px;
}

.logo {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(26px, 4vw, 46px);
  color: #0875d1;
  text-shadow: 3px 3px #9fcaf1, 5px 5px #777;
  margin: 22px 0 18px;
  line-height: 1.5;
}

.hero h1 {
  margin: 0;
  font-size: 22px;
}

.subtitle {
  margin-top: 10px;
  color: #1767a9;
  font-size: 20px;
  font-weight: 700;
}

.description {
  max-width: 620px;
  margin: 20px auto;
  line-height: 1.7;
  color: #555;
  font-size: 15px;
}

.status-panel {
  background: #fff;
  border: 1px solid #aaa;
  padding: 20px;
  margin: 28px auto;
  max-width: 520px;
  box-shadow: inset 1px 1px 3px #aaa;
}

.status-label {
  font-family: 'VT323', monospace;
  font-size: 22px;
  color: #555;
}

.status-value {
  color: #168333;
  font-family: 'Press Start 2P', monospace;
  font-size: 16px;
  margin: 15px 0;
}

.progress {
  height: 19px;
  background: #ddd;
  border: 2px inset #fff;
  padding: 2px;
  display: flex;
  gap: 3px;
  overflow: hidden;
}

.progress span {
  width: 13px;
  flex-shrink: 0;
  background: linear-gradient(#80d5ff, #0872c5);
  animation: progress 2s steps(8) infinite;
}

@keyframes progress {
  from { opacity: 0.4; }
  to { opacity: 1; }
}

.divider {
  border: 0;
  border-top: 1px solid #aaa;
  border-bottom: 1px solid white;
  margin: 30px 0;
}

.story {
  text-align: left;
  line-height: 1.8;
  margin: 0 auto;
  max-width: 680px;
}

.story h2,
.window-section h2 {
  color: #075da8;
  font-size: 18px;
}

.story-box {
  background: #dedbd0;
  padding: 18px 18px 6px;
  border: 1px solid #aaa;
  box-shadow: inset 1px 1px white;
}

.story-box strong {
  color: #8c5d2e;
}

.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.feature {
  padding: 16px 12px;
  text-align: center;
  box-shadow: 2px 2px 0 #bbb;
}

.feature .icon {
  font-size: 32px;
}

.feature h3 {
  font-size: 14px;
  color: #075da8;
}

.feature p {
  font-size: 12px;
  line-height: 1.6;
  color: #666;
}

.bottom-message {
  font-family: 'VT323', monospace;
  font-size: 26px;
  color: #1764a5;
  margin-top: 28px;
  text-align: center;
}

.start-menu {
  position: fixed;
  left: 10px;
  bottom: 42px;
  width: min(260px, calc(100vw - 30px));
  background: linear-gradient(180deg, #f7f4ee 0%, #dfe7ef 100%);
  border: 2px solid #fff;
  outline: 2px solid #0d5ea7;
  box-shadow: 5px 5px 0 rgba(0,0,0,0.18);
  z-index: 30;
  display: none;
}

.start-menu.open {
  display: block;
}

.start-menu-header {
  background: linear-gradient(#3a9df8, #0d5ea7);
  color: white;
  padding: 10px 12px;
  font-weight: 700;
}

.start-menu-body {
  display: grid;
  gap: 6px;
  padding: 10px;
}

.start-menu-button,
.inline-button,
.action-button,
.big-button,
.memory-card,
.default-button {
  border: 1px solid #8f8f8f;
  background: linear-gradient(#fff, #dfe3e7);
  color: #1d1d1d;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.start-menu-button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
}

.start-menu-button:hover,
.inline-button:hover,
.action-button:hover,
.big-button:hover,
.default-button:hover,
.memory-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 0 rgba(0,0,0,0.12);
}

.taskbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 38px;
  background: linear-gradient(#308cdb, #0752a8 45%, #06418c);
  border-top: 2px solid #7bbafa;
  display: flex;
  align-items: center;
  color: white;
  z-index: 25;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.2);
}

.start-button {
  height: 34px;
  padding: 0 18px;
  border: none;
  background: linear-gradient(#72c85b, #238d22);
  border-radius: 0 12px 12px 0;
  display: flex;
  align-items: center;
  font-weight: 700;
  font-style: italic;
  text-shadow: 1px 1px #245d1d;
  box-shadow: 2px 0 5px rgba(0,0,0,0.2);
  cursor: pointer;
  color: white;
}

.taskbar-tasks {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 10px;
  min-width: 0;
  overflow: hidden;
  flex: 1;
}

.taskbar-item {
  max-width: 200px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  padding: 5px 8px;
  font-size: 12px;
  cursor: pointer;
}

.taskbar-item.active {
  background: rgba(255,255,255,0.2);
  border-color: rgba(255,255,255,0.38);
}

.clock {
  margin-left: auto;
  height: 100%;
  padding: 0 17px;
  display: flex;
  align-items: center;
  background: #1685ce;
  border-left: 1px solid #7bbafa;
  font-size: 12px;
  min-width: 90px;
  justify-content: center;
}

footer {
  text-align: center;
  padding: 15px;
  font-size: 11px;
  color: white;
  text-shadow: 1px 1px #333;
}

.window-copy {
  line-height: 1.8;
  color: var(--muted);
}

.window-copy strong {
  color: #0d5ea7;
}

.browser-preview {
  padding: 14px;
  background: linear-gradient(180deg, #f4f8fb, #ddeaf6);
  border: 1px solid #b7c3d3;
  min-height: 120px;
  color: #2f2f2f;
}

.browser-url {
  background: white;
  border: 1px solid #b8b8b8;
  padding: 8px 10px;
  margin-bottom: 12px;
  font-size: 12px;
  color: #3a3a3a;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin: 10px 0;
  flex-wrap: wrap;
}

.game-panel {
  display: grid;
  gap: 16px;
  padding: 10px 0;
}

.big-button {
  padding: 16px 18px;
  font-size: 20px;
  font-weight: 700;
  background: linear-gradient(#77d9ff, #1d84d7);
  color: white;
  border-color: #0b558e;
  text-shadow: 1px 1px rgba(0,0,0,0.25);
}

.inline-button,
.action-button,
.default-button {
  padding: 8px 12px;
  font-size: 12px;
}

.game-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.game-score {
  font-size: 15px;
  font-weight: 700;
}

.memory-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.memory-card {
  aspect-ratio: 1 / 1;
  font-size: 28px;
  background: linear-gradient(#dfefff, #bfe3ff);
  border-color: #6a8fb9;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.memory-card.revealed {
  background: #fff;
}

.memory-card.matched {
  background: #dff9d9;
  border-color: #5ab14c;
}

.shooter-mode-switch {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.shooter-mode-switch .inline-button.active {
  background: linear-gradient(#90d7ff, #2b85d6);
  color: white;
  border-color: #1a5ea3;
}

.shooter-field {
  position: relative;
  height: 260px;
  border: 2px solid #6b8fb8;
  background: linear-gradient(180deg, #0a1739 0%, #112a56 50%, #193b5a 100%);
  overflow: hidden;
  border-radius: 14px;
  box-shadow: inset 0 0 18px rgba(0,0,0,0.35);
}

.shooter-field::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(255,255,255,0.06), transparent 40%, rgba(255,255,255,0.04));
}

.shooter-player {
  position: absolute;
  left: 50%;
  bottom: 14px;
  width: 28px;
  height: 28px;
  border-radius: 50% 50% 0 0;
  background: linear-gradient(#a0eeff, #2eb4ff);
  box-shadow: 0 0 18px rgba(78, 188, 255, 0.9);
  transform: translateX(-50%);
}

.shooter-player::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -10px;
  width: 6px;
  height: 16px;
  background: #d2f2ff;
  transform: translateX(-50%);
}

.shooter-bullet {
  position: absolute;
  width: 6px;
  height: 18px;
  border-radius: 4px;
  background: linear-gradient(#ffd971, #ff9f1c);
  transform: translateX(-50%);
}

.shooter-bullet-3d {
  width: 5px;
  height: 14px;
  background: linear-gradient(#ffef9b, #ff9f1c);
  box-shadow: 0 0 10px rgba(255,186,0,0.8);
}

.shooter-enemy {
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(#ff8ab5, #c01454);
  box-shadow: 0 0 12px rgba(255, 100, 120, 0.8);
  transform: translateX(-50%);
}

.shooter-enemy-3d {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  background: linear-gradient(#ffb3a7, #da2c5f);
  box-shadow: 0 0 16px rgba(255, 120, 145, 0.9);
}

.xp-solitaire-panel {
  background: linear-gradient(180deg, #f7f9ff, #ecf4ff);
  border: 1px solid #a8b8d1;
  border-radius: 10px;
  padding: 12px;
}

.xp-solitaire-board {
  background: linear-gradient(180deg, #d9f0d6, #bbd7b6);
  border: 2px solid #6c8b6a;
  border-radius: 10px;
  padding: 12px;
}

.xp-solitaire-top {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(86, 111, 85, 0.45);
  border-radius: 8px;
  padding: 8px;
}

.xp-card {
  background: linear-gradient(#fafcff, #dfeafc);
  border: 2px solid #91a7c2;
  border-radius: 10px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}

.solitaire-board {
  display: grid;
  gap: 16px;
  padding-top: 6px;
}

.solitaire-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.solitaire-deck {
  width: 64px;
  height: 84px;
  border-radius: 10px;
  border: 2px solid #9aa9bf;
  background: linear-gradient(#edf5ff, #cfe0f8);
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}

.solitaire-deck.has-card {
  background: linear-gradient(#ffffff, #edf5ff);
  color: #1d1d1d;
}

.solitaire-foundations {
  display: flex;
  gap: 8px;
  flex: 1;
  flex-wrap: wrap;
}

.solitaire-foundation {
  min-width: 54px;
  height: 84px;
  border: 2px dashed #b9cbe3;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  background: rgba(255,255,255,0.18);
  color: #1e2a36;
}

.solitaire-foundation.active {
  border-style: solid;
  border-color: #5fb468;
  background: rgba(96, 212, 128, 0.14);
}

.solitaire-tableau {
  display: grid;
  grid-template-columns: repeat(7, minmax(40px, 1fr));
  gap: 12px;
  align-items: start;
}

.solitaire-column {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 220px;
  padding: 4px 0;
}

.solitaire-card {
  width: 100%;
  min-height: 58px;
  border-radius: 10px;
  border: 1px solid #8998ad;
  background: linear-gradient(#ffffff, #edf3fb);
  font-size: 18px;
  font-weight: 700;
  cursor: grab;
  box-shadow: 0 2px 0 rgba(30, 50, 70, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
}

.solitaire-card.red-card {
  color: #c92f46;
}

.solitaire-card.black-card {
  color: #1a1f2b;
}

.solitaire-card:active {
  cursor: grabbing;
}

.solitaire-card-back {
  background: linear-gradient(135deg, #6ca6ff, #294aa5 60%, #1a2f80);
  color: white;
  border-color: #244184;
  font-size: 21px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.25);
}

.browser-shell {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 460px;
  border: 1px solid #c3cad7;
  background: #f5f8fc;
}

.browser-toolbar {
  display: grid;
  gap: 10px;
  background: linear-gradient(180deg, #edf3f9 0%, #dfeaf5 100%);
  border-bottom: 1px solid #b5c7db;
  padding: 10px 12px;
}

.browser-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.browser-tab {
  border: 1px solid #96a8c3;
  background: linear-gradient(#f8fbff, #dfeaf7);
  color: #204a79;
  padding: 6px 10px;
  border-radius: 8px 8px 0 0;
  font-size: 12px;
  cursor: pointer;
}

.browser-tab.active {
  background: linear-gradient(#ffffff, #dfe8f4);
  border-bottom-color: #ffffff;
  font-weight: 700;
}

.browser-address-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.browser-address {
  flex: 1;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid #adc0d8;
  background: white;
}

.browser-view {
  min-height: 360px;
  background: white;
}

.browser-view iframe {
  width: 100%;
  height: 100%;
  min-height: 360px;
  border: 0;
  background: white;
}

@media (max-width: 650px) {
  .language { top: 14px; right: 14px; }
  .window {
    width: min(92vw, 560px);
    min-width: 0;
  }
  .window-body { padding: 18px 16px; }
  .features { grid-template-columns: 1fr; }
  #desktop { padding-top: 68px; }
  .desktop-icons { display: none; }
  .taskbar-item { max-width: 110px; }
  .memory-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
