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

html, body {
  width: 100%;
  background: #b8d4ce;
  font-family: 'Special Elite', serif;
  color: #2a1010;
}

/* ─────────────────────────────────────────────────────────────────────────────
   MARQUEE BAR
───────────────────────────────────────────────────────────────────────────── */
.marquee-bar {
  background: #8a2020;
  padding: 5px 0;
  overflow: hidden;
  width: 100%;
}

.marquee-inner {
  display: inline-flex;
  white-space: nowrap;
  animation: marquee 22s linear infinite;
}

.marquee-inner span {
  font-family: 'Special Elite', serif;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: #f5d0c8;
  text-transform: uppercase;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-20%); }
}

/* ─────────────────────────────────────────────────────────────────────────────
   WALL SECTION
───────────────────────────────────────────────────────────────────────────── */
.wall-section {
  background: #b8d4ce;
  position: relative;
  padding: 20px 48px 44px;
  min-height: calc(100vh - 33px);
  overflow: hidden;
}

/* Decorative thread SVGs */
.thread {
  position: absolute;
  top: 0;
  width: 120px;
  height: 420px;
  pointer-events: none;
}
.thread-left  { left: 0; }
.thread-right { right: 0; }

/* ─────────────────────────────────────────────────────────────────────────────
   HEADER
───────────────────────────────────────────────────────────────────────────── */
.wall-header {
  text-align: center;
  padding: 4px 0 22px;
}

.app-name {
  font-family: 'Ole', cursive;
  font-size: 105px;
  color: #8a1818;
  text-shadow: 1px 1px 0 #c84040, 2px 2px 0 #a03030;
  letter-spacing: 0.04em;
  line-height: 1.1;
}

.subtitle {
  font-family: 'Special Elite', serif;
  font-size: 11px;
  color: #4a2828;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-top: 4px;
}

.subtitle-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(138, 24, 24, 0.4);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s;
}

.subtitle-link:hover {
  text-decoration-color: #8a1818;
}

/* ─────────────────────────────────────────────────────────────────────────────
   MAIN GRID
───────────────────────────────────────────────────────────────────────────── */
.main-grid {
  display: grid;
  grid-template-columns: 1fr 272px;
  gap: 20px;
  max-width: 980px;
  margin: 0 auto;
}

/* ─────────────────────────────────────────────────────────────────────────────
   CRT MONITOR FRAME
───────────────────────────────────────────────────────────────────────────── */
.monitor-frame {
  background: #d0e0dc;
  border: 3px solid #7aa0a0;
  border-radius: 6px;
  padding: 10px;
}

.monitor-screen {
  background: #1e1418;
  border: 2px solid #5a8888;
  border-radius: 2px;
  aspect-ratio: 4 / 3;
  position: relative;
  overflow: hidden;
}

/* Video element — kept invisible, canvas draws from it */
#webcam {
  visibility: hidden;
  position: absolute;
  width: 0;
  height: 0;
}

/* Canvas fills the entire monitor screen */
#overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Thread tangle in the bottom-right corner of the screen */
.screen-thread {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 80px;
  height: 80px;
  pointer-events: none;
  z-index: 2;
}

/* CRT scanlines */
.scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 3px,
    rgba(0, 0, 0, 0.07) 3px,
    rgba(0, 0, 0, 0.07) 4px
  );
  pointer-events: none;
  z-index: 3;
}

/* Monitor bottom row: knobs + label + LIVE badge */
.monitor-bottom {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 4px 2px;
}

.knobs-row {
  display: flex;
  gap: 5px;
}

.knob {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #8aacaa;
  border: 2px solid #6a8888;
}

