
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600&family=Montserrat:wght@300;400;500;600;700&family=Orbitron:wght@400;500;600;700;800&family=Rajdhani:wght@400;500;600;700&family=Share+Tech+Mono&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --background: #080817;
  --purple: #b58aff;
  --pink: #f0b6e9;
  --white: #f8f4ff;

  /* BOM HACKER COLORS */
  --hacker-green: #49ff91;
  --hacker-bright: #70ffa8;
  --hacker-dark: #06110b;
  --hacker-glow: rgba(73, 255, 145, 0.45);
}

body {
  min-height: 100vh;
  background: var(--background);
  color: var(--white);
  font-family: 'Montserrat', sans-serif;
  overflow: hidden;
}

/* HIDDEN SCREEN CONTROL */

.password-screen[hidden],
.welcome-screen[hidden],
.intro-screen[hidden],
.intro-details[hidden],
.intro-choice[hidden] {
  display: none !important;
}

/* =========================================
   BOM SYSTEM INTRO SCREEN
========================================= */

.intro-screen {
  position: fixed;
  inset: 0;
  z-index: 50;

  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;

  display: flex;
  justify-content: center;
  align-items: center;

  overflow: hidden;
  padding: 25px;

  background:
    radial-gradient(
      ellipse at 50% 50%,
      rgba(15, 65, 35, 0.12),
      transparent 65%
    ),
    #020604;

  color: var(--hacker-green);

  font-family: 'Rajdhani', sans-serif;
}

.intro-screen::before {
  content: "";
  position: absolute;
  inset: 0;

  pointer-events: auto;

  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0px,
      transparent 3px,
      rgba(73, 255, 145, 0.025) 4px
    );

  opacity: 0.6;
}

.intro-content {
  position: relative;
  z-index: 2;

  width: 100%;
  max-width: 900px;

  padding: 35px;

  border: 1px solid rgba(73, 255, 145, 0.13);
  border-radius: 18px;

  background: rgba(5, 13, 9, 0.48);

  box-shadow:
    0 0 45px rgba(0, 255, 100, 0.06),
    inset 0 0 35px rgba(0, 255, 100, 0.025);
}

.intro-system-label {
  color: var(--hacker-green);

  font-family: 'Orbitron', sans-serif;
  font-size: clamp(15px, 2.5vw, 23px);
  font-weight: 800;

  letter-spacing: 1px;

  margin-bottom: 28px;

  text-shadow: 0 0 15px var(--hacker-glow);
}

.intro-message {
  color: var(--hacker-green);

  font-family: 'Orbitron', sans-serif;
  font-size: clamp(22px, 4vw, 38px);
  font-weight: 700;

  line-height: 1.5;
  letter-spacing: 1px;

  margin-bottom: 24px;

  text-shadow:
    0 0 10px rgba(73, 255, 145, 0.65),
    0 0 25px rgba(73, 255, 145, 0.3),
    0 0 40px rgba(73, 255, 145, 0.12);

  overflow-wrap: anywhere;
}

.intro-details {
  display: flex;
  flex-direction: column;
  gap: 18px;

  margin-top: 18px;
}

.intro-status {
  position: relative;

  padding-left: 25px;

  color: #d6e5da;

  font-family: 'Share Tech Mono', monospace;
  font-size: clamp(13px, 2.5vw, 20px);

  letter-spacing: 0.5px;
  line-height: 1.5;
}

.intro-status::before {
  content: "";

  position: absolute;
  left: 0;
  top: 3px;

  width: 6px;
  height: 75%;

  border-radius: 5px;

  background: var(--hacker-green);

  box-shadow: 0 0 10px var(--hacker-glow);
}

.intro-divider {
  width: 100%;
  height: 1px;

  margin: 35px 0;

  background: rgba(73, 255, 145, 0.35);

  box-shadow: 0 0 12px rgba(73, 255, 145, 0.15);
}

