/* RESET & RETRO BASE */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  outline: none !important;
  -webkit-tap-highlight-color: transparent;
  /* Stripped all rounded corners globally */
  border-radius: 0px !important; 
}

body, html {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background-color: #0d0d11;
  font-family: 'Courier New', Courier, monospace;
  user-select: none;
  -webkit-user-select: none;
}

/* SCREEN TRANSITION OVERLAY */
#fade-overlay {
  position: fixed;
  inset: 0;
  background-color: #000;
  z-index: 9999;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.6s ease-in-out;
}

/* VIEWPORT & FULL AUTO-FIT CAMERA RIG */
.viewport {
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  position: relative;
}

#camera-rig {
  width: 1600px;
  height: 1000px;
  position: absolute;
  transform-origin: center center;
  will-change: transform;
}

/* ROOM CANVAS */
.room-canvas {
  width: 100%;
  height: 100%;
  position: relative;
  background: #18151e;
  overflow: hidden;
}

.layer-bg {
  position: absolute;
  inset: 0;
  background-image: url('assets/room_bg.png');
  background-size: cover;
  z-index: 1;
}

/* ASSETS: SHARP HARD-EDGE SHADOWS (NO NEON GLOWS) */
.asset {
  position: absolute;
  cursor: pointer;
  z-index: 5;
  filter: drop-shadow(4px 4px 0px rgba(0,0,0,0.7));
  transition: filter 0.1s ease, transform 0.1s ease;
}

.asset:hover {
  /* Crisp 90s style hard highlight */
  filter: drop-shadow(6px 6px 0px #000) brightness(1.15);
}

/* ROOM POSITIONS & SIZES */
#window    { top: 60px;  left: 620px; width: 340px; z-index: 2; }
#poster    { top: 90px;  left: 180px; width: 250px; z-index: 2; }
#dartbox   { top: 140px; right: 160px; width: 160px; z-index: 2; }
#clipboard { top: 280px; left: 1330px; width: 130px; z-index: 2; }

#desk      { position: absolute; top: 510px; left: 270px; width: 1060px; pointer-events: none; z-index: 4; }

/* Desk Items */
#radio     { top: 460px; left: 310px; width: 190px; }
#mug       { top: 550px; left: 510px; width: 120px; }
#computer  { top: 350px; left: 640px; width: 360px; }
#plushie   { top: 500px; left: 1000px; width: 160px; }
#clock     { top: 520px; left: 1170px; width: 140px; }

/* CUBIC SPEECH BUBBLE WITH DYNAMIC STRETCH POINTER */
#plushie-bubble {
  position: absolute;
  top: 360px;
  left: 920px;
  width: 280px;
  background: #ffffff;
  color: #000000;
  padding: 12px 16px;
  border: 3px solid #000000;
  box-shadow: 6px 6px 0px #000000;
  font-size: 0.9rem;
  font-weight: bold;
  z-index: 20;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Sharp retro speech arrow stems directly off the plushie */
#plushie-bubble::after {
  content: '';
  position: absolute;
  bottom: -14px;
  left: 60px;
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 14px solid #000000;
}

#plushie-bubble::before {
  content: '';
  position: absolute;
  bottom: -9px;
  left: 62px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 11px solid #ffffff;
  z-index: 1;
}

#plushie-bubble.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* RETRO SHARP CLOCK COUNTER BADGE */
#clock-score-tag {
  position: absolute;
  top: 480px;
  left: 1180px;
  background: #ff2a6d;
  color: #ffffff;
  font-weight: bold;
  font-size: 0.85rem;
  padding: 4px 8px;
  border: 2px solid #000000;
  box-shadow: 4px 4px 0px #000000;
  z-index: 10;
  pointer-events: none;
}

/* RETRO DIALOG BOX FOR MUG MODAL */
#mug-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

#mug-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: #f4f1ea;
  border: 4px solid #000000;
  color: #000000;
  padding: 24px;
  width: 380px;
  text-align: left;
  box-shadow: 10px 10px 0px #000000;
}

.modal-card h3 { 
  margin-bottom: 12px; 
  font-size: 1.1rem;
  background: #000;
  color: #fff;
  padding: 4px 8px;
}

.modal-card p { 
  font-size: 0.9rem; 
  line-height: 1.4; 
  color: #111;
  border-left: 3px solid #000;
  padding-left: 10px;
}

.modal-card button {
  margin-top: 20px;
  background: #ff2a6d;
  color: white;
  border: 2px solid #000;
  padding: 6px 16px;
  cursor: pointer;
  font-weight: bold;
  box-shadow: 4px 4px 0px #000;
}

.modal-card button:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0px #000;
}

/* DARTS */
.pinned-dart {
  position: absolute;
  width: 35px;
  pointer-events: none;
  z-index: 8;
  filter: drop-shadow(3px 3px 0px #000);
}

#held-dart {
  position: fixed;
  width: 40px;
  pointer-events: none;
  z-index: 99999;
  display: none;
  transform: translate(-50%, -50%) rotate(-45deg);
}