/* SudoRoom: A Love Story - Web Visual Novel */
/* Theme from options.rpy: widget #003c78, text #c8ffff, frame #6496c8 */

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

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  background: #0a0a1a;
  font-family: 'Georgia', serif;
}

/* ── Game viewport ──────────────────────────────────────── */
#game {
  position: relative;
  width: 800px; height: 600px;
  overflow: hidden;
  background: #000;
  margin: 0 auto;
}

/* Responsive scaling */
@media (max-width: 820px), (max-height: 620px) {
  #game {
    width: 100vw;
    height: 75vw; /* 4:3 */
    max-height: 100vh;
  }
}

/* Center vertically */
body {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

/* ── Background layers (for dissolve) ───────────────────── */
#bg-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
}

#bg-back, #bg-front {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: opacity 0.5s ease;
}

#bg-back { z-index: 0; }
#bg-front { z-index: 1; }

/* ── Character layer ────────────────────────────────────── */
#char-layer {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}

.char-sprite {
  position: absolute;
  bottom: 0;
  height: 80%;
  transition: opacity 0.4s ease;
  image-rendering: auto;
}

.char-sprite.pos-left {
  left: 5%;
}

.char-sprite.pos-right {
  right: 5%;
}

.char-sprite.pos-center {
  left: 50%;
  transform: translateX(-50%);
}

/* ── Dialogue box ───────────────────────────────────────── */
#dialogue-box {
  position: absolute;
  bottom: 0;
  left: 0; right: 0;
  z-index: 20;
  background: rgba(30, 60, 100, 0.92);
  border-top: 3px solid #6496c8;
  padding: 12px 20px 16px;
  min-height: 140px;
  cursor: pointer;
  display: none;
}

#dialogue-box.visible {
  display: block;
}

#char-name {
  font-size: 16px;
  font-weight: bold;
  color: #c8ffc8;
  margin-bottom: 6px;
  text-shadow: 0 0 6px rgba(200, 255, 200, 0.4);
}

#dialogue-text {
  font-size: 15px;
  color: #c8ffff;
  line-height: 1.5;
  text-shadow: 0 0 4px rgba(200, 255, 255, 0.2);
}

#click-indicator {
  position: absolute;
  bottom: 8px;
  right: 16px;
  font-size: 12px;
  color: #6496c8;
  animation: blink 1.2s ease-in-out infinite;
}

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

/* ── Menu overlay ───────────────────────────────────────── */
#menu-overlay {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(0, 10, 30, 0.6);
}

#menu-overlay.visible {
  display: flex;
}

.menu-choice {
  display: block;
  width: 70%;
  max-width: 480px;
  padding: 14px 20px;
  font-family: 'Georgia', serif;
  font-size: 15px;
  color: #c8ffff;
  background: #003c78;
  border: 2px solid #6496c8;
  border-radius: 4px;
  cursor: pointer;
  text-align: center;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
}

.menu-choice:hover, .menu-choice:focus {
  background: #0050a0;
  transform: scale(1.02);
  box-shadow: 0 0 16px rgba(100, 150, 200, 0.5);
  outline: none;
}

/* ── Click-to-start overlay ─────────────────────────────── */
#start-overlay {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0, 10, 30, 0.85);
  cursor: pointer;
}

#start-overlay h1 {
  font-size: 28px;
  color: #c8ffff;
  text-shadow: 0 0 20px rgba(100, 150, 200, 0.6);
  margin-bottom: 8px;
}

#start-overlay p {
  font-size: 16px;
  color: #6496c8;
  animation: blink 1.5s ease-in-out infinite;
}

#start-overlay.hidden {
  display: none;
}

/* ── Back to title link ─────────────────────────────────── */
#back-link {
  margin-top: 10px;
  font-size: 13px;
  color: #6496c8;
  text-decoration: none;
}

#back-link:hover {
  color: #c8ffff;
}
