:root {
  --tutup-1: #ea559c;
  --tutup-2: #d63e86;
  --tutup-pill: #c93479;
  --tutup-glow: rgba(234, 85, 156, 0.35);

  --buka-1: #3ec7bf;
  --buka-2: #229b93;
  --buka-pill: #1b857e;
  --buka-glow: rgba(62, 199, 191, 0.35);

  --neutral-bg: #0f172a;
  --font-display: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #090d16;
  font-family: var(--font-body);
  text-rendering: optimizeSpeed;
  -webkit-font-smoothing: antialiased;
}

/* =========================================================
   BASE / LANDSCAPE LAYOUT (HORIZONTAL)
   ========================================================= */
.stage,
.stage[data-orientation="landscape"] {
  display: grid;
  grid-template-columns: minmax(320px, 30%) 1fr;
  grid-template-rows: 1fr;
  width: 100vw;
  height: 100vh;
  transform: translateZ(0);
}

/* ---------- STATUS PANEL ---------- */
.status-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: clamp(20px, 3.5vh, 44px) clamp(18px, 2.5vw, 36px);
  color: #fff;
  background: linear-gradient(160deg, var(--tutup-1), var(--tutup-2));
  text-align: center;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.25);
  z-index: 10;
  contain: paint layout;
}

.stage[data-status="buka"] .status-panel {
  background: linear-gradient(160deg, var(--buka-1), var(--buka-2));
}

.header-bar {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  width: clamp(34px, 4vh, 46px);
  height: clamp(34px, 4vh, 46px);
  color: var(--tutup-pill);
}
.stage[data-status="buka"] .brand-logo { color: var(--buka-pill); }

.brand-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(20px, 2.6vh, 30px);
  letter-spacing: 0.5px;
}
.brand-text-thin { font-weight: 500; opacity: 0.85; }

.clock {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(13px, 1.7vh, 18px);
  letter-spacing: 1.5px;
  color: rgba(255, 255, 255, 0.95);
  background: rgba(0, 0, 0, 0.24);
  padding: 6px 16px;
  border-radius: 20px;
  contain: content;
}

.room-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(22px, 3.6vh, 40px);
  line-height: 1.15;
  margin: clamp(10px, 1.8vh, 20px) 0;
  color: #ffffff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.status-pill {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(34px, 6.5vh, 72px);
  letter-spacing: 3px;
  color: #fff;
  background: var(--tutup-pill);
  border-radius: 22px;
  padding: clamp(12px, 1.8vh, 24px) clamp(22px, 3vw, 40px);
  width: 88%;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255,255,255,0.3);
  transition: background 0.3s ease;
  text-transform: uppercase;
}
.stage[data-status="buka"] .status-pill {
  background: var(--buka-pill);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255,255,255,0.3);
}

.hours {
  background: rgba(0, 0, 0, 0.22);
  padding: clamp(10px, 1.8vh, 16px) clamp(14px, 1.8vw, 22px);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  width: 92%;
}
.hours-label {
  margin: 0 0 4px;
  font-size: clamp(11px, 1.3vh, 13px);
  font-weight: 700;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.85);
  display: block;
}
.hours-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.hours-days, .hours-time {
  font-size: clamp(12px, 1.7vh, 17px);
  font-weight: 700;
  color: #fff;
}
.hours-sep { display: none; }

/* ---------- CONTENT PANEL ---------- */
.content-panel {
  position: relative;
  background: var(--neutral-bg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  contain: layout paint;
}

.content-viewport {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 16px;
}

.content-empty span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(14px, 2.2vh, 22px);
  letter-spacing: 2px;
  color: #475569;
  text-transform: uppercase;
}

.content-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateZ(0);
  will-change: opacity;
  transition: opacity 0.35s ease;
  padding: clamp(12px, 2.5vw, 36px);
}
.content-slide.is-active { opacity: 1; }

.content-slide img,
.content-slide video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transform: translateZ(0);
}

.content-slide .content-iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transform: translateZ(0);
}

.content-slide .content-youtube {
  background: #000000;
  aspect-ratio: 16 / 9;
  max-width: 100%;
  max-height: 100%;
}

.content-slide .text-block {
  max-width: 85%;
  text-align: center;
  background: #1e293b;
  padding: clamp(24px, 4vh, 48px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 25px rgba(0,0,0,0.4);
}
.content-slide .text-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(24px, 4.5vh, 52px);
  color: #f8fafc;
  margin: 0 0 16px;
}
.content-slide .text-body {
  font-size: clamp(14px, 2.4vh, 24px);
  color: #cbd5e1;
  line-height: 1.6;
  white-space: pre-wrap;
}

/* PROGRESS BAR: Using transform: scaleX for 60fps GPU acceleration without layout reflows */
.progress-track {
  height: 6px;
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  transform: translateZ(0);
}
.progress-fill {
  height: 100%;
  width: 100%;
  transform-origin: left center;
  transform: scaleX(0);
  background: var(--tutup-1);
  will-change: transform;
}
.stage[data-status="buka"] .progress-fill {
  background: var(--buka-1);
}

/* =========================================================
   PORTRAIT MODE (VERTICAL DISPLAY) - ELEGANT BALANCED FLOW
   ========================================================= */
.stage[data-orientation="portrait"] {
  grid-template-columns: 1fr !important;
  grid-template-rows: auto 1fr !important;
}

.stage[data-orientation="portrait"] .status-panel {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: clamp(12px, 1.8vh, 22px);
  padding: clamp(18px, 2.2vh, 32px) clamp(20px, 4vw, 36px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.stage[data-orientation="portrait"] .header-bar {
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.stage[data-orientation="portrait"] .room-name {
  margin: 2px 0 clamp(4px, 1vh, 10px);
  font-size: clamp(24px, 3.4vh, 42px);
  text-align: center;
}

.stage[data-orientation="portrait"] .status-pill {
  width: min(340px, 85%);
  font-size: clamp(32px, 4.5vh, 56px);
  padding: clamp(12px, 1.6vh, 20px) 24px;
  border-radius: 20px;
}

.stage[data-orientation="portrait"] .hours {
  width: min(460px, 92%);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 20px;
  border-radius: 14px;
  flex-wrap: wrap;
}

.stage[data-orientation="portrait"] .hours-label {
  margin: 0;
  white-space: nowrap;
}

.stage[data-orientation="portrait"] .hours-details {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.stage[data-orientation="portrait"] .hours-sep {
  display: inline;
  opacity: 0.7;
}

@media (max-width: 768px) {
  .stage:not([data-orientation="landscape"]) {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }
}
