/* ============================================
   ScrollWizard - Geocities Style Website
   "Best viewed at 800x600 in Netscape Navigator"
   ============================================ */

/* --- CSS Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
}

/* --- Starfield Background --- */
body {
  margin: 0;
  padding: 0;
  background-color: #000033;
  background-image:
    radial-gradient(1px 1px at 10% 20%, #fff, transparent),
    radial-gradient(1px 1px at 30% 50%, #fff, transparent),
    radial-gradient(1px 1px at 50% 10%, #fff, transparent),
    radial-gradient(1px 1px at 70% 80%, #fff, transparent),
    radial-gradient(1px 1px at 90% 30%, #fff, transparent),
    radial-gradient(1px 1px at 15% 70%, #aaf, transparent),
    radial-gradient(1px 1px at 45% 90%, #fff, transparent),
    radial-gradient(1px 1px at 65% 40%, #fff, transparent),
    radial-gradient(1px 1px at 85% 60%, #aaf, transparent),
    radial-gradient(1px 1px at 5% 95%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 20% 35%, #ffa, transparent),
    radial-gradient(1px 1px at 40% 75%, #fff, transparent),
    radial-gradient(1px 1px at 60% 5%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 80% 15%, #aff, transparent),
    radial-gradient(1px 1px at 95% 55%, #fff, transparent),
    radial-gradient(1px 1px at 25% 85%, #fff, transparent),
    radial-gradient(1px 1px at 55% 65%, #fff, transparent),
    radial-gradient(1px 1px at 75% 45%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 35% 25%, #faf, transparent),
    radial-gradient(1px 1px at 8% 48%, #fff, transparent),
    radial-gradient(1px 1px at 22% 12%, #fff, transparent),
    radial-gradient(1px 1px at 48% 38%, #fff, transparent),
    radial-gradient(1px 1px at 62% 72%, #fff, transparent),
    radial-gradient(1px 1px at 88% 92%, #fff, transparent),
    radial-gradient(1px 1px at 33% 58%, #aaf, transparent),
    radial-gradient(1px 1px at 78% 28%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 42% 8%, #ffa, transparent),
    radial-gradient(1px 1px at 18% 62%, #fff, transparent),
    radial-gradient(1px 1px at 52% 82%, #fff, transparent),
    radial-gradient(1px 1px at 92% 42%, #fff, transparent);
  background-size: 200px 200px;
  background-attachment: fixed;
  color: #ffffff;
  font-family: 'Times New Roman', Times, serif;
  font-size: 16px;
  line-height: 1.5;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Ctext x='0' y='14' font-size='14'%3E%E2%9C%A8%3C/text%3E%3C/svg%3E"), auto;
}

/* --- Main Container --- */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 10px 20px;
}

/* --- Typography --- */
h1, h2, h3 {
  font-family: 'Comic Sans MS', 'Comic Sans', cursive;
  text-align: center;
  margin: 10px 0;
}

h1 {
  font-size: 36px;
}

h2 {
  font-size: 28px;
  color: #00ffff;
}

h3 {
  font-size: 22px;
  color: #ff69b4;
}

p {
  margin: 8px 0;
}

a {
  color: #00ff00;
  text-decoration: underline;
}

a:visited {
  color: #ffff00;
}

a:hover {
  color: #ff00ff;
  text-shadow: 0 0 8px #ff00ff, 0 0 16px #ff00ff;
}

/* --- Center Everything (the geocities way) --- */
.center {
  text-align: center;
}

/* --- Rainbow Text Animation --- */
.rainbow-text {
  font-family: 'Comic Sans MS', 'Comic Sans', cursive;
  font-size: 42px;
  font-weight: bold;
  background: linear-gradient(
    90deg,
    #ff0000, #ff7700, #ffff00, #00ff00, #0000ff, #8b00ff, #ff0000
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: rainbow-shift 3s linear infinite;
  text-shadow: none;
}

@keyframes rainbow-shift {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

/* --- Blinking Text --- */
.blink {
  animation: blink-anim 1s steps(2, start) infinite;
}

@keyframes blink-anim {
  to { visibility: hidden; }
}

/* --- Marquee Scroll --- */
.marquee-container {
  overflow: hidden;
  white-space: nowrap;
  background: linear-gradient(90deg, #000066, #330066, #000066);
  border-top: 2px solid #ffff00;
  border-bottom: 2px solid #ffff00;
  padding: 8px 0;
  margin: 20px 0;
}

.marquee-content {
  display: inline-block;
  padding-left: 100%;
  animation: marquee-scroll 15s linear infinite;
  font-family: 'Comic Sans MS', 'Comic Sans', cursive;
  font-size: 20px;
  color: #ffff00;
  font-weight: bold;
}

@keyframes marquee-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* --- Fire Divider (CSS-only) --- */
.fire-divider {
  height: 30px;
  margin: 15px 0;
  background:
    linear-gradient(0deg, #ff0000 0%, #ff6600 30%, #ffff00 60%, transparent 100%);
  background-size: 20px 30px;
  animation: fire-flicker 0.15s infinite alternate;
  border-radius: 0 0 50% 50%;
  opacity: 0.9;
  position: relative;
}

.fire-divider::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    linear-gradient(0deg, #ff3300 0%, #ff9900 40%, #ffff00 70%, transparent 100%);
  background-size: 15px 25px;
  animation: fire-flicker 0.2s infinite alternate-reverse;
  opacity: 0.7;
}

@keyframes fire-flicker {
  0% { background-position: 0 0; }
  100% { background-position: 3px -2px; }
}

/* --- Sparkle Divider --- */
.sparkle-divider {
  text-align: center;
  margin: 20px 0;
  font-size: 20px;
  letter-spacing: 8px;
  animation: sparkle-glow 1.5s ease-in-out infinite alternate;
}

@keyframes sparkle-glow {
  0% { text-shadow: 0 0 5px #ff00ff, 0 0 10px #ff00ff; opacity: 0.7; }
  100% { text-shadow: 0 0 10px #00ffff, 0 0 20px #00ffff, 0 0 30px #00ffff; opacity: 1; }
}

/* --- Star Divider --- */
.star-divider {
  text-align: center;
  margin: 15px 0;
  letter-spacing: 4px;
  color: #ffff00;
}

/* --- Features Table (beveled 90s style) --- */
.retro-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 2px;
  border: 3px outset #808080;
  margin: 20px auto;
  background-color: #000033;
}

.retro-table th {
  background: linear-gradient(180deg, #6600cc, #330066);
  color: #ffff00;
  font-family: 'Comic Sans MS', 'Comic Sans', cursive;
  font-size: 18px;
  padding: 8px 12px;
  border: 2px outset #9966cc;
  text-align: left;
}

.retro-table td {
  padding: 6px 12px;
  border: 1px inset #333366;
  vertical-align: top;
}

.retro-table tr:nth-child(odd) td {
  background-color: #0a0a3a;
}

.retro-table tr:nth-child(even) td {
  background-color: #1a0a3a;
}

.retro-table .feature-icon {
  font-size: 24px;
  text-align: center;
  width: 50px;
}

.retro-table .feature-name {
  color: #00ffff;
  font-family: 'Comic Sans MS', 'Comic Sans', cursive;
  font-weight: bold;
  font-size: 16px;
}

.retro-table .feature-desc {
  color: #ccccff;
  font-size: 14px;
}

/* --- Netscape Browser Window Frame --- */
.browser-frame {
  border: 2px outset #c0c0c0;
  background-color: #c0c0c0;
  margin: 15px auto;
  max-width: 600px;
}

.browser-titlebar {
  background: linear-gradient(90deg, #000080, #1084d0);
  color: #ffffff;
  font-family: 'Arial', sans-serif;
  font-size: 13px;
  font-weight: bold;
  padding: 3px 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.browser-titlebar .buttons {
  display: flex;
  gap: 2px;
}

.browser-titlebar .btn {
  width: 16px;
  height: 16px;
  background: #c0c0c0;
  border: 2px outset #c0c0c0;
  font-size: 10px;
  line-height: 12px;
  text-align: center;
  color: #000;
  cursor: pointer;
}

.browser-toolbar {
  background-color: #c0c0c0;
  border-bottom: 1px solid #808080;
  padding: 2px 4px;
  font-family: 'Arial', sans-serif;
  font-size: 12px;
  color: #000;
}

.browser-toolbar .address-bar {
  background: #fff;
  border: 2px inset #c0c0c0;
  padding: 2px 4px;
  margin: 2px 0;
  font-family: 'Arial', sans-serif;
  font-size: 12px;
  color: #000080;
}

.browser-content {
  background-color: #000033;
  min-height: 200px;
  padding: 20px;
  text-align: center;
  color: #ffffff;
  border: 2px inset #c0c0c0;
}

/* --- App Screenshot Gallery (Behold the App) --- */
.app-gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 18px;
  margin: 18px auto 4px;
  max-width: 860px;
}

.app-shot {
  margin: 0;
}

/* Keep the RSVP + landscape split shots side by side as one unit.
   The .container caps content at ~760px, so two fixed-height (460px) shots
   can't fit — instead the pair fills the row and the two shots scale
   together. Flex ratio 2:5 ≈ their natural width-at-equal-height (portrait
   phone vs landscape iPad), so both render the same height at any width. */
.app-pair {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: flex-start;
  gap: 18px;
  width: 100%;
}

.app-pair .app-shot {
  min-width: 0;
}

.app-pair .app-shot:nth-child(1) {
  flex: 2 1 0;
}

.app-pair .app-shot:nth-child(2) {
  flex: 5 1 0;
}

.app-pair .app-shot img {
  width: 100%;
  height: auto;
}

.app-shot img {
  display: block;
  height: 460px;
  width: auto;
  max-width: 100%;
  border: 3px ridge #7733cc;
  border-radius: 8px;
  background: #0a0a1a;
  box-shadow: 0 0 14px rgba(120, 80, 200, 0.45);
}

@media (max-width: 640px) {
  .app-shot img { height: 340px; }
  /* On phones, stack the pair and fall back to height-based sizing. */
  .app-pair { flex-wrap: wrap; }
  .app-pair .app-shot { flex: 0 0 auto; }
  .app-pair .app-shot img { width: auto; height: 340px; }
}

/* --- Download CTA Button (deliberately modern — stands out from retro aesthetic) --- */
.download-btn {
  display: inline-block;
  padding: 12px 28px;
  background: #007AFF;
  color: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', sans-serif;
  font-size: 18px;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  text-decoration: none;
  cursor: pointer;
  margin: 10px;
  letter-spacing: -0.01em;
  transition: background 0.15s;
}

.download-btn:visited {
  color: #ffffff;
}

.download-btn:hover {
  background: #0056CC;
  color: #ffffff;
  text-shadow: none;
  text-decoration: none;
}

.download-btn-large {
  font-size: 22px;
  padding: 14px 36px;
}

/* --- Guestbook Button --- */
.guestbook-btn {
  display: inline-block;
  padding: 8px 20px;
  background: linear-gradient(180deg, #ffcc00, #ff9900);
  color: #000000;
  font-family: 'Comic Sans MS', 'Comic Sans', cursive;
  font-size: 18px;
  font-weight: bold;
  border: 3px outset #ffcc00;
  text-decoration: none;
  cursor: pointer;
  margin: 10px;
}

.guestbook-btn:hover {
  background: linear-gradient(180deg, #ff9900, #ff6600);
  border-color: #ff9900;
  color: #000000;
}

/* --- 88x31 Badge Buttons --- */
.badge-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  margin: 15px 0;
}

.badge-88x31 {
  width: 88px;
  height: 31px;
  image-rendering: pixelated;
  border: 1px solid #333;
}

/* CSS-rendered 88x31 badges */
.css-badge {
  width: 88px;
  height: 31px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  font-family: Arial, sans-serif;
  font-weight: bold;
  text-decoration: none;
  border: 1px solid #333;
  line-height: 1.1;
  text-align: center;
  padding: 2px;
  image-rendering: pixelated;
}

/* All true. Every badge is a claim the site would defend in plain corporate
   voice — no fabricated facts, no fake metrics. (Panel: DEC-034.) */
.badge-pay {
  background: linear-gradient(180deg, #006633 0%, #00331a 100%);
  color: #ffee66;
  border-color: #00aa55;
  text-shadow: 1px 1px 0 #001a0d;
}

.badge-drm {
  background: linear-gradient(180deg, #663300 0%, #331a00 100%);
  color: #ffcc66;
  border-color: #cc8833;
  text-shadow: 1px 1px 0 #1a0d00;
}

.badge-own {
  background: linear-gradient(180deg, #000066 0%, #000033 100%);
  color: #00ccff;
  border-color: #0066cc;
  text-shadow: 1px 1px 0 #000022;
}

.badge-zero {
  background: linear-gradient(180deg, #4d0033 0%, #260019 100%);
  color: #ff66cc;
  border-color: #cc3399;
  text-shadow: 1px 1px 0 #1a000f;
}

.badge-format {
  background: linear-gradient(180deg, #003355 0%, #001a2b 100%);
  color: #66ddff;
  border-color: #3388bb;
  text-shadow: 1px 1px 0 #000d16;
}

.badge-offline {
  background: linear-gradient(180deg, #1a4d1a 0%, #0d260d 100%);
  color: #99ff99;
  border-color: #339933;
  text-shadow: 1px 1px 0 #051305;
}

.badge-stew {
  background: linear-gradient(180deg, #3a0066 0%, #1d0033 100%);
  color: #cc99ff;
  border-color: #7733cc;
  text-shadow: 1px 1px 0 #0f001a;
}

.badge-cookies {
  background: linear-gradient(180deg, #006633 0%, #003311 100%);
  color: #66ff99;
  border-color: #33cc66;
  text-shadow: 1px 1px 0 #001a0d;
}

.badge-html {
  background: linear-gradient(180deg, #000066 0%, #000033 100%);
  color: #00ccff;
  border-color: #0066cc;
  text-shadow: 1px 1px 0 #000022;
}

.badge-pelican {
  background: linear-gradient(180deg, #2b2b3a 0%, #15151d 100%);
  color: #aab4ff;
  border-color: #5566aa;
}

/* --- Grab-a-Button page --- */
.button-offer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  max-width: 640px;
  margin: 16px auto;
  padding: 12px;
  background: rgba(0, 0, 40, 0.4);
  border: 2px ridge #444;
  border-radius: 6px;
}

.button-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.button-caption {
  font-family: 'Comic Sans MS', cursive;
  font-size: 11px;
  color: #999;
}

.button-snippets {
  flex: 1 1 260px;
  min-width: 220px;
}

.button-snippets label {
  display: block;
  font-size: 11px;
  color: #ff69b4;
  font-family: 'Comic Sans MS', cursive;
  margin: 6px 0 2px;
}

.button-snippets textarea {
  width: 100%;
  box-sizing: border-box;
  background: #0a0a18;
  color: #00ff99;
  border: 1px inset #333;
  font-family: 'Courier New', monospace;
  font-size: 11px;
  padding: 5px;
  resize: none;
}

/* --- Animated Mailbox --- */
.mailbox {
  display: inline-block;
  font-size: 32px;
  animation: mailbox-flag 1s ease-in-out infinite alternate;
}

@keyframes mailbox-flag {
  0% { transform: rotate(-5deg); }
  100% { transform: rotate(5deg); }
}

/* --- Construction Sign --- */
.construction {
  display: inline-block;
  background: repeating-linear-gradient(
    45deg,
    #ffcc00,
    #ffcc00 10px,
    #000000 10px,
    #000000 20px
  );
  padding: 8px 20px;
  border: 3px outset #ffcc00;
  font-family: 'Impact', 'Arial Black', sans-serif;
  font-size: 14px;
  color: #000000;
  text-shadow: 1px 1px 0 #ffcc00;
  margin: 10px;
  animation: construction-flash 2s ease-in-out infinite;
}

@keyframes construction-flash {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}

/* --- Neon Glow Box --- */
.neon-box {
  border: 2px solid #ff00ff;
  box-shadow: 0 0 10px #ff00ff, inset 0 0 10px rgba(255, 0, 255, 0.1);
  padding: 15px;
  margin: 20px 0;
}

/* --- About Section --- */
.about-section {
  text-align: left;
  padding: 10px;
  margin: 15px 0;
  border: 1px solid #666699;
  background-color: rgba(0, 0, 0, 0.5);
}

.about-section p {
  margin: 10px 0;
}

.about-section ul {
  list-style: none;
  padding-left: 0;
}

.about-section ul li {
  padding: 4px 0 4px 24px;
  position: relative;
}

.about-section ul li::before {
  content: '\2605';
  color: #ffff00;
  position: absolute;
  left: 4px;
}

/* --- Comparison Banner --- */
.vs-banner {
  text-align: center;
  margin: 15px 0;
  padding: 10px;
  background: linear-gradient(90deg, transparent, rgba(255, 0, 255, 0.2), transparent);
}

.vs-banner span {
  font-family: 'Comic Sans MS', 'Comic Sans', cursive;
  font-size: 20px;
  color: #ff6600;
}

/* --- Footer --- */
.retro-footer {
  text-align: center;
  margin-top: 30px;
  padding: 15px 10px;
  border-top: 2px ridge #666699;
  font-size: 12px;
  color: #999999;
  font-family: Arial, sans-serif;
}

.retro-footer a {
  color: #00ff00;
}

/* --- Sparkle Cursor Container (for JS) --- */
.sparkle {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  font-size: 12px;
  animation: sparkle-fade 0.8s ease-out forwards;
}

@keyframes sparkle-fade {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-20px) scale(0.5);
  }
}

/* --- Falling Stars Container --- */
.falling-star {
  position: fixed;
  pointer-events: none;
  z-index: 9998;
  color: #ffff99;
  font-size: 14px;
  animation: star-fall linear forwards;
}

@keyframes star-fall {
  0% {
    opacity: 1;
    transform: translateY(0) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translateY(100vh) rotate(360deg);
  }
}

/* --- Pulse Animation for Emoji Icons --- */
.pulse {
  display: inline-block;
  animation: pulse-anim 2s ease-in-out infinite;
}

@keyframes pulse-anim {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

/* --- Wiggle Animation --- */
.wiggle {
  display: inline-block;
  animation: wiggle-anim 0.5s ease-in-out infinite;
}

@keyframes wiggle-anim {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-5deg); }
  75% { transform: rotate(5deg); }
}

/* --- Scroll Reveal (subtle) --- */
.reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s, transform 0.5s;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Mobile Responsiveness --- */
@media (max-width: 850px) {
  .container {
    padding: 10px 15px;
  }

  .rainbow-text {
    font-size: 28px;
  }

  h1 { font-size: 28px; }
  h2 { font-size: 22px; }
  h3 { font-size: 18px; }

  .retro-table {
    font-size: 13px;
  }

  .retro-table th,
  .retro-table td {
    padding: 4px 8px;
  }

  .browser-frame {
    max-width: 100%;
  }
}

/* --- Interactive Wizard Mode Panel --- */
.wizard-panel {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 99998;
  background: #1a0033;
  border: 3px outset #9966cc;
  padding: 10px 14px;
  font-family: 'Comic Sans MS', 'Comic Sans', cursive;
  color: #ffff00;
  font-size: 13px;
  box-shadow: 0 0 15px rgba(255, 0, 255, 0.3);
  user-select: none;
  max-width: 220px;
}

.wizard-panel-title {
  font-size: 11px;
  color: #ff69b4;
  margin-bottom: 8px;
  text-align: center;
  letter-spacing: 0.5px;
}

.wizard-panel-buttons {
  display: flex;
  gap: 6px;
  justify-content: center;
}

.wizard-mode-btn {
  background: #330066;
  border: 2px outset #6633cc;
  color: #ffffff;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 16px;
  font-family: 'Comic Sans MS', 'Comic Sans', cursive;
  transition: background 0.15s, border-color 0.15s;
  min-width: 44px;
  text-align: center;
}

.wizard-mode-btn:hover {
  background: #440088;
  border-color: #9966ff;
}

.wizard-mode-btn.active {
  background: #6600cc;
  border: 2px inset #cc66ff;
  box-shadow: 0 0 8px #ff00ff, inset 0 0 6px rgba(255, 0, 255, 0.3);
}

.wizard-panel-hint {
  font-size: 9px;
  color: #888;
  text-align: center;
  margin-top: 6px;
  display: none;
}

/* --- Wizard Canvas --- */
#wizard-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 99997;
}

/* --- Wizard Cursor --- */
body.wizard-mode-active,
body.wizard-mode-active * {
  cursor: crosshair !important;
}

/* --- Frog Mode --- */
.wizard-frogged {
  transition: transform 0.4s ease-in, opacity 0.4s ease-in;
  transform: scale(0);
  opacity: 0;
}

.wizard-frog-pile {
  display: inline-block;
  font-size: 24px;
  cursor: default;
  animation: frog-wiggle 0.4s ease-in-out infinite;
}

@keyframes frog-wiggle {
  0%, 100% { transform: rotate(-3deg) scale(1); }
  25% { transform: rotate(3deg) scale(1.05); }
  50% { transform: rotate(-2deg) scale(0.95); }
  75% { transform: rotate(4deg) scale(1.02); }
}

/* --- Gandalf Mode --- */
.wizard-charred {
  filter: brightness(0.1) sepia(1) saturate(0.5) contrast(2) blur(0.5px) !important;
  transition: filter 0.6s ease-in !important;
}

.wizard-gandalf-text {
  position: fixed;
  pointer-events: none;
  z-index: 99999;
  font-family: 'Times New Roman', Times, serif;
  font-size: 14px;
  font-weight: bold;
  color: #ffffff;
  text-shadow: 0 0 6px #ff6600, 0 0 12px #ff3300, 0 0 20px #ff0000;
  white-space: nowrap;
  animation: gandalf-fade 2s ease-out forwards;
}

@keyframes gandalf-fade {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
  15% { opacity: 1; transform: translate(-50%, -60%) scale(1); }
  70% { opacity: 1; transform: translate(-50%, -70%); }
  100% { opacity: 0; transform: translate(-50%, -90%); }
}

.wizard-flash {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: white;
  pointer-events: none;
  z-index: 99999;
  animation: flash-out 0.3s ease-out forwards;
}

@keyframes flash-out {
  0% { opacity: 0.8; }
  100% { opacity: 0; }
}

/* --- Y2K Mode --- */
.wizard-glitch {
  animation: y2k-glitch 0.1s infinite !important;
}

@keyframes y2k-glitch {
  0% { transform: translate(0, 0) skewX(0deg); }
  20% { transform: translate(-2px, 1px) skewX(-1deg); }
  40% { transform: translate(2px, -1px) skewX(2deg); }
  60% { transform: translate(-1px, 2px) skewX(-2deg); }
  80% { transform: translate(1px, -2px) skewX(1deg); }
  100% { transform: translate(0, 0) skewX(0deg); }
}

.wizard-bsod {
  position: fixed;
  z-index: 99999;
  pointer-events: none;
  background: #0000AA;
  border: 2px inset #c0c0c0;
  font-family: 'Courier New', Courier, monospace;
  font-size: 11px;
  color: #ffffff;
  padding: 12px 16px;
  text-align: left;
  line-height: 1.4;
  box-shadow: 2px 2px 0 #000;
  min-width: 260px;
  max-width: 340px;
  animation: bsod-appear 0.15s ease-out;
}

.wizard-bsod-title {
  background: #aaaaaa;
  color: #0000AA;
  font-weight: bold;
  padding: 1px 6px;
  display: inline-block;
  margin-bottom: 8px;
}

@keyframes bsod-appear {
  0% { opacity: 0; transform: scale(0.9); }
  100% { opacity: 1; transform: scale(1); }
}

.wizard-collapsed {
  transition: max-height 0.4s ease-in, opacity 0.3s ease-in, padding 0.4s ease-in, margin 0.4s ease-in !important;
  max-height: 0 !important;
  opacity: 0 !important;
  overflow: hidden !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

/* --- Accessibility: Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .rainbow-text {
    background: none;
    -webkit-text-fill-color: #ff00ff;
    color: #ff00ff;
  }

  .marquee-content {
    padding-left: 0;
    white-space: normal;
  }

  .blink {
    visibility: visible !important;
  }
}

/* ============================================
   Site-Wide Navigation Bar
   ============================================ */
.site-nav {
  display: flex;
  justify-content: center;
  gap: 4px;
  padding: 8px 10px;
  background: #0a0a2a;
  border-bottom: 3px ridge #666699;
  flex-wrap: wrap;
}

.site-nav-btn {
  display: inline-block;
  background: #c0c0c0;
  border: 3px outset #c0c0c0;
  padding: 5px 14px;
  font-family: 'Comic Sans MS', 'Comic Sans', cursive;
  font-weight: bold;
  font-size: 13px;
  color: #000080;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.site-nav-btn:visited {
  color: #000080;
}

.site-nav-btn:hover {
  background: #d8d8d8;
  color: #000080;
  text-shadow: none;
  border-color: #d8d8d8;
}

.site-nav-btn:active,
.site-nav-btn.active {
  border-style: inset;
  background: #a0a0a0;
  color: #000080;
}

/* ============================================
   Guides Page Layout
   ============================================ */
.guides-layout {
  display: flex;
  min-height: calc(100vh - 100px);
  max-width: 1200px;
  margin: 0 auto;
}

/* --- Sidebar --- */
.guides-sidebar {
  width: 220px;
  min-width: 220px;
  background: #0d0d2b;
  border-right: 3px outset #555;
  padding: 12px 10px;
  font-family: 'Comic Sans MS', 'Comic Sans', cursive;
  font-size: 13px;
  overflow-y: auto;
  position: sticky;
  top: 0;
  height: 100vh;
}

.guides-sidebar-header {
  color: #ffff00;
  font-size: 18px;
  font-weight: bold;
  text-align: center;
  padding: 4px 0;
}

.sidebar-divider {
  border: none;
  border-top: 2px ridge #666699;
  margin: 8px 0;
}

.guides-tree {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.guide-entry {
  display: flex;
  flex-direction: column;
}

.guide-link {
  display: block;
  color: #00ff00;
  text-decoration: none;
  padding: 5px 8px;
  font-size: 13px;
  border: 1px solid transparent;
}

.guide-link:visited {
  color: #00ff00;
}

.guide-link:hover {
  color: #ff00ff;
  text-shadow: 0 0 4px #ff00ff;
  background: rgba(255, 0, 255, 0.05);
}

.guide-link.active {
  background: #000080;
  color: #ffffff;
  border: 1px inset #3333aa;
}

.guide-link .tree-arrow {
  font-size: 9px;
  display: inline-block;
  transition: transform 0.1s;
}

.guide-entry.expanded .guide-link .tree-arrow {
  transform: rotate(90deg);
}

/* --- Section TOC inside sidebar --- */
.guide-toc {
  display: none;
  flex-direction: column;
  padding-left: 12px;
  border-left: 1px dashed #444;
  margin-left: 16px;
}

.guide-entry.expanded .guide-toc {
  display: flex;
}

/* --- "The Workshop" advanced-guides section divider --- */
.guides-section-label {
  color: #ffff00;
  font-size: 11px;
  font-weight: bold;
  text-align: center;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 6px 0 2px;
  margin-top: 8px;
  border-top: 2px ridge #666699;
}
.guide-section-heading {
  font-family: 'Comic Sans MS', 'Comic Sans', cursive;
  font-size: 22px;
  color: #ffff00;
  text-align: center;
  margin: 24px 0 2px;
}
.guide-section-heading-sub {
  color: #cccccc;
  font-size: 13px;
  text-align: center;
  margin: 0 0 8px;
}
.guide-section-crosslink {
  color: #cccccc;
  font-size: 13px;
  text-align: center;
  max-width: 600px;
  margin: 4px auto 0;
}
.guide-section-crosslink a {
  color: #00ff00;
}
.guide-section-crosslink a:hover {
  color: #ff00ff;
}

.toc-link {
  display: block;
  color: #66cc66;
  text-decoration: none;
  font-size: 11px;
  padding: 2px 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.toc-link:visited {
  color: #66cc66;
}

.toc-link:hover {
  color: #ff69b4;
}

.tree-branch {
  color: #555;
  font-family: monospace;
  font-size: 11px;
}

.sidebar-footer {
  padding: 8px 0 4px;
}

.sidebar-back-link {
  color: #999;
  text-decoration: none;
  font-size: 11px;
}

.sidebar-back-link:hover {
  color: #00ffff;
}

/* --- Mobile Menu Button --- */
.guides-menu-btn {
  display: none;
  position: fixed;
  top: 50px;
  left: 8px;
  z-index: 1000;
  background: #c0c0c0;
  border: 3px outset #c0c0c0;
  font-family: 'Comic Sans MS', 'Comic Sans', cursive;
  font-weight: bold;
  font-size: 12px;
  color: #000080;
  padding: 4px 10px;
  cursor: pointer;
}

.guides-menu-btn:active {
  border-style: inset;
}

/* --- Main Content Area --- */
.guides-content {
  flex: 1;
  min-width: 0;
  padding: 20px 30px 40px;
  max-width: 800px;
}

.guides-loading {
  text-align: center;
  padding: 60px 20px;
}

/* --- Guide Article Styles --- */
.guide-article {
  color: #cccccc;
  line-height: 1.7;
  font-size: 15px;
}

.guide-article h1 {
  color: #00ffff;
  font-family: 'Comic Sans MS', 'Comic Sans', cursive;
  font-size: 28px;
  text-align: left;
  margin: 0 0 8px;
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.guide-article h2 {
  color: #ff69b4;
  font-family: 'Comic Sans MS', 'Comic Sans', cursive;
  font-size: 22px;
  text-align: left;
  margin: 30px 0 12px;
  padding-bottom: 4px;
  border-bottom: 1px solid #333366;
}

.guide-article h3 {
  color: #ffff00;
  font-family: 'Comic Sans MS', 'Comic Sans', cursive;
  font-size: 18px;
  text-align: left;
  margin: 24px 0 8px;
}

.guide-article h4 {
  color: #ff6600;
  font-family: 'Comic Sans MS', 'Comic Sans', cursive;
  font-size: 16px;
  text-align: left;
  margin: 20px 0 6px;
}

.guide-article p {
  margin: 10px 0;
}

.guide-article a {
  color: #00ff00;
}

.guide-article a:hover {
  color: #ff00ff;
}

.guide-article b,
.guide-article strong {
  color: #00ffff;
}

.guide-article i,
.guide-article em {
  color: #ff69b4;
}

/* --- Lists --- */
.guide-list,
.guide-article ul {
  padding-left: 8px;
  margin: 10px 0;
  list-style: none;
}

.guide-list li,
.guide-article ul > li {
  padding: 3px 0 3px 20px;
  position: relative;
}

.guide-list li::before,
.guide-article ul > li::before {
  content: '\2605';
  color: #ffff00;
  position: absolute;
  left: 0;
  font-size: 10px;
  top: 6px;
}

.guide-list-ordered,
.guide-article ol {
  list-style: decimal;
  padding-left: 24px;
  margin: 10px 0;
}

.guide-list-ordered li::before,
.guide-article ol > li::before {
  content: none;
}

.guide-list-ordered li,
.guide-article ol > li {
  padding-left: 4px;
}

/* --- Tables --- */
.guide-table {
  margin: 16px 0;
  font-size: 14px;
}

/* --- Code --- */
.guide-code {
  background: #0a0a2a;
  border: 2px inset #333366;
  padding: 12px 16px;
  overflow-x: auto;
  font-family: 'Courier New', Courier, monospace;
  font-size: 13px;
  color: #00ff00;
  margin: 12px 0;
  line-height: 1.5;
}

.guide-inline-code {
  background: #1a0a3a;
  border: 1px solid #333366;
  padding: 1px 5px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 13px;
  color: #ffff00;
}

/* --- Blockquotes --- */
.guide-blockquote {
  border-left: 3px solid #ff69b4;
  padding: 8px 16px;
  margin: 12px 0;
  background: rgba(255, 105, 180, 0.05);
  color: #dddddd;
  font-style: italic;
}

/* --- Screenshot Placeholders --- */
.guide-screenshot-placeholder {
  display: block;
  border: 2px dashed #666699;
  padding: 20px;
  margin: 16px 0;
  text-align: center;
  color: #999;
  font-family: 'Comic Sans MS', 'Comic Sans', cursive;
  font-size: 13px;
  background: rgba(102, 102, 153, 0.1);
}

/* --- Guide Screenshots --- */
.guide-article img {
  display: block;
  max-width: 50%;
  height: auto;
  margin: 24px auto;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 20px rgba(100, 100, 255, 0.15);
  cursor: zoom-in;
  transition: max-width 0.3s ease, border-radius 0.3s ease, box-shadow 0.3s ease;
}

.guide-article img.zoomed {
  max-width: 95%;
  cursor: zoom-out;
  border-radius: 12px;
  box-shadow: 0 0 40px rgba(100, 100, 255, 0.3);
}

.guide-article figure {
  margin: 24px auto;
  max-width: 50%;
  text-align: center;
}

.guide-article figure img {
  max-width: 100%;
  margin: 0 auto 8px;
}

.guide-article figcaption {
  font-family: 'Comic Sans MS', 'Comic Sans', cursive;
  font-size: 12px;
  color: #888;
  text-align: center;
  line-height: 1.4;
}

/* --- Guide Index Cards --- */
.guide-index-card {
  padding: 16px 20px;
  margin: 16px 0;
  border: 1px solid #333366;
  background: rgba(0, 0, 0, 0.4);
}

.guide-index-card h2 {
  font-family: 'Comic Sans MS', 'Comic Sans', cursive;
  font-size: 20px;
  color: #00ffff;
  text-align: left;
  margin: 0 0 8px;
}

.guide-index-card h2 a {
  color: #00ffff;
  text-decoration: none;
}

.guide-index-card h2 a:hover {
  color: #ff00ff;
  text-shadow: 0 0 8px #ff00ff;
}

.guide-index-card p {
  color: #cccccc;
  font-size: 14px;
  margin: 0 0 8px;
  line-height: 1.5;
}

.guide-index-link {
  color: #00ff00;
  font-family: 'Comic Sans MS', 'Comic Sans', cursive;
  font-size: 13px;
}

/* --- Guide CTA Box --- */
.guide-cta-box {
  text-align: center;
  padding: 24px 20px;
  margin: 30px 0 0;
  border: 2px ridge #666699;
  background: rgba(0, 0, 51, 0.6);
}

.guide-cta-text {
  color: #cccccc;
  font-family: 'Comic Sans MS', 'Comic Sans', cursive;
  font-size: 15px;
  margin: 0 0 12px;
}

/* --- Bottom Navigation --- */
.guide-bottom-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  margin-top: 30px;
  border-top: 2px ridge #666699;
}

.guide-prev-btn,
.guide-next-btn {
  color: #00ff00;
  text-decoration: none;
  font-family: 'Comic Sans MS', 'Comic Sans', cursive;
  font-size: 14px;
  padding: 4px 10px;
  border: 2px outset #333;
  background: #1a0a3a;
}

.guide-prev-btn:hover,
.guide-next-btn:hover {
  color: #ff00ff;
  border-color: #666;
}

.guide-top-btn {
  color: #999;
  text-decoration: none;
  font-family: monospace;
  font-size: 12px;
}

.guide-top-btn:hover {
  color: #00ffff;
}

/* --- Guides Mobile Responsive --- */
@media (max-width: 768px) {
  .guides-layout {
    flex-direction: column;
  }

  .guides-sidebar {
    position: fixed;
    left: -230px;
    top: 0;
    z-index: 999;
    height: 100vh;
    width: 220px;
    min-width: 220px;
    box-shadow: none;
    transition: none; /* instant, retro */
  }

  .guides-sidebar.open {
    left: 0;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.8);
  }

  .guides-menu-btn {
    display: block;
  }

  .guides-content {
    padding: 60px 16px 40px;
  }

  .guide-article img {
    max-width: 85%;
    border-radius: 14px;
    box-shadow: 0 0 12px rgba(100, 100, 255, 0.12);
    margin: 20px auto;
  }

  .guide-article figure {
    max-width: 85%;
  }

  .guide-article h1 {
    font-size: 22px;
  }

  .guide-article h2 {
    font-size: 18px;
  }

  .guide-bottom-nav {
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
  }
}

@media (max-width: 400px) {
  .guide-article img {
    max-width: 95%;
    border-radius: 12px;
  }

  .guide-article figure {
    max-width: 95%;
  }
}
