/* /mythimon/room.css */

/* Whole page = black void */
html, body{
  height: 100%;
  margin: 0;
  background: #000;
}

.mythi-room{
  overflow: hidden;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #fff;
}

/* Center the "game screen" */
.game{
  position: relative;
  width: min(92vw, 720px);
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  top: 50%;
  transform: translateY(-50%);
}

/* Room background fills the game area */
.room-bg{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  object-fit: contain;
  image-rendering: pixelated;
  user-select: none;
  pointer-events: none;
}

.tv-btn{
  position: absolute;
  left: 73%;
  top: 16%;
  width: 14%;
  height: 16%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
}
.tv-btn:active{ transform: scale(0.98); }

.mythimon{
  position: absolute;
  right: 18%;
  bottom: 50%;
  width: 18%;
  height: auto;
  image-rendering: pixelated;
  cursor: pointer;
  user-select: none;
  -webkit-user-drag: none;
  filter: drop-shadow(0 14px 22px rgba(0,0,0,.65));
}
.mythimon.squish{
  transform: scaleX(1.06) scaleY(0.94);
}

/* Door hotspot */
.door-hit{
  position: absolute;
  left: 43%;
  top: 78%;
  width: 14%;
  height: 20%;
  border: 0;
  background: transparent;
  cursor: pointer;
}

/* Berry tray */
.berry-tray{
  position: absolute;
  left: 6%;
  bottom: 6%;
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(0,0,0,.45);
  border: 1px solid rgba(255,255,255,.10);
  backdrop-filter: blur(6px);
}
.berry{
  width: 36px;
  height: 36px;
  object-fit: contain;
  image-rendering: pixelated;
  cursor: grab;
  user-select: none;
  -webkit-user-drag: none;
  touch-action: none;
}
.berry:active{ cursor: grabbing; }

/* Party menu */
.party{
  position: absolute;
  right: 6%;
  bottom: 6%;
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(0,0,0,.45);
  border: 1px solid rgba(255,255,255,.10);
  backdrop-filter: blur(6px);
}
.party img{
  width: 34px;
  height: 34px;
  object-fit: contain;
  image-rendering: pixelated;
  cursor: pointer;
  filter: drop-shadow(0 8px 12px rgba(0,0,0,.55));
}

/* Music player */
.music{
  position: absolute;
  right: 0%;
  top: -2%;
  width: 220px;
  opacity: 0.92;
}

/* TV modal */
.tv-modal-box{
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(92vw, 720px);
  aspect-ratio: 16 / 9;
  background: #000;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 70px rgba(0,0,0,.65);
}
.tv-modal-box iframe{
  width: 100%;
  height: 100%;
}
.tv-x{
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 2;
  border: 0;
  background: rgba(0,0,0,.55);
  color: #fff;
  border-radius: 10px;
  padding: 6px 10px;
  cursor: pointer;
}
.tv-modal[hidden]{ display:none !important; }
.tv-modal{
  position: fixed;
  inset: 0;
  z-index: 150;
}
.tv-modal-backdrop{
  position:absolute;
  inset:0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(4px);
}

/* Toast */
.toast{
  position: absolute;
  left: 50%;
  bottom: 18%;
  transform: translateX(-50%);
  background: rgba(0,0,0,.55);
  border: 1px solid rgba(255,255,255,.14);
  color: #fff;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  backdrop-filter: blur(6px);
  pointer-events: none;
  opacity: 0;
  transition: opacity .12s ease, transform .12s ease;
  z-index: 50;
}
.toast.show{
  opacity: 1;
  transform: translateX(-50%) translateY(-2px);
}

/* Save tools (top-left) */
.save-tools{
  position: absolute;
  left: 45px;
  top: 1px;
  display: flex;
  gap: 10px;
  z-index: 9999;
}
.save-tools *{ pointer-events: auto; }

.toolbtn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  font-family: inherit;
  font-size: 11px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(20, 10, 30, .55);
  color: #fff;
  cursor: pointer;

  box-shadow:
    0 10px 26px rgba(0,0,0,.45),
    inset 0 1px 0 rgba(255,255,255,.10);

  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);

  user-select: none;
  text-decoration: none;
  white-space: nowrap;
}
.toolbtn:hover{
  transform: translateY(-1px);
  background: rgba(30, 15, 45, .62);
  border-color: rgba(255,255,255,.22);
}
.toolbtn:active{
  transform: translateY(0) scale(.98);
}
.toolbtn.ghost{
  background: rgba(0,0,0,.25);
}

/* --- PC Modal --- */
.modal[hidden]{ display:none !important; }

.modal{
  position: fixed;
  inset: 0;
  z-index: 200;
}

.modalBackdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(4px);
}

.pcPanel{
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%,-50%);
  width: min(92vw, 860px);
  max-height: min(86vh, 720px);
  overflow: auto;

  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(0,0,0,.55);
  box-shadow: 0 20px 70px rgba(0,0,0,.65);
  padding: 14px;
  color: #fff;
}

.pcHeader{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.pcTitle{
  font-weight: 800;
  letter-spacing: .2px;
}

.pcClose{
  font: inherit;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(0,0,0,.35);
  color: #fff;
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
}

.pcTabs{
  display:flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.pcTab{
  font: inherit;
  font-size: 12px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(20,10,30,.55);
  color: #fff;
  cursor: pointer;
}
.pcTab.active{
  background: rgba(255,255,255,.12);
}

/* Release toggle button in tabs row */
.pcReleaseToggle{
  margin-left: auto;
  background: rgba(0,0,0,.28);
  border-color: rgba(255,255,255,.18);
}

.pcReleaseToggle.is-on{
  background: rgba(190, 55, 95, .55);
  border-color: rgba(255,170,190,.35);
}

.pcHelp{
  font-size: 12px;
  opacity: .85;
  display:flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.pcSectionTitle{
  font-size: 12px;
  font-weight: 700;
  opacity: .9;
  margin: 10px 0 6px;
}

.pcParty{
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.28);
}

.pcGrid{
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 72px;
  gap: 10px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.28);
}

.pcSlot{
  position: relative;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.25);
  display:grid;
  place-items:center;
  overflow:hidden;
}

.pcSlot.empty{
  opacity: .45;
}

.pcSlot button{
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.pcIcon{
  width: 56px;
  height: 56px;
  object-fit: contain;
  image-rendering: pixelated;
  pointer-events: none;
}

.pcShiny{
  position:absolute;
  right: 6px;
  top: 4px;
  font-size: 14px;
  text-shadow: 0 2px 6px rgba(0,0,0,.8);
  pointer-events:none;
}
