:root {
  --neon: #ccff00;
  --green: #00c805;
  --dark: #110e08;
  --win-bg: #c0c0c0;
  --win-title: #000080;
  --win-title-grad: linear-gradient(90deg, #000080, #1084d0);
  --text: #0a0a0a;
  --font-ui: "VT323", monospace;
  --font-pixel: "Press Start 2P", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-ui);
  font-size: 18px;
  overflow: hidden;
  height: 100vh;
  background: var(--dark);
  color: var(--text);
}

.bg-video {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.bg-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, rgba(17,14,8,.55) 0%, rgba(17,14,8,.75) 100%);
  z-index: 1;
  pointer-events: none;
}

/* Boot */
.boot-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  transition: opacity .6s, visibility .6s;
}

.boot-screen.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.boot-logo {
  font-family: var(--font-pixel);
  font-size: clamp(14px, 3vw, 22px);
  color: var(--neon);
  text-shadow: 0 0 20px rgba(204,255,0,.5);
  text-align: center;
  line-height: 1.6;
}

.boot-sub { color: var(--green); font-size: 1.2rem; }
.boot-text { color: #aaa; animation: blink 1s step-end infinite; }

.boot-bar {
  width: min(320px, 80vw);
  height: 18px;
  border: 2px solid var(--neon);
  background: #1a1a1a;
  padding: 2px;
}

.boot-fill {
  height: 100%;
  width: 0;
  background: var(--neon);
  animation: bootLoad 2.2s ease-out forwards;
}

@keyframes bootLoad { to { width: 100%; } }
@keyframes blink { 50% { opacity: 0; } }

/* Desktop */
.desktop {
  position: relative;
  z-index: 2;
  height: 100vh;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transition: opacity .5s;
}

.desktop.ready { opacity: 1; }

.os-header {
  padding: 12px 20px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.os-title {
  font-family: var(--font-pixel);
  font-size: clamp(10px, 2vw, 14px);
  color: var(--neon);
  text-shadow: 0 0 12px rgba(204,255,0,.4);
}

.os-sub { color: rgba(255,255,255,.7); font-size: 1rem; }

.icon-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px;
  padding: 16px 20px 80px;
  max-width: 520px;
  align-content: start;
}

.icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 6px;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  color: #fff;
  font-family: var(--font-ui);
  font-size: 15px;
  border-radius: 4px;
  transition: background .15s, border-color .15s;
}

.icon:hover, .icon:focus {
  background: rgba(204,255,0,.12);
  border-color: rgba(204,255,0,.35);
  outline: none;
}