.intro-footer-line {
  color: var(--hacker-bright);

  font-family: 'Share Tech Mono', monospace;
  font-size: clamp(13px, 2.5vw, 19px);

  letter-spacing: 1px;
  line-height: 1.6;

  text-shadow: 0 0 12px var(--hacker-glow);
}


/* INTRO TEXT ANIMATIONS */

.intro-message.intro-enter {
  animation: hackerTextEnter 0.7s ease both;
}

.intro-message.intro-exit {
  animation: hackerTextExit 0.45s ease both;
}

.intro-content.glitching {
  animation: hackerGlitch 0.35s ease;
}

.intro-status {
  animation: statusAppear 0.8s ease both;
}

.intro-status:nth-child(2) {
  animation-delay: 0.15s;
}

.intro-status:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes hackerTextEnter {
  0% {
    opacity: 0;
    transform: translateY(15px);
    filter: blur(5px);
  }

  50% {
    opacity: 0.7;
    text-shadow:
      -3px 0 #00ff66,
      3px 0 #00aa44;
  }

  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes hackerTextExit {
  0% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }

  100% {
    opacity: 0;
    transform: translateY(-12px);
    filter: blur(8px);
  }
}

@keyframes hackerGlitch {
  0%, 100% {
    transform: translateX(0);
  }

  20% {
    transform: translateX(-3px);
  }

  40% {
    transform: translateX(3px);
  }

  60% {
    transform: translateX(-2px);
  }

  80% {
    transform: translateX(2px);
  }
}

@keyframes statusAppear {
  from {
    opacity: 0;
    transform: translateX(-12px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}


/* YES / NO BUTTONS */

.intro-choice {
  position: relative;

  display: flex;
  justify-content: center;
  align-items: center;
  gap: 25px;

  min-height: 110px;
  margin-top: 25px;
}

.intro-choice button {
  position: relative;

  min-width: 125px;
  padding: 15px 30px;

  border: 1px solid var(--hacker-green);
  border-radius: 8px;

  background: rgba(73, 255, 145, 0.08);

  color: var(--hacker-green);

  font-family: 'Orbitron', sans-serif;
  font-size: 17px;
  font-weight: 700;

  letter-spacing: 2px;

  box-shadow:
    0 0 12px rgba(73, 255, 145, 0.12),
    inset 0 0 12px rgba(73, 255, 145, 0.04);

  transition:
    transform 0.35s ease,
    background 0.35s ease,
    box-shadow 0.35s ease;
}

.intro-choice button:hover {
  background: rgba(73, 255, 145, 0.2);

  box-shadow:
    0 0 25px rgba(73, 255, 145, 0.35);

  transform: scale(1.05);
}

#yesButton {
  z-index: 2;
}

#noButton {
  z-index: 3;
}

#yesButton:active,
#noButton:active {
  transform: scale(0.95);
}


/* INTRO SCREEN TRANSITION */

.intro-screen.intro-fade-out {
  animation: introScreenFadeOut 0.8s ease forwards;
}

@keyframes introScreenFadeOut {
  from {
    opacity: 1;
    visibility: visible;
  }

  to {
    opacity: 0;
    visibility: hidden;
  }
}


/* =========================================
   PASSWORD AND WELCOME SCREENS
========================================= */

.password-screen,
.welcome-screen {
  min-height: 100vh;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  background:
    radial-gradient(
      ellipse at 50% 45%,
      rgba(111, 57, 170, 0.22),
      transparent 55%
    ),
    linear-gradient(135deg, #080817, #11102a, #090817);
}

.password-screen {
  opacity: 1;
  transition: opacity 0.7s ease;
}

.password-screen.fade-out {
  opacity: 0;
}

.welcome-screen {
  opacity: 0;
  transition: opacity 1s ease;
}

.welcome-screen.visible {
  opacity: 1;
}

.content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 30px;
  animation: appear 1.8s ease both;
  width: 100%;
  max-width: 650px;
}

.small-text {
  color: var(--pink);
  font-size: 10px;
  letter-spacing: 5px;
  margin-bottom: 30px;
}

