:root {
  --bg-deep: #001327;
  --bg-mid: #053d71;
  --bg-hot: #0a6db8;
  --window: #c9ced6;
  --window-shadow: #3b3f48;
  --window-light: #f6f8fc;
  --ink: #031522;
  --accent: #ffde2f;
  --accent-2: #00f0c6;
  --danger: #ef3f5a;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "VT323", monospace;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 15%, rgba(255, 222, 47, 0.2), transparent 35%),
    radial-gradient(circle at 85% 20%, rgba(0, 240, 198, 0.2), transparent 40%),
    linear-gradient(160deg, var(--bg-deep), var(--bg-mid) 45%, var(--bg-hot));
  overflow-x: hidden;
}

.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.03) 0px,
    rgba(255, 255, 255, 0.03) 1px,
    transparent 2px,
    transparent 4px
  );
  mix-blend-mode: soft-light;
}

.boot-screen {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: #000;
  z-index: 200;
  transition: opacity 350ms ease;
}

.boot-screen.done {
  opacity: 0;
  pointer-events: none;
}

.boot-text {
  margin: 0;
  font-family: "Press Start 2P", monospace;
  color: #50ff92;
  font-size: clamp(0.65rem, 2.2vw, 1rem);
  text-shadow: 0 0 10px rgba(80, 255, 146, 0.8);
  animation: blink 0.9s steps(1) infinite;
}

