:root {
  --shell-bg-top: #c9cfdb;
  --shell-bg-bottom: #b7c0d0;
  --shell-border-dark: #58637a;
  --shell-border-light: #edf2fb;
  --shell-window: #dce2ee;
  --shell-title: #2d4f86;
  --shell-text: #0f172a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Lucida Console", "Courier New", monospace;
  color: var(--shell-text);
  background: linear-gradient(180deg, var(--shell-bg-top) 0%, var(--shell-bg-bottom) 100%);
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.04) 0px,
    rgba(255, 255, 255, 0.04) 1px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 3px
  );
  opacity: 0.25;
  z-index: 2;
}

.retro-header {
  max-width: 1680px;
  margin: 0 auto;
  padding: 18px 20px 10px;
}

.retro-header h1 {
  margin: 0;
  font-size: 1.4rem;
  letter-spacing: 0.03em;
}

.retro-header p {
  margin: 6px 0 0;
  font-size: 0.83rem;
}

.retro-nav {
  margin-top: 10px;
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
}

.retro-nav a {
  text-decoration: none;
  color: var(--shell-text);
  border: 1px solid var(--shell-border-dark);
  background: #dce2ee;
  box-shadow: inset 1px 1px 0 var(--shell-border-light), inset -1px -1px 0 #7a859c;
  padding: 5px 9px;
  font-size: 0.76rem;
}

.retro-nav a.active {
  background: #e9edf5;
  color: #113a7a;
}

.retro-main {
  max-width: 1680px;
  margin: 0 auto;
  padding: 10px 20px 18px;
}

.retro-window {
  border: 1px solid var(--shell-border-dark);
  box-shadow: inset 1px 1px 0 var(--shell-border-light), inset -1px -1px 0 #7a859c;
  background: var(--shell-window);
}

.retro-window-title {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border-bottom: 1px solid #6a7591;
  background: linear-gradient(180deg, #46679d 0%, var(--shell-title) 100%);
  color: #eef4ff;
  font-size: 0.8rem;
}

.retro-window-title-left,
.retro-window-title-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.retro-led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7cff8b;
  box-shadow: 0 0 6px rgba(124, 255, 139, 0.85);
}

.mission-pack-pill {
  border: 1px solid #95a7ca;
  background: rgba(255, 255, 255, 0.16);
  padding: 2px 8px;
  font-size: 0.72rem;
}

.retro-window-controls {
  display: inline-flex;
  gap: 4px;
}

.retro-window-controls .ctrl {
  min-width: 18px;
  text-align: center;
  border: 1px solid #95a7ca;
  background: rgba(255, 255, 255, 0.12);
  line-height: 1.2;
  font-size: 0.7rem;
}

#retro-app-frame {
  width: 100%;
  min-height: calc(100vh - 140px);
  border: 0;
  display: block;
  background: #dce2ee;
}

.retro-status-bar {
  min-height: 22px;
  border-top: 1px solid #6a7591;
  background: #cfd7e6;
  box-shadow: inset 1px 1px 0 #f2f5fa, inset -1px -1px 0 #8a95a8;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 3px 8px;
  font-size: 0.72rem;
  color: #1d2d4b;
}

@media (max-width: 900px) {
  .retro-header,
  .retro-main {
    padding-left: 12px;
    padding-right: 12px;
  }

  #retro-app-frame {
    min-height: calc(100vh - 170px);
  }

  .retro-window-controls {
    display: none;
  }
}