.heart {
  color: var(--pink);
  font-size: 65px;
  margin-bottom: 15px;
  text-shadow: 0 0 25px rgba(240, 182, 233, 0.8);
  animation: heartbeat 2s infinite;
}

h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(42px, 8vw, 75px);
  font-weight: 400;
  letter-spacing: 2px;
  margin-bottom: 15px;
}

.description {
  color: #c3b8d7;
  font-size: 12px;
  letter-spacing: 2px;
  margin-bottom: 35px;
  line-height: 1.8;
}

.hint {
  color: var(--pink);
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  margin-bottom: 25px;
  letter-spacing: 0.5px;
}

input {
  display: block;
  width: 100%;
  max-width: 330px;
  margin: 0 auto 18px;
  padding: 15px 20px;
  border: 1px solid rgba(220, 183, 255, 0.45);
  border-radius: 50px;
  outline: none;
  background: rgba(157, 103, 210, 0.10);
  color: white;
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  text-align: center;
  letter-spacing: 2px;
  transition: 0.3s ease;
}

input::placeholder {
  color: #a99abf;
  letter-spacing: 1px;
}

input:focus {
  border-color: var(--pink);
  box-shadow: 0 0 20px rgba(181, 138, 255, 0.25);
}

button {
  padding: 16px 32px;
  border: 1px solid rgba(220, 183, 255, 0.7);
  border-radius: 50px;
  background: rgba(157, 103, 210, 0.12);
  color: white;
  font-family: inherit;
  font-size: 11px;
  letter-spacing: 2px;
  cursor: pointer;
  transition: 0.35s ease;
  box-shadow: 0 0 20px rgba(166, 110, 255, 0.12);
}

button:hover {
  background: rgba(157, 103, 210, 0.3);
  box-shadow: 0 0 30px rgba(181, 138, 255, 0.5);
  transform: translateY(-3px);
}

button span {
  margin-left: 8px;
  color: var(--pink);
}

button:disabled {
  cursor: default;
  opacity: 0.7;
}

.error-message {
  min-height: 22px;
  margin-top: 18px;
  color: var(--pink);
  font-family: 'Cormorant Garamond', serif;
  font-size: 19px;
}

.date {
  margin-top: 38px;
  color: #887d9f;
  font-size: 10px;
  letter-spacing: 5px;
}

footer {
  position: absolute;
  bottom: 25px;
  width: 100%;
  text-align: center;
  color: #625773;
  font-size: 9px;
  letter-spacing: 4px;
}

.stars::before,
.stars::after {
  content: "✦  ·  ✧  ·  ✦  ·  ·  ✧  ·  ✦";
  position: absolute;
  color: rgba(221, 192, 255, 0.6);
  font-size: 18px;
  letter-spacing: 35px;
  white-space: nowrap;
  animation: float 8s ease-in-out infinite alternate;
}

.stars::before {
  top: 18%;
  left: 5%;
}

.stars::after {
  bottom: 20%;
  right: 5%;
  animation-delay: 2s;
}