.knob-red { background: #b04040; }

.monitor-label-text {
  font-family: 'Special Elite', serif;
  font-size: 10px;
  letter-spacing: 0.14em;
  color: #3a5a58;
  text-transform: uppercase;
  flex: 1;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #9a2020;
  color: #fff;
  font-family: 'Special Elite', serif;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 3px;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  animation: blink-dot 1.2s step-end infinite;
}

@keyframes blink-dot {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ─────────────────────────────────────────────────────────────────────────────
   SIDEBAR
───────────────────────────────────────────────────────────────────────────── */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Shared label style used in sidebar cards */
.card-label {
  font-family: 'Special Elite', serif;
  font-size: 10px;
  letter-spacing: 0.14em;
  color: #3a5a58;
  text-transform: uppercase;
  margin-bottom: 7px;
}

/* ── Heart monitor card ── */
.heart-monitor-card {
  background: #d0e0dc;
  border: 2px solid #7aa0a0;
  border-radius: 4px;
  padding: 10px 12px 12px;
}

.heart-screen {
  background: #141e14;
  border: 1px solid #2a4a2a;
  height: 56px;
  overflow: hidden;
}

.ekg-svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* ── Currently building card ── */
.building-card {
  background: #f0e8e0;
  border: 2px solid #b09080;
  border-radius: 4px;
  padding: 12px 14px 14px;
  position: relative;
  margin-top: 12px; /* room for the tag hole above */
}

/* Hospital-tag hole notch at top center */
.building-card::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 10px;
  background: #d0e0dc;
  border: 1.5px solid #7aa0a0;
  border-radius: 2px 2px 0 0;
}

/* String hanging from the tag hole */
.building-card::after {
  content: '';
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 8px;
  background: #9a2020;
}

.building-label {
  font-family: 'Special Elite', serif;
  font-size: 10px;
  letter-spacing: 0.14em;
  color: #6a4030;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.building-text {
  font-family: 'Ole', cursive;
  font-size: 30px;
  color: #2a1008;
  outline: none;
  cursor: text;
  min-height: 1.4em;
}

/* Blinking cursor when not focused */
.building-text:not(:focus)::after {
  content: '_';
  color: #9a2020;
  animation: blink-cursor 0.8s step-end infinite;
  font-family: 'Caveat', cursive;
}

@keyframes blink-cursor {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ── Now playing / spool card ── */
.spool-card {
  background: #e8d8ec;
  border: 2px solid #a880b8;
  border-radius: 4px;
  padding: 10px 14px 12px;
}

.spool-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.vinyl {
  width: 62px;
  height: 62px;
  flex-shrink: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: vinyl-spin 5s linear infinite;
}

@keyframes vinyl-spin {
  to { transform: rotate(360deg); }
}

.song-info {
  font-family: 'Ole', cursive;
  color: #2a0a30;
}

.song-title {
  font-size: 30px;
  font-weight: 600;
  line-height: 1.2;
}

.song-artist {
  font-size: 30px;
  opacity: 0.7;
  margin-top: -2px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   FLOOR SECTION
───────────────────────────────────────────────────────────────────────────── */
.floor-section {
  background: #e0b8bc;
  border-top: 4px solid #b08088;
  padding: 0 48px 44px;
}

/* Dashed red decorative stripe at the top of the floor */
.floor-stripe {
  height: 3px;
  background: repeating-linear-gradient(
    to right,
    rgba(154, 32, 32, 0.5) 0px,
    rgba(154, 32, 32, 0.5) 20px,
    transparent 20px,
    transparent 28px
  );
  margin-bottom: 20px;
}

.kofi-block {
  display: flex;
  justify-content: center;
  padding: 10px 0 4px;
}

.kofi-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  background: #f0e0dc;
  border: 2px solid #b08088;
  padding: 14px 32px 16px;
  position: relative;
  z-index: 0;
  transition: transform 0.15s ease;
}

.kofi-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  right: -5px;
  width: 100%;
  height: 100%;
  background: #c09098;
  z-index: -1;
}

.kofi-link:hover { transform: translate(-2px, -2px); }
.kofi-link:hover::after { bottom: -7px; right: -7px; }

.kofi-label {
  font-family: 'Special Elite', serif;
  font-size: 10px;
  letter-spacing: 0.16em;
  color: #7a3030;
  text-transform: uppercase;
}

.kofi-handle {
  font-family: 'Ole', cursive;
  font-size: 28px;
  color: #2a1010;
  line-height: 1.2;
}

/* ─────────────────────────────────────────────────────────────────────────────
   AR STATUS OVERLAY  (fixed — stays visible while scrolling)
───────────────────────────────────────────────────────────────────────────── */
#ui {
  position: fixed;
  bottom: 50px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  pointer-events: none;
  z-index: 200;
}

#status {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 6px 14px;
  color: #ccc;
  font-family: 'Special Elite', serif;
  font-size: 12px;
  letter-spacing: 0.06em;
}

#status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #555;
  transition: background 0.4s;
}

#status-dot.ready { background: #dc143c; box-shadow: 0 0 6px #dc143c; }
#status-dot.error { background: #f90; }

#hint {
  color: rgba(109, 108, 108, 0.63);
  font-family: 'Special Elite', serif;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: lowercase;
}
