html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  background: #000;
  color: #39ff14;
  font-family: 'Share Tech Mono', monospace;
  box-sizing: border-box;
}
body {
  min-height: 100vh;
  min-width: 100vw;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow: auto;
  background: #000;
}

#bg-parallax {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url('ship.jpg') center center / cover no-repeat;
  z-index: 0; /* <- works better across the board */
  transform: scale(1.05);
  transition: transform 0.1s ease-out;
  will-change: transform;
}

#bg-parallax::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1;
}



/* Main Flex Layout */
#main-flex-layout {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: center;
  width: 100vw;
  min-height: calc(100vh - 80px);
  box-sizing: border-box;
  padding-bottom: 80px;
}

#game-outer {
  flex: 2 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  box-sizing: border-box;
  padding: 4vw 0 4vw 4vw;
}

#game-container {
  background: rgba(0,0,0,0.6);
  border: 2px solid #39ff14;
  box-shadow: 0 0 32px #39ff1477;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
  width: 80vw;
  height: 45vw;
  max-width: 880px;
  max-height: 495px;
  min-width: 320px;
  min-height: 360px;
  margin: auto;
  transition: width 0.3s, height 0.3s;
}

#game-inner {
  width: 100%;
  height: 100%;
  padding: 48px 48px 36px 48px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  box-sizing: border-box;
  flex: 1 1 auto;
  overflow: hidden;
}

/* Sticky Footer Controls */
#footer-controls {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 34px;
  padding: 14px 0 10px 0;
  background: rgba(0,0,0,0.94);
  border-top: 2px solid #39ff14;
  z-index: 500;
}
#footer-controls button {
  background: #000;
  color: #39ff14;
  border: 2px solid #39ff14;
  border-radius: 50%;
  width: 46px;
  height: 46px;
  font-size: 1.5em;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border 0.2s, box-shadow 0.2s;
  box-shadow: 0 0 8px #39ff1444;
}
#footer-controls button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
#footer-controls button:hover:not(:disabled) {
  background: #ff174422;
  color: #ff1744;
  border-color: #ff1744;
  box-shadow: 0 0 12px #ff1744aa;
}

/* Splash Screen */
.splash {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  gap: 24px;
}
.splash .skull,
.splash-title,
.splash-desc,
.splash-warning,
.splash-btn {
  opacity: 0;
  filter: brightness(2);
  transition: none;
}
.splash .skull {
  font-size: 3.5em;
  color: #39ff14;
  text-shadow: 0 0 24px #39ff14;
  margin-bottom: 8px;
  animation: pulseSkull 2s infinite alternate;
}
@keyframes pulseSkull {
  0% { text-shadow: 0 0 24px #39ff14, 0 0 2px #fff; }
  100% { text-shadow: 0 0 48px #39ff14, 0 0 12px #fff; }
}
.splash-title {
  font-size: 2.1em;
  font-weight: bold;
  letter-spacing: 2px;
  color: #39ff14;
  margin-bottom: 8px;
  text-shadow: 0 0 18px #39ff14;
}
.splash-desc {
  font-size: 1.15em;
  color: #aaffc3;
  margin-bottom: 12px;
  line-height: 1.5;
  text-shadow: 0 0 8px #39ff14;
}
.splash-warning {
  color: #fff;
  font-size: 1.1em;
  background: #39ff1422;
  border: 1px solid #39ff14;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
  display: inline-block;
  font-weight: bold;
  letter-spacing: 1px;
  box-shadow: 0 0 8px #39ff14;
}
.splash-btn {
  font-size: 1.2em;
  padding: 12px 32px;
  background: #000;
  color: #39ff14;
  border: 2px solid #39ff14;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  margin-top: 12px;
  font-family: inherit;
  font-weight: bold;
  letter-spacing: 1px;
  box-shadow: 0 0 12px #39ff1444;
}
.splash-btn:hover {
  background: #ff174422;
  color: #ff1744;
  border-color: #ff1744;
  box-shadow: 0 0 12px #ff1744aa;
}

/* Intro SKIP Button */
#skip-intro-btn {
  background: #000;
  color: #39ff14;
  border: 1.5px solid #39ff14;
  border-radius: 8px;
  padding: 10px 32px;
  font-family: inherit;
  font-size: 1.1em;
  cursor: pointer;
  box-shadow: 0 0 8px #39ff1444;
  font-weight: bold;
  letter-spacing: 1px;
  transition: all 0.2s ease;
}
#skip-intro-btn:hover {
  background: #ff174422;
  color: #ff1744;
  border-color: #ff1744;
  box-shadow: 0 0 12px #ff1744aa;
}

/* Output and Choices */
#output {
  flex: 1 1 auto;
  min-height: 100px;
  max-height: 220px;
  font-size: 1.16em;
  line-height: 1.5;
  margin-bottom: 32px;
  white-space: pre-line;
  word-break: break-word;
  letter-spacing: 0.5px;
  overflow-y: auto;
  transition: none;
  padding-right: 8px;
  padding-bottom: 2px;
  background: transparent;
}
.choices {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 0;
}
.choice-btn {
  background: transparent;
  color: #39ff14;
  border: 1px solid #39ff14;
  font-family: inherit;
  font-size: 1.08em;
  padding: 12px 18px;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border 0.2s, box-shadow 0.2s;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
  filter: brightness(2);
}
.choice-btn.flicker-on {
  opacity: 1;
  filter: none;
}
.choice-btn:hover {
  background: #ff174422;
  color: #ff1744;
  border-color: #ff1744;
  box-shadow: 0 0 12px #ff1744aa;
}

.blinking-cursor {
  display: inline-block;
  width: 16px;
  color: #39ff14;
  font-weight: bold;
  font-size: 1.2em;
  vertical-align: middle;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* Responsive */
@media (max-width: 900px) {
  #main-flex-layout {
    flex-direction: column;
    align-items: stretch;
    padding-bottom: 80px;
  }
  #game-outer {
    margin: 0 auto;
    width: 98vw;
    max-width: 98vw;
    padding: 0;
  }
}
@media (max-width: 600px) {
  #game-container {
    width: 96vw;
    height: 170vw;
    max-width: 98vw;
    max-height: 98vh;
    min-width: 0;
    min-height: 0;
    margin: 0 auto;
  }
  #game-inner {
    padding: 10vw 8vw 10vw 8vw;
  }
  #footer-controls {
    gap: 18px;
    padding: 10px 0 6px 0;
  }
}
@media (max-width: 400px) {
  #game-inner {
    padding: 10vw 2vw 10vw 2vw;
  }
}