@keyframes appear {
  from {
    opacity: 0;
    transform: translateY(25px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heartbeat {
  0%, 100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.12);
  }
}

@keyframes float {
  from {
    transform: translateY(0);
    opacity: 0.35;
  }

  to {
    transform: translateY(-20px);
    opacity: 0.9;
  }
}

@media (max-width: 600px) {
  .small-text {
    letter-spacing: 3px;
  }

  .description {
    line-height: 1.8;
  }

  .hint {
    font-size: 18px;
    line-height: 1.5;
  }

  .content {
    padding: 22px;
  }

  .stars::before,
  .stars::after {
    letter-spacing: 15px;
  }
}


/* =========================================
   HEART-SHAPED NUMBER KEYPAD
========================================= */

.pin-display {
  color: var(--pink);
  font-size: 25px;
  letter-spacing: 10px;
  margin: 20px 0 25px;
  text-shadow: 0 0 15px rgba(240, 182, 233, 0.7);
}

.password-storage {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
}

.keypad {
  display: grid;
  grid-template-columns: repeat(3, 65px);
  justify-content: center;
  gap: 13px;
  margin: 0 auto 25px;
}

.keypad-key {
  width: 65px;
  height: 60px;
  padding: 0;
  border: 1px solid rgba(240, 182, 233, 0.7);
  background: rgba(157, 103, 210, 0.16);
  color: white;
  font-size: 17px;
  font-family: 'Montserrat', sans-serif;

  clip-path: polygon(
    50% 92%,
    8% 48%,
    5% 32%,
    12% 15%,
    28% 8%,
    42% 15%,
    50% 28%,
    58% 15%,
    72% 8%,
    88% 15%,
    95% 32%,
    92% 48%
  );

  transition: 0.25s ease;
}

.keypad-key:hover {
  background: rgba(240, 182, 233, 0.35);
  box-shadow: 0 0 20px rgba(240, 182, 233, 0.4);
  transform: scale(1.08);
}

.keypad-key:active {
  transform: scale(0.92);
}

.special-key {
  color: var(--pink);
  font-size: 13px;
}

@media (max-width: 600px) {
  .keypad {
    gap: 10px;
  }
}


/* =========================================
   ANGRY CAT POPUP
========================================= */

.cat-popup {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  justify-content: center;
  align-items: center;
  pointer-events: none;
}

.cat-popup.show {
  display: flex;
}

.cat-card {
  width: min(290px, 85vw);
  padding: 28px 20px;
  text-align: center;
  border: 1px solid rgba(240, 182, 233, 0.8);
  border-radius: 25px;
  background: rgba(19, 14, 39, 0.97);
  box-shadow: 0 0 35px rgba(181, 138, 255, 0.4);
  animation: angryCatAppear 0.4s ease both;
}

.angry-cat {
  font-size: 75px;
  margin-bottom: 12px;
  animation: angryCatShake 0.5s ease;
}

.cat-card p {
  color: var(--pink);
  font-family: 'Cormorant Garamond', serif;
  font-size: 23px;
  margin-bottom: 12px;
}

.cat-card span {
  color: #a99abf;
  font-size: 13px;
}

@keyframes angryCatAppear {
  from {
    opacity: 0;
    transform: scale(0.6) translateY(20px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes angryCatShake {
  0%, 100% {
    transform: rotate(0);
  }

  25% {
    transform: rotate(-12deg);
  }

  75% {
    transform: rotate(12deg);
  }
}


/* =========================================
   MOBILE RESPONSIVE - BOM INTRO
========================================= */

@media (max-width: 600px) {
  .intro-screen {
    padding: 14px;
  }

  .intro-content {
    padding: 23px 19px;
    border-radius: 13px;
  }

  .intro-system-label {
    font-size: 15px;
    line-height: 1.5;
    margin-bottom: 24px;
  }

  .intro-message {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(20px, 6vw, 30px);
    line-height: 1.5;
    letter-spacing: 0.5px;
    margin-bottom: 22px;
  }

  .intro-details {
    gap: 15px;
  }

  .intro-status {
    font-size: 13px;
    padding-left: 17px;
    line-height: 1.5;
    overflow-wrap: anywhere;
  }

  .intro-status::before {
    width: 4px;
  }

  .intro-divider {
    margin: 25px 0;
  }

  .intro-footer-line {
    font-size: 12px;
    letter-spacing: 0.5px;
  }

  .intro-choice {
    gap: 14px;
    min-height: 90px;
  }

  .intro-choice button {
    min-width: 105px;
    padding: 13px 18px;
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .intro-message,
  .intro-content,
  .intro-status {
    animation-duration: 0.01ms;
  }
}

/* =========================================
   HACKER MATRIX BACKGROUND - FIXED
========================================= */

.intro-screen {
  position: fixed;
  overflow: hidden;
  isolation: isolate;
}

#introMatrix {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.95;
}

.intro-content {
  position: relative;
  z-index: 2;
}


/* =========================================
   REALISTIC SHOOTING STARS
========================================= */

#welcomeScreen {
  isolation: isolate;
}

#welcomeScreen .stars {
  z-index: 0;
}

.shooting-stars {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

/* Bright meteor head */
.shooting-star {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ffffff;

  box-shadow:
    0 0 4px 2px #ffffff,
    0 0 10px 4px rgba(255, 255, 255, 0.9),
    0 0 22px 7px rgba(210, 220, 255, 0.55);

  opacity: 0;

  animation: meteorFall linear forwards;
}

/* Thin fading tail */
.shooting-star::after {
  content: "";
  position: absolute;

  left: 3px;
  top: 50%;

  width: var(--tail-length);
  height: 2px;

  border-radius: 50%;

  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(255, 255, 255, 0.65) 20%,
    rgba(220, 230, 255, 0.25) 65%,
    transparent 100%
  );

  transform-origin: left center;
  transform: translateY(-50%) rotate(-45deg);

  filter: drop-shadow(0 0 4px rgba(255,255,255,0.8));
}

@keyframes meteorFall {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0);
  }

  12% {
    opacity: 1;
  }

  75% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translate3d(
      var(--shoot-x),
      var(--shoot-y),
      0
    );
  }
}

