:root {
  --bg: #1b1420;
  --panel: #241b29;
  --panel-hover: #2d2233;
  --text: #f2eae4;
  --text-dim: #9c8fa6;
  --accent: #e8a33d;
  --accent-dim: #b87f2c;
  font-size: 15px;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

#app {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.topbar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.wordmark {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.status {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.layout {
  flex: 1;
  display: flex;
  min-height: 0;
}

.library {
  width: 240px;
  flex-shrink: 0;
  overflow-y: auto;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  padding: 10px;
}

.library-empty {
  color: var(--text-dim);
  font-size: 0.85rem;
  padding: 12px 8px;
}

.movie-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text);
}

.movie-row:hover { background: var(--panel-hover); }

.movie-row.active {
  background: var(--panel);
  box-shadow: inset 3px 0 0 var(--accent);
}

.movie-row img {
  width: 34px;
  height: 48px;
  object-fit: cover;
  border-radius: 4px;
  background: var(--panel);
  flex-shrink: 0;
}

.movie-row .meta {
  min-width: 0;
}

.movie-row .title {
  font-size: 0.85rem;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.movie-row .year {
  font-size: 0.72rem;
  color: var(--text-dim);
}

.theater {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.screen {
  flex: 1;
  position: relative;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

#player {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.placeholder {
  position: absolute;
  color: var(--text-dim);
  font-size: 0.9rem;
  padding: 0 24px;
  text-align: center;
}

.controls {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--panel);
  flex-shrink: 0;
}

.play-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: #1b1420;
  font-size: 0.9rem;
  cursor: pointer;
  flex-shrink: 0;
}

.play-btn:hover { background: var(--accent-dim); }

#seek {
  flex: 1;
  accent-color: var(--accent);
}

.time {
  font-size: 0.78rem;
  color: var(--text-dim);
  white-space: nowrap;
}

@media (max-width: 520px) {
  .layout { flex-direction: column; }
  .library {
    width: 100%;
    max-height: 35vh;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }
}
