@font-face {
  font-family: 'Rubik Glitch';
  src: url('assets/RubikGlitch-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Rubik Glitch', monospace;
  font-size: 1.2rem;
  line-height: 1.6;
  background-color: black;
  background-size: cover; 
  background-position: center center;
  background-repeat: no-repeat;
  transition: background-image 1.5s ease-in-out; 
  overflow: hidden;
  color: white;
}

.scene {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 4rem 2rem;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 1.2s ease, visibility 0s linear 1.2s;
  display: flex;
  flex-direction: column;
  justify-content: center; 
  align-items: center;
  text-align: center;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

.subtitle {
  position: fixed;
  bottom: 3rem;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 80%;
  text-align: center;
  font-size: 1.3rem;
  color: #00ffff;
  opacity: 0; 
  font-style: italic;
  background: rgba(0, 0, 0, 0.7); 
  padding: 1rem 1.5rem;
  border-radius: 0.5rem;
  pointer-events: none;
  transition: opacity 0.5s ease;
  z-index: 1000; 
}

.subtitle[style*="opacity: 1"], 
.subtitle[style*="opacity: 0.85"] {
  opacity: 1 !important;
}

.scene.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}

.clickable {
  cursor: pointer;
  color: cyan;
  margin: 1.2rem 0;
  display: inline-block;
  text-decoration: none;
  font-size: 1.25rem;
  transition: color 0.2s;
}

.clickable:hover {
  color: white;
}

.popup {
  position: fixed;
  top: 8rem; 
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: #ccc; 
  padding: 1.2rem 2rem;
  border: 1px solid #444;
  font-size: 1.2rem;
  font-weight: 400;
  font-style: italic;
  font-family: 'JetBrains Mono', monospace;
  z-index: 999;
  max-width: 80%;
  white-space: pre-wrap;
  text-align: center;
  letter-spacing: 0.01em;
  line-height: 1.6;
  border-radius: 0.75rem;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.5);
  animation: fadein 0.3s ease-out, fadeout 0.4s ease-in 2.6s;
  z-index: 2000;
}

#intro {
  background: black;
  color: #666;
  text-align: center;
  padding-top: 30vh;
  font-style: italic;
  font-size: 1rem;
}

#intro::after {
  content: "|";
  animation: blink 1s step-start infinite;
  display: inline-block;
  margin-left: 0.2em;
}

#start-screen {
  position: fixed;
  inset: 0;
  background: black;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 9999;
  color: #ccc;
  font-family: monospace;
  text-align: center;
  padding: 2rem;
}

#start-content p {
  font-size: 1.4rem;
  margin-bottom: 1.5rem;
  font-style: italic;
}

#start-button {
  font-family: monospace;
  font-size: 1rem;
  padding: 0.75rem 2rem;
  background: #111;
  color: cyan;
  border: 1px solid cyan;
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
}

#start-button:hover {
  background: cyan;
  color: black;
}

@keyframes blink {
  50% { opacity: 0; }
}

@keyframes fadein {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeout {
  from { opacity: 1; }
  to { opacity: 0; }
}