/* Keep all welcome content centered and above meteors */
#welcomeScreen .content {
  position: relative;
  z-index: 2;
}

#welcomeScreen footer {
  position: relative;
  z-index: 2;
}

@media (prefers-reduced-motion: reduce) {
  .shooting-star {
    display: none;
  }
}

/* =========================================
   19-11 GIFT - GAME SCENE FOUNDATION
========================================= */

.game-screen[hidden],
.game-message[hidden],
.meteor-warning[hidden],
.choice-panel[hidden],
.door-scene[hidden],
.dead-scene[hidden] {
  display: none !important;
}

.game-screen {
  position: fixed;
  inset: 0;
  z-index: 40;

  width: 100%;
  height: 100vh;
  height: 100dvh;

  overflow: hidden;
  isolation: isolate;

  background: #9bd8ff;
  font-family: 'Montserrat', sans-serif;
}

/* GAME CANVAS */

#gameCanvas {
  position: absolute;
  inset: 0;

  display: block;
  width: 100%;
  height: 100%;

  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* GAME MESSAGE */

.game-message {
  position: absolute;
  inset: 0;
  z-index: 5;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  padding: 24px;
  text-align: center;

  background: rgba(10, 5, 20, 0.55);
  color: white;
}

.game-message h1 {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(30px, 7vw, 65px);
  margin-bottom: 15px;
}

.game-message p {
  font-size: clamp(13px, 3vw, 20px);
  line-height: 1.6;
}


/* =========================================
   METEOR WARNING - GLASS ALERT
========================================= */

.meteor-warning {
  position: absolute;
  inset: 0;
  z-index: 8;

  display: flex;
  justify-content: center;
  align-items: center;

  padding: 20px;
  background: rgba(35, 0, 8, 0.25);
  pointer-events: none;
}

.warning-glass {
  width: min(700px, 92vw);
  padding: clamp(22px, 5vw, 42px);

  text-align: center;
  color: white;

  background: linear-gradient(
    135deg,
    rgba(100, 10, 25, 0.65),
    rgba(20, 5, 15, 0.78)
  );

  border: 2px solid rgba(255, 150, 150, 0.65);
  border-radius: 18px;

  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  box-shadow:
    0 0 25px rgba(255, 20, 40, 0.35),
    0 0 65px rgba(255, 0, 0, 0.2),
    inset 0 0 25px rgba(255, 100, 100, 0.08);
}

.warning-icon {
  font-size: clamp(45px, 9vw, 75px);
  color: #ff4545;

  text-shadow:
    0 0 12px #ff0000,
    0 0 30px rgba(255, 0, 0, 0.9);

  animation: warningPulse 0.8s ease-in-out infinite alternate;
}