.taskbar {
  position: sticky;
  top: 0;
  z-index: 120;
  height: 52px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.45rem 0.75rem;
  background: linear-gradient(to bottom, #dbe0e8, #adb5bf);
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #7a8290;
  border-bottom: 2px solid #7a8290;
}

.start-btn,
.btn,
.titlebar-actions button {
  font-family: "Press Start 2P", monospace;
  border: 2px solid;
  border-color: #fff #6b717f #6b717f #fff;
  background: linear-gradient(to bottom, #e9edf4, #cfd5de);
  color: #09162c;
  cursor: pointer;
}

.start-btn {
  padding: 0.48rem 0.65rem;
  font-size: 0.55rem;
}

.task-title {
  margin: 0;
  font-family: "Press Start 2P", monospace;
  font-size: clamp(0.45rem, 1.6vw, 0.72rem);
  letter-spacing: 0.04em;
  color: #08162f;
  text-shadow: 1px 1px 0 #f7f9ff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.clock {
  margin: 0;
  padding: 0.2rem 0.5rem;
  border: 2px solid;
  border-color: #7a8290 #fff #fff #7a8290;
  background: #dfe5ee;
  font-size: 1.35rem;
}

main {
  position: relative;
  padding: 1.2rem clamp(0.9rem, 2vw, 2.2rem) 2.5rem;
}

.desktop-icons {
  position: fixed;
  top: 72px;
  left: 14px;
  z-index: 98;
  width: 92px;
  display: grid;
  gap: 0.85rem;
  padding: 0.25rem 0;
  transition: opacity 220ms ease, transform 220ms ease;
}

.desktop-icons.scrolled-out {
  opacity: 0;
  transform: translateX(-10px);
  pointer-events: none;
}

.desktop-icon {
  width: 86px;
  flex: 0 0 auto;
  display: grid;
  justify-items: center;
  gap: 0.38rem;
  text-decoration: none;
  color: #ecf6ff;
}

.desktop-icon:focus-visible .icon-label,
.desktop-icon:hover .icon-label {
  background: rgba(1, 26, 79, 0.75);
}

.icon-label {
  padding: 0.2rem 0.25rem;
  font-family: "Press Start 2P", monospace;
  font-size: 0.44rem;
  text-align: center;
  line-height: 1.4;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.8);
}

.pixel-icon {
  --pixel: #ffde2f;
  position: relative;
  width: 36px;
  height: 36px;
  border: 2px solid;
  border-color: #fff #4a5362 #4a5362 #fff;
  background: linear-gradient(145deg, #163c72, #0b2142);
  box-shadow: 0 0 0 1px #000;
}

.pixel-icon::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 4px;
  height: 4px;
  background: var(--pixel);
}

.icon-trade {
  --pixel: #ffde2f;
}

.icon-lore {
  --pixel: #00f0c6;
}

.icon-ca {
  --pixel: #ff7f9a;
}

.icon-community {
  --pixel: #9eb8ff;
}

.icon-telegram {
  --pixel: #8fd6ff;
}

.icon-trade::before {
  box-shadow:
    4px 0 var(--pixel),
    8px 0 var(--pixel),
    12px 0 var(--pixel),
    12px -4px var(--pixel),
    16px -8px var(--pixel),
    12px -12px var(--pixel),
    8px -8px var(--pixel),
    16px 0 #ffffff;
}

.icon-lore::before {
  box-shadow:
    4px 0 var(--pixel),
    8px 0 var(--pixel),
    12px 0 var(--pixel),
    16px 0 var(--pixel),
    0 4px var(--pixel),
    8px 4px #ffffff,
    16px 4px var(--pixel),
    0 8px var(--pixel),
    8px 8px var(--pixel),
    16px 8px var(--pixel),
    0 12px var(--pixel),
    16px 12px var(--pixel);
}

.icon-ca::before {
  box-shadow:
    4px 0 var(--pixel),
    8px 0 var(--pixel),
    12px 0 var(--pixel),
    16px 0 var(--pixel),
    0 4px var(--pixel),
    16px 4px var(--pixel),
    0 8px var(--pixel),
    8px 8px #ffffff,
    16px 8px var(--pixel),
    0 12px var(--pixel),
    16px 12px var(--pixel),
    0 16px var(--pixel),
    4px 16px var(--pixel),
    8px 16px var(--pixel),
    12px 16px var(--pixel),
    16px 16px var(--pixel);
}

.icon-community::before {
  box-shadow:
    4px 0 var(--pixel),
    8px 0 var(--pixel),
    12px 0 var(--pixel),
    16px 0 var(--pixel),
    0 4px var(--pixel),
    8px 4px #ffffff,
    16px 4px var(--pixel),
    0 8px var(--pixel),
    16px 8px var(--pixel),
    0 12px var(--pixel),
    8px 12px #ffffff,
    16px 12px var(--pixel),
    4px 16px var(--pixel),
    8px 16px var(--pixel),
    12px 16px var(--pixel);
}

.icon-telegram::before {
  box-shadow:
    4px 0 var(--pixel),
    8px 0 var(--pixel),
    12px 0 var(--pixel),
    16px 0 var(--pixel),
    0 4px var(--pixel),
    16px 4px var(--pixel),
    4px 8px #ffffff,
    8px 8px #ffffff,
    12px 8px #ffffff,
    16px 8px var(--pixel),
    0 12px var(--pixel),
    16px 12px var(--pixel),
    4px 16px var(--pixel),
    8px 16px var(--pixel),
    12px 16px var(--pixel);
}

.hero {
  min-height: calc(100svh - 130px);
  display: grid;
  place-items: center;
  padding: 1rem 0 2rem;
}

.window {
  background: var(--window);
  border: 2px solid;
  border-color: #fff #687180 #687180 #fff;
  box-shadow:
    0 0 0 2px #000,
    6px 8px 0 rgba(0, 0, 0, 0.45);
}

.window-main {
  width: min(980px, 100%);
}

.titlebar {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.3rem 0.4rem 0.3rem 0.55rem;
  background: linear-gradient(90deg, #011a4f, #1b6ec0 70%, #72c2ff);
  color: #eff8ff;
  font-family: "Press Start 2P", monospace;
  font-size: 0.58rem;
  letter-spacing: 0.05em;
  user-select: none;
}

#drag-handle {
  cursor: grab;
}

#drag-handle.dragging {
  cursor: grabbing;
}

.titlebar-actions {
  display: flex;
  gap: 0.35rem;
}

.titlebar-actions button {
  width: 24px;
  height: 20px;
  padding: 0;
  font-size: 0.52rem;
  line-height: 1;
}

