/* ============================================================
   RETRO DESIGN SYSTEM — crimsh.com
   Windows 95 / CRT aesthetic
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&family=VT323&display=swap');

:root {
  --bg: #c0c0c0;
  --dot-color: #a0a0a0;
  --win-bg: #ffffff;
  --win-border: #000000;
  --win-title-bg: #000000;
  --win-title-text: #ffffff;
  --win-shadow: 4px 4px 0px #000;
  --accent: #ff0000;
  --text: #111111;
  --gray-win: #d4d4d4;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background-color: var(--bg);
  background-image: radial-gradient(var(--dot-color) 1px, transparent 1px);
  background-size: 6px 6px;
  font-family: 'Share Tech Mono', monospace;
  color: var(--text);
  min-height: 100vh;
  padding: 24px 16px 60px;
  cursor: default;
}

/* ---- DESKTOP CONTAINER ---- */
.desktop {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ---- WINDOW BASE ---- */
.window {
  background: var(--win-bg);
  border: 2.5px solid var(--win-border);
  box-shadow: var(--win-shadow);
  position: relative;
}
.window.gray { background: var(--gray-win); }
.window.dark { background: #0a0a0a; }

.window-title {
  background: var(--win-title-bg);
  color: var(--win-title-text);
  font-family: 'VT323', monospace;
  font-size: 18px;
  padding: 4px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  letter-spacing: 0.05em;
  user-select: none;
}
.window-title.green-bar { background: #004400; }
.window-title.red-bar   { background: #440000; }

.window-body { padding: 16px 20px; }

.close-btn {
  width: 18px; height: 18px;
  background: var(--win-bg);
  border: 2px solid var(--win-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  color: #000;
  cursor: pointer;
  font-family: 'Share Tech Mono', monospace;
  flex-shrink: 0;
}

/* ---- HEADER ROW ---- */
.header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.title-badge {
  background: #000;
  color: #fff;
  font-family: 'VT323', monospace;
  font-size: 32px;
  padding: 5px 14px 2px;
  border: 3px solid #000;
  letter-spacing: 0.04em;
  line-height: 1;
  white-space: nowrap;
}

.handle-badge {
  background: var(--win-bg);
  border: 2.5px solid #000;
  box-shadow: var(--win-shadow);
  font-size: 13px;
  padding: 5px 12px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}
.handle-badge .icon {
  width: 20px; height: 20px;
  background: #000;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
}

.live-badge {
  background: #004400;
  color: #00ff00;
  border: 2.5px solid #000;
  box-shadow: var(--win-shadow);
  padding: 6px 14px;
  display: flex; align-items: center; gap: 8px;
  font-family: 'VT323', monospace;
  font-size: 18px;
}

/* ---- TITLE DOT ---- */
.title-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 4px;
  animation: pulse-dot 2s ease-in-out infinite;
}
.title-dot.green { background: #00ff00; }
.title-dot.red   { background: #ff0000; }
@keyframes pulse-dot { 0%,100%{opacity:1} 50%{opacity:0.3} }

/* ---- AVATAR BOX ---- */
.avatar-box {
  width: 90px; height: 90px;
  border: 2.5px solid #000;
  background: #000;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.avatar-box .pixel-face {
  font-family: 'VT323', monospace;
  font-size: 52px;
  color: #fff;
  line-height: 1;
}

/* ---- INTRO TEXT ---- */
.intro-text p {
  font-size: 13px;
  line-height: 1.6;
  color: #222;
}
.intro-text p + p { margin-top: 8px; }

/* ---- STATUS BAR ---- */
.status-bar {
  background: #000;
  color: #fff;
  font-size: 12px;
  padding: 3px 10px;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.status-bar span { opacity: 0.7; }
.status-bar span.live { opacity: 1; color: #7fff7f; }

/* ---- LAYOUT GRIDS ---- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.col-2-1 {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 14px;
}
.col-1-2 {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 14px;
}

/* ---- NAV LIST ---- */
.nav-list { list-style: none; }
.nav-list li { border-bottom: 1.5px solid #ccc; }
.nav-list li:last-child { border-bottom: none; }
.nav-list a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 4px;
  text-decoration: none;
  color: var(--text);
  font-size: 13px;
  transition: background 0.1s;
}
.nav-list a:hover { background: #000; color: #fff; }
.nav-list a .file-icon {
  font-size: 15px;
  width: 20px;
  text-align: center;
}
.nav-list a .badge {
  margin-left: auto;
  background: #000;
  color: #fff;
  font-size: 10px;
  padding: 1px 5px;
}

/* ---- LINKS GRID ---- */
.links-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.link-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 6px;
  border: 2px solid #000;
  background: #fff;
  text-decoration: none;
  color: #000;
  font-size: 11px;
  text-align: center;
  cursor: pointer;
  transition: background 0.1s, color 0.1s;
  box-shadow: 2px 2px 0 #000;
  font-family: 'Share Tech Mono', monospace;
}
.link-btn:hover { background: #000; color: #fff; }
.link-btn .btn-icon { font-size: 22px; }

/* ---- TERMINAL ---- */
.terminal-body {
  background: #000;
  color: #7fff7f;
  padding: 14px 16px;
  font-size: 13px;
  line-height: 1.7;
  min-height: 110px;
  font-family: 'Share Tech Mono', monospace;
}
.terminal-body .prompt { color: #fff; }
.terminal-body .t-val { color: #7fff7f; }
.terminal-body .t-warn { color: #ffff00; }
.terminal-body .t-err  { color: #ff4444; }
.terminal-body .cursor {
  display: inline-block;
  width: 9px; height: 15px;
  background: #7fff7f;
  vertical-align: middle;
  animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ---- NOTICE / PRIVACY BODY ---- */
.notice-body {
  font-size: 12px;
  line-height: 1.65;
  color: #444;
}
.notice-body p + p { margin-top: 6px; }
.notice-body strong { color: #000; }
.notice-body h2 {
  font-family: 'VT323', monospace;
  font-size: 20px;
  margin: 14px 0 4px;
  border-bottom: 1.5px solid #000;
}
.notice-body ul {
  margin: 6px 0 10px 16px;
  font-size: 12px;
  line-height: 1.65;
  color: #444;
}

/* ---- CONTACT LIST ---- */
.contact-list { list-style: none; }
.contact-list li {
  padding: 7px 0;
  border-bottom: 1px dashed #bbb;
  font-size: 13px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.contact-list li:last-child { border-bottom: none; }
.contact-list a { color: #000; text-decoration: underline; }
.contact-list a:hover { background: #000; color: #fff; }
.contact-list .c-key {
  font-size: 11px;
  background: #000;
  color: #fff;
  padding: 1px 5px;
  flex-shrink: 0;
  align-self: center;
}

/* ---- SOCIAL BUTTONS ---- */
.social-row { display: flex; gap: 8px; flex-wrap: wrap; }
.social-btn {
  display: flex; align-items: center; gap: 6px;
  border: 2px solid #000; background: #fff;
  padding: 6px 12px; font-size: 12px;
  text-decoration: none; color: #000;
  box-shadow: 2px 2px 0 #000; cursor: pointer;
  transition: background 0.1s, color 0.1s;
  font-family: 'Share Tech Mono', monospace;
}
.social-btn:hover { background: #000; color: #fff; }

/* ---- DONATE BUTTONS ---- */
.donate-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.donate-btn {
  display: flex; align-items: center; gap: 8px;
  border: 2px solid #000; background: #fff;
  padding: 7px 12px; font-size: 12px;
  text-decoration: none; color: #000;
  box-shadow: 2px 2px 0 #000;
  transition: background 0.1s, color 0.1s;
  font-family: 'Share Tech Mono', monospace;
}
.donate-btn:hover { background: #000; color: #fff; }
.donate-btn .d-icon { font-size: 18px; width: 22px; text-align: center; }

/* ---- SOURCES GRID ---- */
.sources-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.source-tag {
  border: 2px solid #000;
  padding: 8px 10px;
  font-size: 11.5px;
  background: #fff;
  display: flex; align-items: center; gap: 6px;
}
.source-tag .s-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #000;
  flex-shrink: 0;
}

/* ---- METRICS GRID ---- */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.metric-card {
  border: 2.5px solid #000;
  background: #fff;
  box-shadow: 2px 2px 0 #000;
  padding: 10px 12px;
}
.metric-card .m-source {
  font-size: 10px; color: #888; letter-spacing: 0.08em;
  border-bottom: 1px solid #ddd; padding-bottom: 4px; margin-bottom: 6px;
}
.metric-card .m-label { font-size: 11px; color: #555; margin-bottom: 3px; }
.metric-card .m-value {
  font-family: 'VT323', monospace; font-size: 34px; line-height: 1;
}
.metric-card .m-value.green  { color: #006600; }
.metric-card .m-value.red    { color: #c00000; }
.metric-card .m-value.yellow { color: #a07000; }
.metric-card .m-value.white  { color: #111; }
.metric-card .m-delta { font-size: 10px; margin-top: 4px; color: #888; }
.metric-card .m-delta.up   { color: #c00000; }
.metric-card .m-delta.down { color: #006600; }

/* ---- ALERT GAUGE ---- */
.alert-gauge {
  flex-shrink: 0;
  width: 90px; height: 90px;
  border: 3px solid #000;
  background: #000;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 2px;
}
.alert-gauge .gauge-label {
  font-size: 10px; color: #888; letter-spacing: 0.1em;
}
.alert-gauge .gauge-value {
  font-family: 'VT323', monospace; font-size: 44px;
  line-height: 1; color: #c8a800;
}
.alert-gauge .gauge-text {
  font-family: 'VT323', monospace; font-size: 16px;
  color: #c8a800; letter-spacing: 0.05em;
}

/* ---- NEWS TICKER ---- */
.news-ticker {
  background: #000;
  color: #7fff7f;
  padding: 6px 0;
  overflow: hidden;
  white-space: nowrap;
}
.ticker-inner {
  display: inline-block;
  animation: ticker 32s linear infinite;
  font-size: 13px;
  padding-left: 100%;
  font-family: 'Share Tech Mono', monospace;
}
@keyframes ticker { 0%{transform:translateX(0)} 100%{transform:translateX(-100%)} }

/* ---- REPORTS LIST ---- */
.reports-list { list-style: none; }
.reports-list li {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 4px; border-bottom: 1.5px solid #ddd;
  font-size: 13px;
}
.reports-list li:last-child { border-bottom: none; }
.reports-list .r-date {
  font-family: 'VT323', monospace; font-size: 17px;
  color: #666; width: 110px; flex-shrink: 0;
}
.reports-list .r-name { flex: 1; }
.reports-list a { color: #000; text-decoration: underline; }
.reports-list a:hover { background: #000; color: #fff; }
.reports-list .r-badge {
  background: #000; color: #fff;
  font-size: 10px; padding: 1px 6px; flex-shrink: 0;
}
.reports-list .r-badge.new { background: #c00000; }

/* ---- COMING SOON ---- */
.coming-soon {
  border: 2.5px dashed #000;
  background: var(--gray-win);
  padding: 20px;
  text-align: center;
  opacity: 0.7;
}
.coming-soon .cs-label {
  font-family: 'VT323', monospace; font-size: 28px;
  display: block; margin-bottom: 6px;
}
.coming-soon p { font-size: 12px; color: #555; }

/* ---- LOADING ---- */
.loading-dots::after {
  content: '...';
  animation: ldots 1.5s steps(3,end) infinite;
}
@keyframes ldots { 0%{content:'.'} 33%{content:'..'} 66%{content:'...'} }

/* ---- IMAGE IN WINDOW ---- */
.win-img {
  display: block;
  width: 100%;
  height: auto;
  border: 2px solid #000;
}
.win-img-caption {
  font-size: 11px;
  color: #666;
  text-align: center;
  margin-top: 6px;
}

/* ---- CRYPTO ADDRESS ---- */
.crypto-addr {
  font-size: 11px;
  word-break: break-all;
  background: #000;
  color: #7fff7f;
  padding: 8px 10px;
  margin: 4px 0 10px;
  border: 2px solid #000;
}

/* ---- ARROW DECO ---- */
.arrow-deco {
  display: flex;
  justify-content: flex-end;
}
.pixel-arrow {
  font-family: 'VT323', monospace;
  font-size: 36px;
  line-height: 1;
  color: #000;
}

/* ---- TASKBAR ---- */
.taskbar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: #c0c0c0;
  border-top: 2.5px solid #000;
  display: flex;
  align-items: center;
  padding: 4px 12px;
  gap: 8px;
  z-index: 100;
}
.start-btn {
  background: #000; color: #fff;
  font-family: 'VT323', monospace;
  font-size: 18px;
  padding: 2px 12px;
  border: none;
  cursor: pointer;
  letter-spacing: 0.05em;
  text-decoration: none;
  display: inline-block;
}
.start-btn:hover { background: #333; color: #fff; }
.taskbar-item {
  background: #fff;
  border: 2px solid #000;
  font-size: 11px;
  padding: 2px 10px;
  display: flex; align-items: center; gap: 5px;
  font-family: 'Share Tech Mono', monospace;
  text-decoration: none;
  color: #000;
}
.taskbar-item.active {
  background: #c0c0c0;
  border-style: inset;
}
.taskbar-live {
  background: #004400; color: #00ff00;
  border: 2px solid #000;
  font-size: 11px; padding: 2px 10px;
  font-family: 'Share Tech Mono', monospace;
  text-decoration: none;
}
.taskbar-clock {
  margin-left: auto;
  background: #fff; border: 2px solid #000;
  font-family: 'VT323', monospace;
  font-size: 16px;
  padding: 2px 10px;
  min-width: 65px; text-align: center;
}

/* ---- FOOTER ---- */
.retro-footer {
  text-align: center;
  font-size: 12px;
  color: #666;
  padding-bottom: 4px;
}
.retro-footer a { color: #000; text-decoration: none; }
.retro-footer a:hover { text-decoration: underline; }

/* ---- MAP CONTAINER ---- */
.map-window-body {
  padding: 0;
  height: 280px;
  overflow: hidden;
}
.map-window-body #map {
  width: 100%;
  height: 100%;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 640px) {
  .two-col, .col-2-1, .col-1-2 { grid-template-columns: 1fr; }
  .title-badge { font-size: 38px; }
  .metrics-grid { grid-template-columns: 1fr 1fr; }
  .sources-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 400px) {
  .metrics-grid { grid-template-columns: 1fr; }
}
