/* AMPAS Caption Review — minimal POC styling.
   Palette: black, white, Oscars gold accent.
   Easy to refine later without touching JS or markup. */

:root {
  --bg: #0b0b0c;
  --surface: #16161a;
  --surface-2: #1f1f25;
  --border: #2a2a31;
  --text: #f5f5f5;
  --text-muted: #a5a5ad;
  --gold: #c9a961;
  --gold-bright: #e0c485;
  --danger: #e25656;
  --success: #6ec07a;
}

* { box-sizing: border-box; }

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

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: #000;
  border-bottom: 1px solid var(--gold);
}

.brand { display: flex; align-items: baseline; gap: 10px; }
.brand-mark {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  letter-spacing: 0.18em;
  color: var(--gold);
  font-weight: 700;
}
.brand-sub {
  font-size: 13px;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.header-controls { display: flex; align-items: center; gap: 10px; }
.lang-label { color: var(--text-muted); font-size: 13px; }
#language-select {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 6px 10px;
  font-size: 14px;
  border-radius: 4px;
}
#language-select:disabled { opacity: 0.5; }

.layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  height: calc(100vh - 57px);
}

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; height: auto; }
}

.player-pane {
  padding: 20px 24px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  overflow-y: auto;
}

.video-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text);
}

.player-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border: 1px solid var(--border);
  position: relative;
}
.player-frame video-js,
.player-frame .video-js {
  width: 100% !important;
  height: 100% !important;
}

.current-cue {
  margin-top: 16px;
  padding: 12px 14px;
  background: var(--surface-2);
  border-left: 3px solid var(--gold);
  font-size: 15px;
  min-height: 44px;
  color: var(--text);
  white-space: pre-wrap;
}

.caption-pane {
  display: flex;
  flex-direction: column;
  background: var(--bg);
  height: 100%;
  min-height: 0;
}

.cue-list {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 12px 20px;
}

.cue {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  padding: 10px 12px;
  margin-bottom: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  transition: border-color 0.15s, background 0.15s;
}
.cue.is-active {
  border-color: var(--gold);
  background: var(--surface-2);
}

.cue-time {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  color: var(--text-muted);
  padding-top: 8px;
  cursor: pointer;
  user-select: none;
}
.cue-time:hover { color: var(--gold-bright); }
.cue.is-active .cue-time { color: var(--gold); }

.cue-text {
  width: 100%;
  min-height: 44px;
  resize: vertical;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.4;
}
.cue-text:focus {
  outline: none;
  border-color: var(--gold);
}

.save-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.save-status { font-size: 13px; color: var(--text-muted); }
.save-status.is-error { color: var(--danger); }
.save-status.is-success { color: var(--success); }

.save-btn {
  background: var(--gold);
  color: #000;
  border: none;
  font-weight: 600;
  font-size: 14px;
  padding: 10px 22px;
  border-radius: 4px;
  cursor: pointer;
  letter-spacing: 0.05em;
}
.save-btn:hover:not(:disabled) { background: var(--gold-bright); }
.save-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.85);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
}
.overlay.hidden { display: none; }
.overlay-card {
  background: var(--surface);
  border: 1px solid var(--gold);
  padding: 28px 32px;
  max-width: 520px;
  border-radius: 6px;
  text-align: center;
}
.overlay-title {
  color: var(--gold);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
}
.overlay-body { color: var(--text-muted); font-size: 15px; }