.titlebar-actions button:last-child {
  background: linear-gradient(to bottom, #ffc8d1, #ff7f9a);
}

.window-body {
  padding: clamp(1rem, 2.6vw, 2rem);
}

.mog-logo-banner {
  position: relative;
  margin-bottom: 0.95rem;
  padding: 0.5rem 0.7rem 0.6rem;
  border: 2px solid;
  border-color: #fff #687180 #687180 #fff;
  background: linear-gradient(110deg, #081a37, #0f4f8f 40%, #0b2a4b);
  color: #eff8ff;
  overflow: hidden;
}

.mog-logo-banner::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -42%;
  width: 36%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.55),
    transparent
  );
  animation: sweep 2.8s linear infinite;
}

.logo-main {
  position: relative;
  display: inline-block;
  font-family: "Press Start 2P", monospace;
  font-size: clamp(1.15rem, 3.2vw, 2.1rem);
  line-height: 1.1;
  color: #fff2a5;
  text-shadow: 2px 2px 0 #000;
}

.logo-main::before,
.logo-main::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
}

.logo-main::before {
  color: #ff5d7b;
  transform: translate(1px, 0);
  opacity: 0.75;
  clip-path: inset(12% 0 56% 0);
  animation: glitch-a 1.55s steps(2, end) infinite;
}

.logo-main::after {
  color: #59f7d5;
  transform: translate(-1px, 0);
  opacity: 0.75;
  clip-path: inset(65% 0 5% 0);
  animation: glitch-b 1.95s steps(2, end) infinite;
}

.logo-sub {
  display: block;
  margin-top: 0.35rem;
  font-family: "Press Start 2P", monospace;
  font-size: 0.44rem;
  letter-spacing: 0.08em;
  color: #a6d9ff;
}

.kicker {
  margin: 0;
  font-family: "Press Start 2P", monospace;
  font-size: clamp(0.5rem, 1.4vw, 0.78rem);
  color: #093770;
}

h1 {
  margin: 0.6rem 0 0.8rem;
  font-family: "Press Start 2P", monospace;
  font-size: clamp(2rem, 8vw, 5.8rem);
  color: #fff8d9;
  text-shadow:
    3px 3px 0 #031022,
    0 0 18px rgba(255, 223, 76, 0.35);
  letter-spacing: 0.06em;
  line-height: 1;
}

.lead {
  max-width: 42ch;
  margin: 0;
  font-size: clamp(1.35rem, 2.6vw, 2.1rem);
  line-height: 1.12;
}

.hero-top-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 270px);
  gap: 1rem;
  align-items: center;
}

.hero-copy {
  min-width: 0;
}

.hero-meme {
  width: 100%;
  margin: 0 auto;
  padding: 0.42rem;
  border: 2px solid;
  border-color: #fff #687180 #687180 #fff;
  background: #cfd5df;
  justify-self: center;
  align-self: center;
}

.hero-meme img {
  display: block;
  width: 100%;
  height: auto;
  border: 2px solid;
  border-color: #fff #687180 #687180 #fff;
}

.hero-meme figcaption {
  margin-top: 0.4rem;
  font-family: "Press Start 2P", monospace;
  font-size: 0.46rem;
  color: #0f386b;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.35rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: 0.8rem 1rem;
  font-size: 0.6rem;
}