.icon-img { font-size: 32px; filter: drop-shadow(0 2px 4px rgba(0,0,0,.5)); }
.icon-label { text-align: center; text-shadow: 1px 1px 2px #000; line-height: 1.1; }

/* Windows */
.windows {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10;
}

.window {
  position: absolute;
  min-width: 280px;
  max-width: 96vw;
  background: var(--win-bg);
  border: 2px solid;
  border-color: #fff #404040 #404040 #fff;
  box-shadow: 4px 4px 0 rgba(0,0,0,.4);
  pointer-events: all;
  display: flex;
  flex-direction: column;
}

.window.minimized { display: none; }

.window-titlebar {
  background: var(--win-title-grad);
  color: #fff;
  padding: 3px 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: move;
  user-select: none;
  font-size: 16px;
}

.window.active .window-titlebar {
  background: linear-gradient(90deg, #0a4a0a, var(--green));
}

.window-title { padding-left: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.window-controls { display: flex; gap: 2px; }

.window-controls button {
  width: 22px;
  height: 20px;
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1;
  background: var(--win-bg);
  border: 2px solid;
  border-color: #fff #404040 #404040 #fff;
  cursor: pointer;
  padding: 0;
}

.window-controls button:active {
  border-color: #404040 #fff #fff #404040;
}

.window-body {
  padding: 12px;
  overflow: auto;
  max-height: 70vh;
  font-size: 17px;
  line-height: 1.35;
}

/* Content */
.readme pre, .readme .block {
  white-space: pre-wrap;
  font-family: var(--font-ui);
  margin-bottom: 12px;
}

.readme h3 {
  font-family: var(--font-pixel);
  font-size: 11px;
  color: var(--green);
  margin: 14px 0 8px;
}

.highlight { color: #004000; font-weight: bold; }
.neon { color: #6a8f00; }

.roadmap-phase {
  border: 2px solid;
  border-color: #fff #808080 #808080 #fff;
  background: #fff;
  padding: 10px;
  margin-bottom: 10px;
}

.roadmap-phase h4 {
  font-family: var(--font-pixel);
  font-size: 9px;
  color: var(--win-title);
  margin-bottom: 6px;
}

.roadmap-phase .status {
  display: inline-block;
  font-size: 14px;
  padding: 2px 6px;
  background: var(--neon);
  color: #000;
  margin-bottom: 6px;
}

.roadmap-phase.done .status { background: var(--green); color: #fff; }
.roadmap-phase.active .status { background: #ff0; }

/* Assets */
.assets-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  align-items: center;
}

.assets-toolbar input, .assets-toolbar button {
  font-family: var(--font-ui);
  font-size: 16px;
  padding: 4px 8px;
  border: 2px solid;
  border-color: #fff #808080 #808080 #fff;
}

.assets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 8px;
}

.assets-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 2px solid #404040;
  cursor: pointer;
  background: #1a1a1a;
}

.assets-grid img:hover { border-color: var(--neon); }

.asset-detail {
  margin-top: 12px;
  padding: 10px;
  background: #fff;
  border: 2px inset #808080;
  display: none;
}

.asset-detail.show { display: block; }

.asset-detail img { max-width: 200px; display: block; margin-bottom: 8px; }

/* OpenSea */
.coming-soon-box {
  text-align: center;
  padding: 24px 16px;
  background: #1a1a1a;
  color: var(--neon);
  border: 3px double var(--neon);
}

.coming-soon-box h2 {
  font-family: var(--font-pixel);
  font-size: 12px;
  margin-bottom: 12px;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse { 50% { opacity: .7; } }

.coming-soon-box p { color: #ccc; margin-bottom: 16px; }

.btn-neon {
  font-family: var(--font-pixel);
  font-size: 9px;
  padding: 12px 20px;
  background: var(--neon);
  color: #000;
  border: none;
  cursor: not-allowed;
  opacity: .6;
}

/* Game */
.game-frame {
  width: 100%;
  min-height: 400px;
  height: 55vh;
  border: 2px inset #808080;
  background: #000;
}

.game-fallback {
  margin-top: 8px;
  font-size: 15px;
}

.game-fallback a { color: var(--win-title); }

/* Radio */
.radio-panel {
  text-align: center;
  padding: 8px;
}

.radio-station {
  font-family: var(--font-pixel);
  font-size: 9px;
  color: var(--green);
  margin: 8px 0;
  min-height: 2em;
}

.radio-status { color: #555; font-size: 15px; margin-bottom: 12px; }

.radio-visual {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  height: 48px;
  margin: 12px 0;
}

.radio-bar {
  width: 8px;
  background: var(--green);
  height: 8px;
  transition: height .1s;
}

.radio-controls {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 12px 0;
}

.radio-btn {
  font-family: var(--font-pixel);
  font-size: 10px;
  padding: 12px 24px;
  background: var(--win-bg);
  border: 3px solid;
  border-color: #fff #404040 #404040 #fff;
  cursor: pointer;
}

.radio-btn:hover { background: var(--neon); }
.radio-btn:active { border-color: #404040 #fff #fff #404040; }

.volume-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
}

.volume-row input[type=range] { width: 160px; accent-color: var(--green); }

/* Network */
.chain-stats {
  display: grid;
  gap: 8px;
}

.chain-stat {
  display: flex;
  justify-content: space-between;
  padding: 6px 8px;
  background: #fff;
  border: 1px inset #808080;
}

.chain-stat span:last-child { color: var(--green); font-weight: bold; }

/* Taskbar */
.taskbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 36px;
  background: var(--win-bg);
  border-top: 2px solid #fff;
  display: flex;
  align-items: center;
  padding: 2px 4px;
  gap: 4px;
  z-index: 100;
}

.start-btn {
  font-family: var(--font-pixel);
  font-size: 8px;
  padding: 6px 12px;
  background: var(--win-bg);
  border: 2px solid;
  border-color: #fff #404040 #404040 #fff;
  cursor: pointer;
  font-weight: bold;
}

.start-btn:active, .start-btn.active {
  border-color: #404040 #fff #fff #404040;
  background: #a0a0a0;
}

.taskbar-windows {
  flex: 1;
  display: flex;
  gap: 4px;
  overflow-x: auto;
}

.taskbar-win-btn {
  font-family: var(--font-ui);
  font-size: 14px;
  padding: 4px 10px;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: var(--win-bg);
  border: 2px solid;
  border-color: #fff #404040 #404040 #fff;
  cursor: pointer;
}

.taskbar-win-btn.active {
  border-color: #404040 #fff #fff #404040;
  font-weight: bold;
}

.taskbar-tray {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px;
  border: 1px inset #808080;
  height: 28px;
  background: #d4d4d4;
  font-size: 14px;
}

.tray-chain { color: var(--green); }

.start-menu {
  position: fixed;
  bottom: 36px;
  left: 4px;
  width: 200px;
  background: var(--win-bg);
  border: 2px solid;
  border-color: #fff #404040 #404040 #fff;
  z-index: 200;
  padding: 4px 0;
  box-shadow: 4px -4px 0 rgba(0,0,0,.3);
}

.start-menu.hidden { display: none; }

.start-menu-title {
  font-family: var(--font-pixel);
  font-size: 8px;
  padding: 8px 12px;
  background: var(--win-title-grad);
  color: #fff;
  margin-bottom: 4px;
}

.start-menu button, .start-menu a {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 16px;
  font-family: var(--font-ui);
  font-size: 17px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
  text-decoration: none;
}

.start-menu button:hover, .start-menu a:hover { background: var(--win-title); color: #fff; }
.start-menu hr { border: none; border-top: 1px solid #808080; margin: 4px 0; }

@media (max-width: 600px) {
  .icon-grid { max-width: 100%; grid-template-columns: repeat(3, 1fr); }
  .window { width: 94vw !important; left: 3vw !important; }
}
