/* ============================================
   doresti's homepage, retro 2000s under-construction theme
   ============================================ */

@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

@keyframes tape-scroll {
  0% { background-position: 0 0; }
  100% { background-position: 56px 0; }
}

@keyframes tape-scroll-v {
  0% { background-position: 0 0; }
  100% { background-position: 0 56px; }
}

@keyframes glow {
  0%, 100% { text-shadow: 0 0 4px #0ff, 0 0 10px #0ff, 0 0 18px #f0f; }
  50% { text-shadow: 0 0 8px #f0f, 0 0 16px #f0f, 0 0 28px #0ff; }
}

@keyframes twinkle {
  0%, 100% { opacity: 0; }
  50% { opacity: 0.8; }
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background-color: #000;
  background-image: url("../res/bgs/spark.gif");
  background-repeat: repeat;
  color: #e0e0e0;
  font-family: "Comic Sans MS", "Comic Sans", cursive, sans-serif;
  cursor: url("../res/cursors/wii/wii-pointer-ccw.cur"), auto;
}

a, a:visited, .blinkie, .player-controls button, .browser-toggle,
.music-browser li, .enter-btn, .toggle-btn, input[type="range"]#volume-slider {
  cursor: url("../res/cursors/wii/wii-pointer-blue-ccw.cur"), pointer;
}

/* ---- popup windows (98.css/XP.css/7.css themed, deliberately opted out
   of the site's own Wii cursor so they read as their own OS chrome) ---- */
.popup-window {
  position: fixed;
  width: 300px;
  cursor: default;
}
.popup-window .window {
  width: 100%;
}
.popup-window .title-bar {
  cursor: move;
}
.popup-window .window-body img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

/* XP.css's default window border reads a little thin at this size; this
   doubles the inset offsets of the same blue gradient bevel XP.css already
   defines, rather than editing the vendored file directly */
body.popup-theme-xp .popup-window .window {
  box-shadow:
    inset -2px -2px #00138c,
    inset 2px 2px #0831d9,
    inset -4px -4px #001ea0,
    inset 4px 4px #166aee,
    inset -6px -6px #003bda,
    inset 6px 6px #0855dd;
}

/* ---- desynced sparkle background (main page, behind the splash gate) ---- */
#sparkle-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.sparkle-tile {
  position: absolute;
  width: 304px;
  height: 234px;
  display: block;
}

/* ---- caution tape border frame ---- */
.tape {
  position: fixed;
  z-index: 100;
  background-image: repeating-linear-gradient(
    45deg,
    #ffd500 0px,
    #ffd500 28px,
    #111 28px,
    #111 56px
  );
  pointer-events: none;
  box-shadow: 0 0 6px #000 inset;
}

.tape-top, .tape-bottom {
  left: 0;
  right: 0;
  height: 18px;
  animation: tape-scroll 2.5s linear infinite;
}
.tape-top { top: 0; }
.tape-bottom { bottom: 0; }

.tape-left, .tape-right {
  top: 0;
  bottom: 0;
  width: 18px;
  animation: tape-scroll-v 2.5s linear infinite;
}
.tape-left { left: 0; }
.tape-right { right: 0; }

.page-wrap {
  padding: 30px 24px;
  max-width: 900px;
  margin: 0 auto;
}

/* ---- marquee ---- */
.top-marquee {
  background: #000;
  border: 2px dashed #ffd500;
  color: #ffd500;
  font-weight: bold;
  padding: 6px 0;
  margin-bottom: 20px;
  font-family: "Courier New", monospace;
  letter-spacing: 1px;
}

/* ---- header ---- */
.site-header {
  text-align: center;
  margin-bottom: 10px;
}

.site-title {
  font-family: "Times New Roman", Times, serif;
  font-size: 3rem;
  font-weight: bold;
  color: #ff00ff;
  text-shadow: 0 0 4px #0ff, 0 0 10px #0ff, 0 0 18px #f0f;
  animation: blink 1.4s step-start infinite, glow 3s ease-in-out infinite;
  margin: 10px 0 0;
}

.subtitle {
  color: #0ff;
  font-style: italic;
  margin: 4px 0 14px;
}

