/* ===========================
   Base Body & Background
=========================== */
body {
    font-family: "Courier Prime", monospace;
    font-size: 1em;
    color: #e0e0e0;
    background-color: black;
    position: relative;
    overflow-x: hidden;
}

/* ===========================
   Headers
=========================== */
.center-header {
    text-align: center;
    margin-top: 30px;
    font-family: "Modern Prestige", serif;
    color: #f2d17b;
    font-size: 2.5em;
}

.subheader {
    text-align: center;
    margin-bottom: 50px;
    font-size: 1.2em;
    color: #e0e0e0;
}

/* ===========================
   Splash / Intro / Terminal Paragraphs
=========================== */
/* === Base Body & Background === */
body {
    margin: 0;
    padding: 0;
    font-family: "Courier Prime", monospace;
    font-size: 1em;
    color: #e0e0e0;
    background-color: black;
    overflow-x: hidden;
    position: relative;
}

/* === Fonts === */
@import url('https://fonts.googleapis.com/css2?family=Courier+Prime&family=Modern+Prestige&display=swap');

/* === Splash Header === */
#splash-header {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #ffeb3b;
    z-index: 100;
    width: 90%;
}

#splash-header h1 {
    font-family: 'Modern Prestige', serif;
    font-size: 3em;
    text-shadow: 0 0 8px #ffeb3b, 0 0 16px #ffeb3b;
    margin: 0;
    line-height: 1.2;
}

#splash-header h2 {
    font-family: 'Modern Prestige', serif;
    font-size: 2.2em;
    text-shadow: 0 0 6px #f2d17b, 0 0 12px #f2d17b;
    margin: 10px 0 20px;
    line-height: 1.2;
}

#press-key {
    font-family: 'Courier Prime', monospace;
    font-size: 1.2em;
    letter-spacing: 2px;
    color: #ffeb3b;
}

/* === Typing Cursor === */
#cursor, #splash-cursor {
    display: inline-block;
    margin-left: 2px;
    color: #ffeb3b;
    animation: blink 1s step-start infinite;
}

@keyframes blink {
    0%, 50%, 100% { opacity: 1; }
    25%, 75% { opacity: 0; }
}
.retro-paragraph, .terminal-paragraph {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 700px;
    padding: 15px;
    font-family: 'Courier New', monospace;
    font-size: 1.1em;
    line-height: 1.4;
    overflow: hidden;
    z-index: 50;
}

.retro-paragraph {
    width: 80%;
    background-color: #0033cc;
    border: 2px dashed #ffeb3b;
    border-radius: 8px;
    text-align: justify;
    color: #e0e0e0;
}

.terminal-paragraph {
    width: 60%;
    background-color: #000;
    border: 2px solid #00ff00;
    box-shadow: 0 0 30px #00ff00;
    color: #00ff00;
    white-space: pre-wrap;
    z-index: 60;
}

/* ===========================
   Cursor Styling
=========================== */
#cursor, #terminal-cursor, #splash-cursor {
    display: inline-block;
    margin-left: 2px;
    color: #ffeb3b;
    animation: blink 1s step-start infinite;
}
@keyframes blink {
    0%, 50%, 100% { opacity: 1; }
    25%, 75% { opacity: 0; }
}

/* ===========================
   Floating Links / Bus (Start Page)
=========================== */
.floating-link {
    position: absolute;
    cursor: pointer;
}
.floating-link a {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 10px;
    color: white;
    text-decoration: none;
    overflow: visible;
    transition: transform 0.2s ease, background 0.2s;
}
.floating-link a img {
    width: 48px;
    height: 48px;
    z-index: 1;
}
/* Floating nav links (if any) */
.floating-link a img { width: 48px; height: 48px; }

.floating-link.bus {
  position: fixed;
  bottom: 30px;
  left: -400px;  /* start offscreen */
  z-index: 60;
  cursor: pointer;
}

.floating-link.bus img {
  width: 600px;
  height: auto;
  display: block;
  animation: drive 12s linear infinite, bus-bounce 2s ease-in-out infinite;
}

/* drive across the screen */
@keyframes drive {
  0%   { transform: translateX(0); }
  100% { transform: translateX(120vw); }
}

/* bounce effect */
@keyframes bus-bounce {
  0%, 100% { transform: translateY(0) scale(1.05); }
  50%      { transform: translateY(-12px) scale(1.1); }
}