.warning-glass h1 {
  margin: 8px 0 12px;

  font-family: 'Orbitron', sans-serif;
  font-size: clamp(48px, 11vw, 100px);
  font-weight: 800;
  letter-spacing: 5px;

  color: #ff4545;

  text-shadow:
    0 0 12px #ff0000,
    0 0 35px rgba(255, 0, 0, 0.9);
}

.warning-glass p {
  font-family: 'Share Tech Mono', monospace;
  font-size: clamp(17px, 4vw, 30px);
  font-weight: 700;
  letter-spacing: clamp(1px, 0.5vw, 4px);
  color: #ffffff;

  text-shadow: 0 0 12px rgba(255, 255, 255, 0.8);
}

.warning-status {
  margin-top: 22px;
  padding-top: 14px;

  border-top: 1px solid rgba(255, 120, 120, 0.4);

  font-family: 'Share Tech Mono', monospace;
  font-size: clamp(11px, 2.5vw, 15px);
  letter-spacing: 2px;
  color: #ffaaaa;
}

@keyframes warningPulse {
  from {
    opacity: 0.7;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1.08);
  }
}

/* =========================================
   PLAYER CHOICES
========================================= */

.choice-panel {
  position: absolute;
  inset: 0;
  z-index: 12;

  display: flex;
  justify-content: center;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 18px;

  padding: 24px 24px 45px;

  /* Keep warning visible behind buttons */
  background: transparent;
}

.choice-panel button {
  min-width: 155px;
  padding: 16px 22px;

  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 12px;

  background: rgba(30, 15, 45, 0.9);
  color: white;

  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;

  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.choice-panel button:hover,
.choice-panel button:focus-visible {
  transform: scale(1.06);
  box-shadow: 0 0 22px rgba(255, 80, 80, 0.65);
}

/* =========================================
   GAME OVER - YOU DIED
========================================= */

.dead-scene {
  position: absolute;
  inset: 0;
  z-index: 20;

  display: flex;
  justify-content: center;
  align-items: center;

  background:
    radial-gradient(
      ellipse at center,
      rgba(130, 10, 25, 0.95),
      #35030d 55%,
      #080208 100%
    );

  color: white;
  text-align: center;
}

.dead-content {
  width: min(90%, 600px);
  padding: 30px 20px;

  animation: deadAppear 1s ease-out;
}

.skull-icon {
  font-size: clamp(75px, 18vw, 130px);
  margin-bottom: 20px;

  color: #f5e7e7;

  text-shadow:
    0 0 15px rgba(255, 50, 50, 0.8),
    0 0 45px rgba(255, 0, 0, 0.7);

  animation: skullPulse 2s ease-in-out infinite alternate;
}

.dead-content h1 {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(38px, 10vw, 85px);
  font-weight: 800;
  letter-spacing: clamp(3px, 1vw, 8px);

  color: #ff4545;

  text-shadow:
    0 0 15px #ff0000,
    0 0 40px rgba(255, 0, 0, 0.8);
}

#respawnButton {
  margin-top: 35px;
  padding: 16px 35px;

  border: 2px solid #ff7777;
  border-radius: 10px;

  background: rgba(130, 0, 20, 0.4);
  color: white;

  font-family: 'Orbitron', sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 3px;

  cursor: pointer;

  box-shadow: 0 0 20px rgba(255, 40, 40, 0.45);

  animation: respawnAppear 0.8s ease-out;
}

#respawnButton:hover {
  background: rgba(180, 0, 30, 0.7);
  box-shadow: 0 0 35px rgba(255, 40, 40, 0.8);
}

