/* ========================================
   Layout — Full-Browser Split-Panel Cinema Companion
   ======================================== */

/* ---- Cinema Background ---- */
#cinema-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.cinema-bg-layer {
  position: absolute;
  inset: -20px;
  background-size: cover;
  background-position: center;
  transition: opacity 1.2s ease;
  animation: bgPan 30s ease-in-out infinite;
}

#cinema-bg-current {
  opacity: 1;
}

#cinema-bg-next {
  opacity: 0;
}

.cinema-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 50%, transparent 0%, var(--bg-dark) 70%),
    linear-gradient(180deg, rgba(10,10,18,0.3) 0%, rgba(10,10,18,0.85) 100%);
  z-index: 1;
}

/* ---- Main App Grid ---- */
#app-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: var(--panel-left-width) 1fr;
  height: 100vh;
  overflow: hidden;
}

/* ---- Left Panel ---- */
#left-panel {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-right: 1px solid var(--glass-border);
  overflow: hidden;
}

/* ---- Right Panel ---- */
#right-panel {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  position: relative;
}

/* ---- Right Panel States ---- */
.panel-state {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 400ms var(--ease-out);
}

.panel-state.active {
  opacity: 1;
  pointer-events: auto;
}

/* Welcome state (no movie selected) */
#welcome-state {
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
}

#welcome-state .welcome-icon {
  font-size: 64px;
  margin-bottom: 24px;
  opacity: 0.6;
}

#welcome-state h2 {
  font-family: var(--font-display);
  font-size: 48px;
  letter-spacing: 3px;
  margin-bottom: 8px;
  color: var(--text-primary);
}

#welcome-state p {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 400px;
  line-height: 1.6;
}

#welcome-state .welcome-hint {
  margin-top: 32px;
  font-size: 13px;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  gap: 8px;
}

#welcome-state .welcome-hint .hint-arrow {
  font-size: 18px;
  animation: pulse 2s ease-in-out infinite;
}

/* Chat state */
#chat-state {
  display: flex;
  flex-direction: column;
}
