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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0d0c0b;
}

#room-bg {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

#clock-overlay {
  position: fixed;
  left: 0;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'VT323', monospace;
  color: #4ecf4e;
  background: #040903;
  pointer-events: none;
  letter-spacing: 0.05em;
  -webkit-font-smoothing: none;
  font-smooth: never;
  line-height: 1;
  transform-origin: 0 0;
  visibility: hidden;
}

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

#clock-overlay .colon {
  animation: blink 1s step-end infinite;
}

#monitor-click-area {
  position: fixed;
  left: 0;
  top: 0;
  transform-origin: 0 0;
  cursor: pointer;
  z-index: 10;
  background: rgba(0, 0, 0, 0.001);
  outline: 2px solid transparent;
  transition: outline-color 0.2s ease;
}

#monitor-click-area:hover {
  outline-color: rgba(200, 191, 176, 0.7);
}

#monitor-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: #111;
  z-index: 100;
  align-items: center;
  justify-content: center;
}

#monitor-bezel {
  display: flex;
  flex-direction: column;
  width: min(92vw, 92vh * 1.333);
  height: min(92vh, 92vw / 1.333);
  background: #b8b0a0;
  border-radius: 12px 12px 8px 8px;
  padding: 60px 60px 0;
  box-shadow:
    inset 2px 2px 0 rgba(255,255,255,0.25),
    inset -2px -2px 0 rgba(0,0,0,0.2),
    0 30px 80px rgba(0,0,0,0.9);
}

#monitor-screen {
  flex: 1;
  position: relative;
  background: #fff;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: inset 0 0 30px rgba(0,0,0,0.8);
}

#monitor-scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 2px,
    rgba(0,0,0,0.15) 2px,
    rgba(0,0,0,0.15) 4px
  );
  pointer-events: none;
  z-index: 1;
}

#monitor-screen iframe {
  width: 100%;
  height: 100%;
  border: none;
}

#monitor-chin {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  position: relative;
}

#monitor-logo {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 22px;
  font-weight: 900;
  font-style: italic;
  letter-spacing: 0.05em;
  color: #6a6258;
  text-shadow: 0 1px 0 rgba(255,255,255,0.3);
  user-select: none;
}

#monitor-chin #monitor-close {
  position: absolute;
  right: 16px;
}

#monitor-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #7a7268;
  border: 2px solid #5a5248;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #c8c0b0;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.25),
    0 2px 4px rgba(0,0,0,0.4);
  transition: background 0.15s, color 0.15s;
}

#monitor-close svg {
  width: 16px;
  height: 16px;
}

#monitor-close:hover {
  background: #9a9288;
  color: #fff;
}

#fullscreen-btn {
  position: fixed;
  bottom: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  opacity: 0.4;
  transition: opacity 0.2s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Cpath d='M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 20px;
}

#fullscreen-btn:hover {
  opacity: 1;
}

#fullscreen-btn.is-fullscreen {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Cpath d='M8 3v3a2 2 0 0 1-2 2H3m18 0h-3a2 2 0 0 1-2-2V3m0 18v-3a2 2 0 0 1 2-2h3M3 16h3a2 2 0 0 1 2 2v3'/%3E%3C/svg%3E");
}