@keyframes deadAppear {
  from {
    opacity: 0;
    transform: scale(0.85);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes skullPulse {
  from {
    transform: scale(0.96);
  }

  to {
    transform: scale(1.06);
  }
}

@keyframes respawnAppear {
  from {
    opacity: 0;
    transform: translateY(15px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}



/* =========================================
   GAME WORLD
========================================= */

.game-world {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* =========================================
   SCREEN CRACK IMAGE
========================================= */

.screen-crack {
  position: absolute;
  inset: 0;
  z-index: 5;

  width: 100%;
  height: 100%;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  overflow: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.screen-crack.is-active {
  opacity: 1;
  visibility: visible;
}

.screen-crack-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
}

/* =========================================
   FLICKERING LIGHT
========================================= */

.screen-crack::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;

  pointer-events: none;

  background: rgba(255, 255, 255, 0.18);
  opacity: 0;
}

.screen-crack.is-active::before {
  animation: screenFlicker 2.8s infinite;
}

@keyframes screenFlicker {
  0%, 18%, 21%, 45%, 48%, 100% {
    opacity: 0;
  }

  19% {
    opacity: 0.16;
  }

  20% {
    opacity: 0.03;
  }

  46% {
    opacity: 0.12;
  }

  47% {
    opacity: 0.02;
  }

  72% {
    opacity: 0.08;
  }
}

/* =========================================
   DIGITAL GLITCH
========================================= */

.screen-crack::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;

  pointer-events: none;

  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 5px,
    rgba(255, 255, 255, 0.055) 6px,
    transparent 7px
  );

  opacity: 0;
}

.screen-crack.is-active::after {
  animation: screenGlitch 3.5s infinite;
}

@keyframes screenGlitch {
  0%, 25%, 28%, 65%, 100% {
    opacity: 0;
    transform: translateX(0);
  }

  26% {
    opacity: 0.35;
    transform: translateX(-2px);
  }

  27% {
    opacity: 0.1;
    transform: translateX(2px);
  }

  66% {
    opacity: 0.2;
    transform: translateX(1px);
  }

  67% {
    opacity: 0;
    transform: translateX(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .screen-crack.is-active::before,
  .screen-crack.is-active::after {
    animation: none;
  }
}

/* =========================================
   METEOR IMPACT SCREEN SHAKE
========================================= */

.game-screen.is-shaking {
  animation: meteorScreenShake 0.12s linear infinite;
}

@keyframes meteorScreenShake {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-5px, 3px); }
  50% { transform: translate(4px, -4px); }
  75% { transform: translate(-3px, -2px); }
  100% { transform: translate(3px, 4px); }
}

/* =========================================
   WARNING APPEARANCE
========================================= */

.meteor-warning:not([hidden]) {
  animation: warningAppear 0.5s ease-out;
}

@keyframes warningAppear {
  from {
    opacity: 0;
    transform: scale(1.08);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* =========================================
   MOBILE RESPONSIVE
========================================= */

@media (max-width: 600px) {
  .choice-panel {
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding-bottom: 25px;
  }

  .choice-panel button {
    width: min(250px, 85vw);
    min-height: 52px;
  }

  .warning-glass {
    padding: 24px 14px;
  }

  .warning-glass h1 {
    letter-spacing: 2px;
  }

  .warning-glass p {
    letter-spacing: 1px;
  }
}


.meteor-warning:not([hidden]) {
  animation: warningAppear 0.5s ease-out;
}

@keyframes warningAppear {
  from {
    opacity: 0;
    transform: scale(1.15);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* CHOICE BUTTON INTERACTION */

.choice-panel button {
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.choice-panel button:hover,
.choice-panel button:focus-visible {
  transform: scale(1.06);
  box-shadow: 0 0 22px rgba(255, 80, 80, 0.65);
}

/* =========================================
   19-11 GIFT - MYSTERIOUS DOOR SCENE
========================================= */

.door-scene {
  position: absolute;
  inset: 0;
  z-index: 50;

  display: flex;
  justify-content: center;
  align-items: center;

  overflow: hidden;

  background:
    radial-gradient(
      ellipse at center,
      rgba(75, 35, 105, 0.45),
      transparent 55%
    ),
    linear-gradient(
      180deg,
      #080510 0%,
      #160b22 55%,
      #030208 100%
    );

  animation: doorSceneAppear 1.2s ease forwards;
}

/* LIGHT AROUND THE DOOR */

.door-scene::before {
  content: "";

  position: absolute;
  width: min(75vw, 500px);
  height: min(75vw, 500px);

  border-radius: 50%;

  background: rgba(190, 110, 255, 0.16);
  filter: blur(75px);

  animation: doorAura 3s ease-in-out infinite alternate;
}

/* THE MYSTERIOUS DOOR */

.glowing-door {
  position: relative;
  z-index: 2;

  width: clamp(150px, 35vw, 240px);
  height: clamp(250px, 60vh, 390px);

  display: flex;
  justify-content: center;
  align-items: center;

  border: 3px solid #e6c5ff;
  border-radius: 110px 110px 5px 5px;

  background:
    linear-gradient(
      135deg,
      #38204e,
      #160d25 55%,
      #503064
    );

  box-shadow:
    0 0 12px #d9a5ff,
    0 0 35px rgba(190, 100, 255, 0.9),
    0 0 85px rgba(160, 70, 255, 0.55),
    inset 0 0 35px rgba(220, 170, 255, 0.2);

  animation: glowingDoorPulse 2.5s ease-in-out infinite alternate;
}

/* QUESTION MARK */

.glowing-door p {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(65px, 12vw, 100px);
  font-weight: 600;

  color: #f4ddff;

  text-shadow:
    0 0 12px #d9a5ff,
    0 0 30px #b45aff,
    0 0 55px #9d35ff;

  animation: questionMarkFloat 2s ease-in-out infinite;
}

/* DOOR LIGHT */

.glowing-door::after {
  content: "";

  position: absolute;
  top: 50%;
  right: 15px;

  width: 10px;
  height: 10px;

  border-radius: 50%;

  background: #ffe5a3;
  box-shadow:
    0 0 8px #ffe5a3,
    0 0 18px #ffcf70;
}

/* ANIMATIONS */

@keyframes doorSceneAppear {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes doorAura {
  from {
    transform: scale(0.85);
    opacity: 0.5;
  }

  to {
    transform: scale(1.15);
    opacity: 1;
  }
}

@keyframes glowingDoorPulse {
  from {
    box-shadow:
      0 0 12px #d9a5ff,
      0 0 35px rgba(190, 100, 255, 0.7),
      0 0 65px rgba(160, 70, 255, 0.4);
  }

  to {
    box-shadow:
      0 0 20px #e8caff,
      0 0 50px rgba(190, 100, 255, 1),
      0 0 100px rgba(160, 70, 255, 0.75);
  }
}

@keyframes questionMarkFloat {
  0%, 100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-9px);
  }
}

/* =========================================
   WARNING PANEL - TILTED GLASS EFFECT
========================================= */

.warning-glass {
  transform: rotate(-13deg);
  transform-origin: center center;

  transition:
    transform 0.5s ease,
    box-shadow 0.5s ease;
}

.warning-content {
  transform: rotate(13deg);
  transform-origin: center center;
}

@media (max-width: 600px) {
  .warning-glass {
    transform: rotate(-8deg);
  }

  .warning-content {
    transform: rotate(8deg);
  }
}
/* FIX: MAKE CHOICE BUTTONS CLICKABLE */

.choice-panel {
  pointer-events: auto;
  z-index: 12;
}

.choice-panel button {
  position: relative;
  z-index: 13;
  pointer-events: auto;
  cursor: pointer;
}
/* =========================================
   GIFT GAME SCENE TRANSITION
========================================= */

.gift-welcome-leaving {
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.gift-game-entering {
  opacity: 0;
  transform: translateY(14px) scale(0.99);
}

.gift-game-entering.gift-game-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition:
    opacity 0.55s ease,
    transform 0.55s ease;
}
/* =========================================
   3D UNIVERSE SCREEN
========================================= */

.universe-screen {
  position: fixed;
  inset: 0;

  width: 100%;
  height: 100%;

  overflow: hidden;

  background: #03030c;

  z-index: 1000;
}

.universe-screen[hidden] {
  display: none !important;
}

#universeCanvas {
  display: block;

  width: 100%;
  height: 100%;
}
