/* Video Library — dark charcoal + warm amber. No gradients, no external fonts. */

:root {
  --bg: #141412;
  --surface: #1d1d1a;
  --surface-2: #262622;
  --border: #33332e;
  --text: #f2ead8;
  --muted: #a39e8d;
  --faint: #6f6a5c;
  --accent: #e8b34b;
  --accent-dark: #c98f2a;
  --danger: #d96a5a;
}

* { box-sizing: border-box; }

/* display:flex pada .login-screen menimpa atribut hidden bawaan browser */
[hidden] { display: none !important; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  min-height: 100vh;
}

/* ---------- Login ---------- */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 36px 32px;
}

.login-mark {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--accent);
  color: #141412;
  font-weight: 800;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.login-card h1 { font-size: 24px; margin: 0 0 6px; }
.login-sub { color: var(--muted); margin: 0 0 24px; font-size: 14px; }

.login-card label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 6px;
}

.login-card input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 11px 12px;
  font-size: 15px;
  margin-bottom: 16px;
  outline: none;
}

.login-card input:focus { border-color: var(--accent); }

.login-error {
  color: var(--danger);
  font-size: 14px;
  margin: 0 0 16px;
}

.btn-primary {
  width: 100%;
  background: var(--accent);
  color: #141412;
  border: none;
  border-radius: 8px;
  padding: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.btn-primary:hover { background: var(--accent-dark); }

/* ---------- Header ---------- */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px 24px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.brand { display: flex; gap: 14px; align-items: flex-start; }

.brand-mark {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 10px;
  background: var(--accent);
  color: #141412;
  font-weight: 800;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand h1 { font-size: 22px; margin: 0; line-height: 1.2; }
.brand-sub { color: var(--muted); font-size: 14px; margin: 4px 0 0; }

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 14px;
  cursor: pointer;
}

.btn-ghost:hover { color: var(--text); border-color: var(--muted); }

.filters {
  max-width: 1180px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-tab {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.filter-tab:hover { color: var(--text); border-color: var(--muted); }

.filter-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #141412;
}

/* ---------- Main / grid ---------- */
main { max-width: 1180px; margin: 0 auto; padding: 24px; }

.hint-bar {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 20px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.empty-state { color: var(--muted); text-align: center; padding: 48px 0; }

/* ---------- Card ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card-poster {
  position: relative;
  aspect-ratio: 9 / 12;
  max-height: 340px;
  overflow: hidden;
  background: #000;
  cursor: pointer;
  padding: 0;
  border: none;
  display: block;
  width: 100%;
}

.card-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  display: block;
}

.card-poster .play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.18);
}

.card-poster .play span {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(20, 20, 18, 0.85);
  border: 1px solid rgba(242, 234, 216, 0.6);
  color: var(--text);
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 3px;
}

.card-poster.disabled { cursor: default; }
.card-poster.disabled .play { display: none; }

.card-body { padding: 18px; display: flex; flex-direction: column; gap: 12px; flex: 1; }

.badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 6px;
  padding: 4px 9px;
}

.badge-stickman { background: #2e3a2c; color: #b8d9a8; }
.badge-bedah { background: #3a2f1a; color: var(--accent); }

.card-title { font-size: 18px; font-weight: 700; margin: 0; line-height: 1.3; }

.card-meta {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}

.status {
  font-size: 13px;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  margin: 0;
}

.status .dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 7px;
}

.status.pending .dot { background: var(--faint); }

.caption-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--faint);
  margin: 0;
}

.caption-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  font-size: 14px;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
  max-height: 180px;
  overflow-y: auto;
}

.card-actions {
  display: flex;
  gap: 10px;
  margin-top: auto;
}

.btn {
  flex: 1;
  text-align: center;
  text-decoration: none;
  border-radius: 8px;
  padding: 11px 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-download {
  background: var(--accent);
  color: #141412;
}

.btn-download:hover { background: var(--accent-dark); }

.btn-copy {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-copy:hover { border-color: var(--muted); }
.btn-copy.copied { border-color: var(--accent); color: var(--accent); }

.btn-download.disabled {
  background: var(--surface-2);
  color: var(--faint);
  cursor: not-allowed;
  pointer-events: none;
}

.schedule-hint {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

.schedule-hint strong { color: var(--accent); font-weight: 700; }

.note {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

/* ---------- Footer ---------- */
.site-footer {
  max-width: 1180px;
  margin: 0 auto;
  padding: 8px 24px 32px;
  color: var(--faint);
  font-size: 13px;
}

.site-footer strong { color: var(--accent); }

@media (max-width: 560px) {
  .header-inner { flex-wrap: wrap; }
  .brand-sub { font-size: 13px; }
  main { padding: 16px; }
}
