* {
  box-sizing: border-box;
}

:root {
  --win-blue: #000080;
  --win-blue-light: #1084d0;
  --gray: #c0c0c0;
  --light: #ffffff;
  --dark: #404040;
  --black: #050505;
  --green: #39ff14;
}

html, body {
  margin: 0;
  min-height: 100%;
  background: #0b1d3a;
  font-family: "Courier New", monospace;
  color: #111;
}

body {
  padding: 22px;
  overflow-x: hidden;
}

.crt {
  min-height: calc(100vh - 44px);
  position: relative;
  background: #111;
  border: 5px solid #777;
  box-shadow: 0 0 0 3px #222, 0 20px 60px #000;
  overflow: hidden;
}

.crt::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,.035) 0,
    rgba(255,255,255,.035) 1px,
    rgba(0,0,0,.12) 2px,
    rgba(0,0,0,.12) 4px
  );
  mix-blend-mode: overlay;
}

.crt::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 51;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,.42) 100%);
}

.desktop {
  min-height: calc(100vh - 54px);
  background: var(--gray);
  border: 2px solid #ddd;
}

button {
  font: inherit;
  cursor: pointer;
}

.window-title {
  height: 36px;
  padding: 3px 5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: white;
  background: linear-gradient(90deg, var(--win-blue), #0877bb);
  font-family: Arial, sans-serif;
  font-weight: bold;
  font-size: 18px;
}

.title-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.app-icon {
  background: #eee;
  color: #000080;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid #333;
}

.window-buttons button,
.panel-title button,
.mini-title button,
.content-title button {
  width: 25px;
  height: 23px;
  padding: 0;
  border: 2px outset #eee;
  background: #c0c0c0;
  font-weight: bold;
  line-height: 16px;
}

.window-buttons {
  display: flex;
  gap: 3px;
}

.menu-bar {
  height: 31px;
  display: flex;
  align-items: center;
  gap: 3px;
  padding-left: 5px;
  border-bottom: 2px solid #808080;
}

.menu-bar button {
  border: 0;
  background: transparent;
  padding: 4px 9px;
}

.menu-bar button:hover {
  background: var(--win-blue);
  color: white;
}

.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 75px;
  padding: 6px 12px;
  border-top: 2px solid white;
  border-bottom: 2px solid #777;
}