.construction-banner {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  background: repeating-linear-gradient(45deg, #ffd500 0px, #ffd500 20px, #111 20px, #111 40px);
  color: #111;
  font-weight: bold;
  font-family: "Courier New", monospace;
  padding: 8px;
  border: 3px solid #111;
  text-shadow: none;
}
.construction-banner span {
  background: #000;
  color: #ffd500;
  padding: 2px 8px;
}

/* ---- nav ---- */
.site-nav {
  text-align: center;
  background: #000;
  border: 2px solid #0ff;
  padding: 8px;
  margin: 18px 0;
  font-weight: bold;
}
.site-nav a {
  color: #0ff;
}
.site-nav a:visited {
  color: #f0f;
}

/* ---- links (generic) ---- */
a {
  color: #33aaff;
  text-decoration: underline;
}
a:visited {
  color: #cc66ff;
}
a:hover {
  color: #ffd500;
}

/* ---- music player ---- */
.music-player {
  background: #111;
  border: 2px ridge #ffd500;
  padding: 10px;
  margin-bottom: 20px;
}

.player-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.player-controls button {
  background: #000;
  color: #0f0;
  border: 2px outset #0f0;
  font-family: "Courier New", monospace;
  font-weight: bold;
  font-size: 0.75rem;
  padding: 6px 10px;
  /* matches sfx.js FADE_IN_MS, so the button glow crossfades in step
     with the music fading back in after an interaction sound */
  transition: color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}
.player-controls button:active {
  border-style: inset;
}
.player-controls button.active {
  color: #ffd500;
  border-color: #ffd500;
  box-shadow: 0 0 6px #ffd500;
}

.volume-control {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #0ff;
  font-family: "Courier New", monospace;
  font-size: 0.9rem;
}

.now-playing {
  color: #ffd500;
  font-family: "Courier New", monospace;
  font-size: 0.9rem;
}

.now-playing-row {
  text-align: center;
  color: #ffd500;
  font-family: "Courier New", monospace;
  font-size: 0.85rem;
  margin-top: 10px;
}

.browser-toggle {
  display: block;
  width: 100%;
  margin-top: 10px;
  background: #000;
  color: #0ff;
  border: 1px solid #0ff;
  font-family: "Courier New", monospace;
  font-size: 0.8rem;
  padding: 6px 10px;
  text-align: left;
}

.music-browser {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  border: 1px dashed #0ff;
  max-height: 200px;
  overflow-y: auto;
}

.music-browser li {
  padding: 6px 10px;
  font-family: "Courier New", monospace;
  font-size: 0.85rem;
  color: #0f0;
  border-bottom: 1px solid #222;
}
.music-browser li:hover {
  background: #222;
}
.music-browser li.now-playing-track {
  color: #ffd500;
  background: #1a1a00;
}

/* ---- splash / entry gate ---- */
.splash-gate {
  position: fixed;
  top: 18px;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 90;
  overflow: hidden;
  background-color: #000;
  background-image:
    radial-gradient(circle, #1a1a2e 1px, transparent 1px),
    radial-gradient(circle, #16213e 1px, transparent 1px);
  background-size: 40px 40px, 60px 60px;
  background-position: 0 0, 20px 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: opacity 0.6s ease;
}

.twinkle-star {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: #aef;
  box-shadow: 0 0 4px 1px #aef;
  opacity: 0;
  pointer-events: none;
  animation-name: twinkle;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}

.splash-gate.hidden {
  opacity: 0;
  pointer-events: none;
}

.splash-inner {
  position: relative;
  z-index: 1;
  max-width: 480px;
  padding: 20px;
}

.splash-tag {
  color: #ffd500;
  font-family: "Courier New", monospace;
  font-weight: bold;
}

.splash-title {
  font-family: "Times New Roman", Times, serif;
  font-size: 2.0rem;
  color: #0ff;
  text-shadow: 0 0 10px #0ff, 0 0 18px #f0f;
  margin: 10px 0 24px;
}

.enter-btn {
  background: #000;
  color: #0f0;
  border: 3px outset #0f0;
  font-family: "Courier New", monospace;
  font-weight: bold;
  font-size: 1.1rem;
  padding: 10px 22px;
}
.enter-btn:active {
  border-style: inset;
}
.enter-btn:disabled {
  opacity: 0.6;
}

.enter-btn.chill-strobe {
  animation: chill-strobe 0.75s ease-in-out infinite;
}

@keyframes chill-strobe {
  0%, 100% {
    background: #000;
    color: #0f0;
    border-color: #0f0;
    box-shadow: 0 0 4px #0f0;
  }
  50% {
    background: #221a00;
    color: #ffd500;
    border-color: #ffd500;
    box-shadow: 0 0 12px #ffd500;
  }
}

.splash-hint {
  color: #999;
  font-size: 0.85rem;
  margin-top: 14px;
}

/* ---- content "table" cells ---- */
.content-table {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.content-cell {
  border: 3px double #0ff;
  background: rgba(0, 0, 0, 0.65);
  padding: 4px;
}

.content-cell h2 {
  background: #ff00ff;
  color: #000;
  margin: 0;
  padding: 6px 10px;
  font-family: "Times New Roman", Times, serif;
}

.cell-inner {
  padding: 14px;
}

.placeholder-note {
  color: #888;
  font-style: italic;
}

/* ---- guestbook ---- */
.guestbook-box {
  border: 2px dashed #ffd500;
  text-align: center;
}

/* ---- links grid / blinkies ---- */
.links-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.blinkie {
  display: inline-block;
  width: 150px;
  height: 20px;
  line-height: 20px;
  text-align: center;
  background: #000;
  color: #0f0;
  border: 1px solid #0f0;
  font-family: "Courier New", monospace;
  font-size: 0.7rem;
  font-weight: bold;
  text-decoration: none;
  animation: blink 1.6s step-start infinite;
}
.blinkie:visited {
  color: #0f0;
}

/* ---- webring ---- */
.webring-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: "Courier New", monospace;
  color: #ffd500;
  text-align: center;
  flex-wrap: wrap;
  gap: 8px;
}

/* ---- visitor counter ---- */
.counter-box {
  text-align: center;
  margin: 26px 0;
}

.counter-box p {
  color: #0ff;
  margin-bottom: 6px;
}

.odometer {
  display: inline-block;
  background: #000;
  color: #0f0;
  font-family: "Courier New", monospace;
  font-size: 1.8rem;
  font-weight: bold;
  letter-spacing: 6px;
  padding: 8px 16px;
  border: 3px inset #666;
}

/* ---- footer ---- */
.site-footer {
  text-align: center;
  border-top: 3px double #0ff;
  padding-top: 16px;
  color: #999;
  font-size: 0.85rem;
}

.badge-row {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 10px 0;
}

.badge {
  background: #222;
  color: #ffd500;
  border: 1px solid #ffd500;
  padding: 3px 8px;
  font-family: "Courier New", monospace;
  font-size: 0.7rem;
}

.last-updated {
  color: #0ff;
}

.toggle-row {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.toggle-btn {
  background: #000;
  color: #0f0;
  border: 2px outset #0f0;
  font-family: "Courier New", monospace;
  font-weight: bold;
  font-size: 0.75rem;
  padding: 6px 10px;
}
.toggle-btn:active {
  border-style: inset;
}
.toggle-btn.active {
  color: #ffd500;
  border-color: #ffd500;
  box-shadow: 0 0 6px #ffd500;
}

.sfx-note {
  color: #666;
  font-size: 0.75rem;
  margin-top: 6px;
}

body.no-blink .blink,
body.no-blink .blinkie {
  animation: none !important;
  opacity: 1 !important;
}
body.no-blink .site-title {
  animation: glow 3s ease-in-out infinite !important;
}

body.no-construction .top-marquee,
body.no-construction .construction-banner,
body.no-construction .splash-tag,
body.no-construction .tape {
  display: none !important;
}

/* the splash gate is normally inset 18px to sit inside the tape border;
   with the tape hidden, it needs to fill the full viewport instead or
   the sparkle background peeks through around the edges */
body.no-construction .splash-gate {
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

.blink {
  animation: blink 1.2s step-start infinite;
}