.bus.glow {
    animation: bus-pulse 1.5s infinite, drive 12s linear infinite;
}
@keyframes bus-pulse {
    0%, 100% { filter: drop-shadow(0 0 20px #ffeb3b) brightness(1.5); }
    50% { filter: drop-shadow(0 0 35px #ffeb3b) brightness(2); }
}

/* ===========================
   Library Page
=========================== */
#library-background {
    background: url('/library.gif') center/cover no-repeat;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    color: #f2d17b;
    font-family: "Courier Prime", monospace;
}

/* Floating books */
.floating-book {
    position: absolute;
    cursor: pointer;
    transition: transform 0.3s, filter 0.3s;
}
.floating-book img {
    width: 100px;
    height: auto;
    filter: drop-shadow(0 0 10px #f2d17b);
}
.floating-book:hover {
    transform: scale(1.2) rotate(-2deg);
    filter: drop-shadow(0 0 25px #f2d17b);
}

/* Pop-up & Exit */
#book-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.95);
    color: #00ff00;
    padding: 20px;
    border: 2px solid #00ff00;
    border-radius: 8px;
    z-index: 100;
    font-family: 'Courier New', monospace;
}
#book-popup button { margin-top: 15px; cursor: pointer; }

#library-exit {
    position: absolute;
    bottom: 20px;
    right: 20px;
    cursor: pointer;
}
#library-exit img { width: 80px; height: auto; }
#library-exit:hover { transform: scale(1.1); }

/* Sprite door (terminal) */
.sprite-door {
    width: 32px;
    height: 64px;
    background-image: url('/door1.png');
    background-repeat: no-repeat;
    background-position: 0 0;
    background-size: 192px 64px;
    cursor: pointer;
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0 0 10px #f2d17b);
    transition: filter 0.3s;
}
.sprite-door:hover {
    animation: doorOpen 1s steps(6) forwards;
    filter: drop-shadow(0 0 25px #f2d17b);
}
@keyframes doorOpen {
    from { background-position: 0 0; }
    to { background-position: -192px 0; }
}

/* ===========================
   Terminal Locations (GIFs)
=========================== */
.location {
    position: absolute; /* scatter naturally */
    display: block;
    cursor: pointer;
    transition: transform 0.3s, filter 0.3s;
}
.location-gif {
    width: 200px;
    height: auto;
    border: none;
    border-radius: 0;
    box-shadow: none;
}
.location-label { display: none; } /* hide labels for discovery */

#loc-library { bottom: 30%; right: 28%; }
#loc-library .location-gif { width: 70px; }
#loc-hospital { top: 80%; left: 50%; }
#loc-hospital .location-gif { width: 180px; }
#loc-cafe { top: 40%; left: 8%; }
#loc-cafe .location-gif { width: 200px; }
#loc-graveyard { top: 35%; left: 30%; }
#loc-graveyard .location-gif { width: 250px; }

/* ===========================
   Floating Particles (all pages)
=========================== */
.particle {
    position: absolute;
    width: 5px;
    height: 5px;
    border-radius: 30%;
    background: #f2d17b;
    opacity: 1;
    pointer-events: none;
    animation: floatParticle 5s linear infinite;
}
@keyframes floatParticle {
    0% { transform: translateY(0px); }
    100% { transform: translateY(-50px); }
}

/* ===========================
   Terminal / Glitch effects
=========================== */
.flicker { animation: flicker 0.1s infinite; }
.terminal-shake { animation: shake 0.1s infinite; }
@keyframes shake {
    0% { transform: translate(0px,0px); }
    20% { transform: translate(-2px,1px); }
    40% { transform: translate(2px,-1px); }
    60% { transform: translate(-1px,2px); }
    80% { transform: translate(1px,-2px); }
    100% { transform: translate(0px,0px); }
}

/* Typing container */
#typing-container {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 20px 25px;
  background: rgba(0,0,0,0.7);
  border: 2px solid #f2d17b;
  border-radius: 8px;
  font-family: 'Courier New', monospace;
  font-size: 1.5em;
  color: #f2d17b;
  text-align: center;
  z-index: 50;
  opacity: 1;
  transition: opacity 1.5s ease;
}

/* Fade-out class */
#typing-container.fade-out {
  opacity: 0;
  pointer-events: none;
}

/* Locations */
.location {
  position: absolute;
  cursor: pointer;
  display: block;
  transition: transform 0.3s, filter 0.3s;
}
.location:hover {
  transform: scale(1.15);
  filter: drop-shadow(0 0 25px #f2d17b);
}

/* Rain particles */
.particle {
  position: absolute;
  width: 2px;
  height: 10px;
  background: rgba(242, 209, 123, 0.5);
  pointer-events: none;
  animation: fall linear infinite;
  opacity: 0.6;
}

@keyframes fall {
  0% { transform: translateY(-20px); }
  100% { transform: translateY(100vh); }
}