.tool {
  min-width: 78px;
  border: 0;
  background: transparent;
  font-size: 17px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.tool span {
  font-size: 13px;
}

.tool:hover {
  background: #ddd;
}

.muted {
  opacity: .45;
}

.address-row {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 9px;
  border-top: 2px solid white;
  border-bottom: 2px solid #777;
}

.address-label {
  font-weight: bold;
}

.address-box {
  flex: 1;
  background: white;
  border: 2px inset #eee;
  padding: 6px 10px;
  overflow: hidden;
  white-space: nowrap;
}

.go-btn {
  border: 2px outset #eee;
  background: #c0c0c0;
  padding: 5px 12px;
}

.browser {
  display: grid;
  grid-template-columns: 245px 1fr;
  min-height: 580px;
}

.sidebar {
  padding: 7px;
  border-right: 3px ridge #eee;
  background: linear-gradient(90deg, #5e7da7, #2d5688);
}

.panel-title,
.mini-title,
.content-title {
  color: white;
  background: var(--win-blue);
  min-height: 27px;
  padding: 3px 6px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.side-link {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px 10px;
  border: 0;
  background: transparent;
  color: white;
  font-weight: bold;
  text-align: left;
  font-size: 15px;
}

.side-link:hover,
.side-link.active {
  background: rgba(0,0,128,.45);
  outline: 1px dotted white;
}

.now-playing {
  margin-top: 35px;
  background: #ddd;
  border: 2px outset #eee;
  color: #111;
}

.song {
  padding: 12px 8px;
  line-height: 1.5;
}

.time {
  display: flex;
  justify-content: space-between;
  padding: 0 8px 4px;
  font-size: 12px;
}

.progress {
  margin: 4px 8px 10px;
  height: 13px;
  border: 2px inset #eee;
  background: white;
}

.progress div {
  height: 100%;
  width: 35%;
  background: #008000;
}

.player-buttons {
  display: flex;
  gap: 5px;
  padding: 7px;
}

.player-buttons button {
  flex: 1;
  height: 35px;
  border: 2px outset #eee;
  background: #c0c0c0;
}

.content {
  background: #ddd;
  padding: 10px;
  overflow: hidden;
}

.hero {
  height: 180px;
  background: #050505;
  border: 5px inset #888;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-around;
  position: relative;
  overflow: hidden;
  margin-bottom: 10px;
}

.hero::before {
  content: "✦   ·  ✦      ·    ✦   ·       ✦";
  position: absolute;
  inset: 0;
  color: #3cff22;
  opacity: .45;
  letter-spacing: 18px;
  line-height: 70px;
  animation: stars 2s steps(2) infinite;
}

.hero-copy {
  position: relative;
  z-index: 2;
  text-align: center;
}

.pixel-title {
  font-family: Impact, "Arial Black", sans-serif;
  font-size: clamp(38px, 7vw, 72px);
  letter-spacing: 5px;
  text-shadow: 4px 4px #555;
}

.press-start {
  color: var(--green);
  font-weight: bold;
  font-size: 24px;
  margin-top: 8px;
  animation: blink 1s steps(2) infinite;
}

.hero-art {
  font-size: 60px;
  position: relative;
  z-index: 2;
  filter: grayscale(.25);
}

.content-window {
  border: 3px ridge #eee;
  background: #ddd;
  margin-bottom: 9px;
}

.content-title {
  font-size: 15px;
}

.article-body {
  display: flex;
  gap: 18px;
  align-items: center;
  padding: 12px;
  min-height: 88px;
  line-height: 1.45;
}

.article-body p {
  margin: 0;
}

.big-icon {
  min-width: 55px;
  font-size: 42px;
  text-align: center;
}

.hidden-section {
  display: none;
}

.favorite-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: stretch;
}

.favorite-grid > div {
  border: 2px inset #eee;
  padding: 12px;
  background: #f1f1f1;
  line-height: 1.7;
}

.bottom {
  display: grid;
  grid-template-columns: 1.7fr .65fr 1.3fr;
  gap: 8px;
  padding: 7px;
  border-top: 3px ridge #fff;
  background: #aaa;
}

.terminal,
.coin,
.system-info {
  min-height: 125px;
  border: 3px ridge #eee;
}

.terminal {
  background: #000;
  color: var(--green);
  padding: 13px;
  line-height: 1.4;
  font-weight: bold;
}

.cursor {
  animation: blink .7s steps(2) infinite;
}

.coin {
  background: #ddd;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.coin-icon {
  font-size: 34px;
}

.system-info {
  background: #ddd;
  padding-bottom: 7px;
  font-size: 13px;
}

.system-info > div:not(.panel-title) {
  padding-left: 12px;
  line-height: 1.35;
}

.statusbar {
  height: 27px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 7px;
  border-top: 2px solid #777;
  font-size: 12px;
}

.toast {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(.8);
  opacity: 0;
  pointer-events: none;
  background: #000080;
  color: white;
  padding: 18px 28px;
  border: 3px outset white;
  z-index: 100;
  font-weight: bold;
}

.toast.show {
  animation: toast .9s ease;
}

.vhs-glitch {
  animation: glitch .18s steps(2) 2;
}

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

@keyframes stars {
  50% { transform: translateX(5px); opacity: .7; }
}

@keyframes toast {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.8); }
  20%, 80% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.05); }
}

@keyframes glitch {
  0% { transform: translate(0); filter: none; }
  25% { transform: translate(3px, -1px); filter: hue-rotate(45deg); }
  50% { transform: translate(-4px, 1px); }
  75% { transform: translate(2px, 0); filter: saturate(2); }
  100% { transform: translate(0); filter: none; }
}

@media (max-width: 850px) {
  body { padding: 8px; }
  .browser { grid-template-columns: 1fr; }
  .sidebar { border-right: 0; border-bottom: 3px ridge #eee; }
  .now-playing { margin-top: 12px; }
  .side-link { display: inline-flex; width: auto; margin-right: 4px; }
  .bottom { grid-template-columns: 1fr; }
  .favorite-grid { grid-template-columns: 1fr; }
  .hero-art { display: none; }
}

@media (max-width: 550px) {
  .toolbar { overflow-x: auto; }
  .tool { min-width: 65px; }
  .window-title { font-size: 14px; }
  .menu-bar { overflow-x: auto; }
  .article-body { align-items: flex-start; }
}
