/* Past window styles (1995 retro frame) */

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.past-window {
  margin: 20px 0 60px;
}

.retro-frame {
  border-radius: 12px;
  border: 1px solid rgba(21,57,68,0.18);
  box-shadow: 0 30px 60px rgba(5, 8, 16, 0.18);
  background: linear-gradient(180deg, #ffffff 0%, #f7f9fb 100%);
  overflow: hidden;
}

.retro-titlebar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px;
  font-weight: 600;
  color: #0e2d34;
  background: linear-gradient(180deg, #e4eef9 0%, #d5e6f6 80%, #caddf1 100%);
  border-bottom: 1px solid rgba(21,57,68,0.12);
}

.retro-title { letter-spacing: 0.2px; }

.retro-controls { display: inline-flex; gap: 10px; align-items: center; }
.retro-controls .retro-toggle {
  appearance: none; border: 1px solid rgba(21,57,68,0.22);
  background: #fff; color: #0e2d34; font-weight: 600;
  padding: 6px 10px; border-radius: 999px; cursor: pointer;
  box-shadow: 0 6px 14px rgba(5,8,16,0.12);
}
.retro-controls .retro-open {
  text-decoration: none; font-weight: 600; color: #0e2d34;
  background: #DBEEF7; padding: 6px 10px; border-radius: 999px;
  box-shadow: 0 6px 14px rgba(86,147,212,0.25);
}
.retro-controls .retro-open:hover { filter: brightness(0.98); }
.retro-now { margin-left: 8px; font-weight: 600; color: #576b75; }

.retro-viewport {
  position: relative; background: #fdfbe6; /* slightly vintage parchment */
  min-height: 560px; /* will auto-size via JS when possible */
}
.retro-viewport iframe {
  display: block; width: 100%; height: 700px; border: 0;
  background: #fdfbe6;
}

/* Retro mode effects */
.retro-frame.retro .retro-viewport { filter: sepia(0.18) contrast(1.03) saturate(1.05); }
.retro-frame.retro .retro-viewport::after {
  content: "";
  position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0,0,0,0.06), rgba(0,0,0,0.06) 1px,
    rgba(0,0,0,0) 3px, rgba(0,0,0,0) 4px
  );
  mix-blend-mode: multiply; opacity: 0.35;
}

@media (max-width: 720px) {
  .retro-viewport iframe { height: 600px; }
}

/* Dark mode adjustments */
body.dark-mode .retro-frame {
  background: linear-gradient(180deg, #0f1a22 0%, #0a1218 100%);
  border-color: rgba(255,255,255,0.12);
}
body.dark-mode .retro-titlebar {
  color: #dfe9ef;
  background: linear-gradient(180deg, #1b2c3a 0%, #162531 100%);
  border-bottom-color: rgba(255,255,255,0.12);
}
body.dark-mode .retro-controls .retro-toggle { background: #122029; color: #dfe9ef; border-color: rgba(255,255,255,0.18); }
body.dark-mode .retro-controls .retro-open { color: #0e2d34; }
body.dark-mode .retro-now { color: #a9bac4; }