.btn.primary {
  background: linear-gradient(to bottom, #fff39b, var(--accent));
}

.btn.secondary {
  background: linear-gradient(to bottom, #b6fff4, var(--accent-2));
}

.btn:active,
.start-btn:active {
  border-color: #687180 #fff #fff #687180;
  transform: translate(1px, 1px);
}

.tiny-note {
  margin: 0.95rem 0 0;
  font-size: 1.3rem;
  opacity: 0.8;
}

.art-vault {
  margin: 0 auto 1.9rem;
}

.art-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}

.art-card {
  display: grid;
  gap: 0.45rem;
  text-decoration: none;
  padding: 0.45rem;
  border: 2px solid;
  border-color: #fff #687180 #687180 #fff;
  background: linear-gradient(160deg, #d8deea, #c7d0de);
}

.art-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 2px solid;
  border-color: #fff #687180 #687180 #fff;
  box-shadow: 0 0 0 1px #000;
}

.art-card span {
  margin: 0;
  font-family: "Press Start 2P", monospace;
  font-size: 0.48rem;
  color: #0f3a71;
}

.art-card:hover img {
  transform: translate(-1px, -1px);
}

.ticker-wrap {
  overflow: hidden;
  margin: 0 auto 1.1rem;
  border: 2px solid;
  border-color: #fff #687180 #687180 #fff;
  background: linear-gradient(90deg, #001226, #053560 35%, #004b86);
}

.ticker {
  margin: 0;
  padding: 0.45rem 0;
  white-space: nowrap;
  color: #ffde2f;
  font-family: "Press Start 2P", monospace;
  font-size: 0.55rem;
  text-shadow: 0 0 8px rgba(255, 222, 47, 0.65);
  animation: ticker 16s linear infinite;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.label {
  margin: 0 0 0.45rem;
  font-family: "Press Start 2P", monospace;
  font-size: 0.56rem;
}

code {
  display: block;
  margin-bottom: 0.8rem;
  overflow-wrap: anywhere;
  background: #edf3fa;
  border: 2px inset #aab2bd;
  padding: 0.4rem 0.5rem;
  font-size: 1.05rem;
}

.inline-link {
  color: #02366f;
  font-family: "Press Start 2P", monospace;
  font-size: 0.55rem;
}

.status-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.55rem;
  font-size: 1.32rem;
}

.footer {
  padding: 1rem 1rem 1.6rem;
  text-align: center;
  color: #dce5f4;
  font-size: 1.2rem;
}

.lifespan-wrap {
  overflow: hidden;
  margin: 0;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #687180;
  border-bottom: 2px solid #687180;
  background: linear-gradient(90deg, #061938, #0d3f73 45%, #092a50);
}

.lifespan-ticker {
  margin: 0;
  padding: 0.6rem 0.8rem;
  color: #ffde2f;
  font-family: "Press Start 2P", monospace;
  font-size: 0.52rem;
  line-height: 1.7;
  text-shadow: 0 0 8px rgba(255, 222, 47, 0.65);
}

/* Entrance sequencing: make the hero feel like a booted UI. */
.window-main .window-body > * {
  opacity: 0;
  transform: translateY(8px);
  animation: rise-in 550ms ease forwards;
}

.window-main .window-body > :nth-child(1) { animation-delay: 120ms; }
.window-main .window-body > :nth-child(2) { animation-delay: 180ms; }
.window-main .window-body > :nth-child(3) { animation-delay: 260ms; }
.window-main .window-body > :nth-child(4) { animation-delay: 340ms; }
.window-main .window-body > :nth-child(5) { animation-delay: 400ms; }

@keyframes rise-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ticker {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(-100%);
  }
}

@keyframes blink {
  50% {
    opacity: 0.25;
  }
}

@keyframes sweep {
  to {
    left: 112%;
  }
}

@keyframes glitch-a {
  0%,
  82%,
  100% {
    transform: translate(1px, 0);
  }
  84% {
    transform: translate(4px, -1px);
  }
  88% {
    transform: translate(-2px, 1px);
  }
}

@keyframes glitch-b {
  0%,
  72%,
  100% {
    transform: translate(-1px, 0);
  }
  76% {
    transform: translate(-4px, 1px);
  }
  80% {
    transform: translate(2px, -1px);
  }
}

@media (max-width: 900px) {
  .hero-top-row {
    grid-template-columns: 1fr;
  }

  .hero-meme {
    width: min(220px, 100%);
  }

  .desktop-icons {
    position: static;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.8rem;
    margin-bottom: 0.8rem;
    width: auto;
    transition: none;
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

  .desktop-icon {
    width: 100%;
  }

  .art-grid {
    grid-template-columns: 1fr;
  }

  .content-grid {
    grid-template-columns: 1fr;
  }

  .taskbar {
    grid-template-columns: auto 1fr;
  }

  .clock {
    display: none;
  }

  h1 {
    letter-spacing: 0.03em;
  }

  .btn {
    width: 100%;
  }
}

@media (min-width: 901px) {
  main {
    padding-left: clamp(7.2rem, 8vw, 8.6rem);
  }
}
