/* 奈飞映像独立主体主题。Data and playback remain owned by
 * the AList-TVBox facade; this file only defines the visual surface. */
html[data-theme="nostr"] {
  --bg: #141414;
  --surface: #1f1f1f;
  --surface-soft: #2a2a2a;
  --surface-deep: #101010;
  --surface-readable: #1f1f1f;
  --surface-control: #2a2a2a;
  --surface-overlay: #141414;
  --surface-quiet: #262626;
  --line: rgba(255,255,255,.10);
  --line-strong: rgba(255,255,255,.18);
  --border-readable: #4a4a4a;
  --text-primary: #e5e5e5;
  --text-secondary: rgba(229,229,229,.68);
  --text-tertiary: rgba(229,229,229,.52);
  --text: #e5e5e5;
  --muted: rgba(229,229,229,.60);
  --accent: #e50914;
  --accent-2: #f40612;
  --primary: #e50914;
  --success: #46d369;
  --focus: #e50914;
  --focus-ring: #e50914;
  --control-active-bg: #b20710;
  --control-active-text: #fff;
  --status-danger-bg: rgba(229,9,20,.18);
  --placeholder-bg: #2a2a2a;
  --placeholder-ink: rgba(229,229,229,.68);
  color-scheme: dark;
}

html[data-theme="nostr"] body { background: var(--bg); }
html[data-theme="nostr"] .tv-app {
  min-height: 100vh;
  padding: 10px 10px 32px;
  background: var(--bg);
}
html[data-theme="nostr"] .tv-app:before,
html[data-theme="nostr"] .tv-app:after { display: none; }
html[data-theme="nostr"] .topbar {
  height: 52px;
  margin-bottom: 12px;
  padding: 0 8px;
  border: 0;
  border-radius: 0;
  background: #141414;
  box-shadow: none;
}
html[data-theme="nostr"] .brand {
  width: 180px;
  color: #f40612;
  font-size: 20px;
  letter-spacing: 0;
  text-shadow: none;
}
html[data-theme="nostr"] .brand small { color: rgba(229,229,229,.45); font-size: 11px; }
html[data-theme="nostr"] .nav {
  margin: 0 8px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
html[data-theme="nostr"] .nav:before { display: none; }
html[data-theme="nostr"] .nav-item {
  min-width: 66px;
  height: 40px;
  margin-right: 4px;
  padding: 0 11px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: rgba(229,229,229,.66);
  text-shadow: none;
  transform: none;
}
html[data-theme="nostr"] .nav-item.active,
html[data-theme="nostr"] .nav-item:focus,
html[data-theme="nostr"] .nav-item.focus {
  border: 0;
  border-bottom: 3px solid var(--accent);
  background: transparent;
  box-shadow: none;
  color: #fff;
  outline: none;
  transform: none;
}
html[data-theme="nostr"] .top-action {
  width: 40px;
  height: 40px;
  margin-left: 4px;
  border: 1px solid #333;
  border-radius: 3px;
  background: #1f1f1f;
  box-shadow: none;
  color: rgba(229,229,229,.72);
  text-shadow: none;
}
html[data-theme="nostr"] .top-action:focus,
html[data-theme="nostr"] .top-action.focus {
  border-color: var(--accent);
  outline: 3px solid rgba(229,9,20,.30);
  outline-offset: 1px;
  background: #2a2a2a;
  box-shadow: none;
  color: #fff;
  transform: none;
}
html[data-theme="nostr"] .nostr-toolbar {
  position: relative;
  display: flex;
  align-items: center;
  margin: 0 0 10px;
  min-height: 44px;
}
html[data-theme="nostr"] .nostr-search {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}
html[data-theme="nostr"] .nostr-search-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 42px;
  padding: 0 12px;
  border: 1px solid #343434;
  border-radius: 3px 0 0 3px;
  background: #1f1f1f;
  color: #e5e5e5;
  outline: none;
}
html[data-theme="nostr"] .nostr-search-input:focus,
html[data-theme="nostr"] .nostr-search-input.editing {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(229,9,20,.20);
}
html[data-theme="nostr"] .nostr-search-button {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 0 3px 3px 0;
  background: var(--accent);
  color: #fff;
  font-size: 20px;
  line-height: 42px;
  text-align: center;
}
html[data-theme="nostr"] .nostr-search-button:focus,
html[data-theme="nostr"] .nostr-search-button.focus { background: var(--accent-2); outline: 3px solid rgba(229,9,20,.32); outline-offset: 1px; }
html[data-theme="nostr"] .nostr-identity-button {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  margin-right: 8px;
  border: 1px solid #343434;
  border-radius: 3px;
  background: #1f1f1f;
  color: var(--accent);
  font-size: 20px;
  line-height: 40px;
  text-align: center;
}
html[data-theme="nostr"] .nostr-identity-button:focus,
html[data-theme="nostr"] .nostr-identity-button.focus { border-color: var(--accent); outline: 3px solid rgba(229,9,20,.30); outline-offset: 1px; }
html[data-theme="nostr"] .nostr-chips {
  display: flex;
  overflow-x: auto;
  padding: 2px 0 10px;
  margin: 0 0 6px;
  scrollbar-width: none;
}
html[data-theme="nostr"] .nostr-chips::-webkit-scrollbar { display: none; }
html[data-theme="nostr"] .nostr-chip {
  flex: 0 0 auto;
  min-width: 70px;
  height: 34px;
  margin-right: 8px;
  padding: 0 12px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: rgba(229,229,229,.66);
  font-size: 14px;
  text-align: center;
}
html[data-theme="nostr"] .nostr-chip.active,
html[data-theme="nostr"] .nostr-chip:focus,
html[data-theme="nostr"] .nostr-chip.focus { border-bottom-color: var(--accent); color: #fff; outline: none; }
html[data-theme="nostr"] .nostr-filter-toggle-row {
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 1px 0 3px;
}
html[data-theme="nostr"] .nostr-filter-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 26px;
  padding: 0 11px;
  border: 0;
  background: transparent;
  color: rgba(229,229,229,.56);
  font-size: 12px;
  line-height: 26px;
}
html[data-theme="nostr"] .nostr-filter-toggle:hover,
html[data-theme="nostr"] .nostr-filter-toggle:focus,
html[data-theme="nostr"] .nostr-filter-toggle.focus { color: #fff; outline: none; }
html[data-theme="nostr"] .nostr-filter-toggle.has-active { color: var(--accent); }
html[data-theme="nostr"] .nostr-filter-toggle-label { margin-right: 4px; }
html[data-theme="nostr"] .nostr-filter-chevron {
  display: inline-block;
  width: 18px;
  height: 18px;
  color: var(--accent);
  font-size: 18px;
  line-height: 14px;
  text-align: center;
  transform: translateY(-1px);
  transition: transform .18s ease;
}
html[data-theme="nostr"] .nostr-filter-toggle.expanded .nostr-filter-chevron { transform: rotate(180deg) translateY(1px); }
html[data-theme="nostr"] .nostr-filter-bars {
  display: flex;
  flex-direction: column;
  margin: 0 0 5px;
  padding: 1px 0 2px;
  border-top: 1px solid rgba(255,255,255,.06);
  border-bottom: 1px solid rgba(255,255,255,.06);
  background: #181818;
}
html[data-theme="nostr"] .nostr-filter-bars.hidden { display: none; }
html[data-theme="nostr"] .nostr-filter-row {
  display: flex;
  align-items: center;
  min-height: 38px;
  overflow-x: auto;
  padding: 3px 0;
  scrollbar-width: none;
}
html[data-theme="nostr"] .nostr-filter-row::-webkit-scrollbar { display: none; }
html[data-theme="nostr"] .nostr-filter-label {
  flex: 0 0 38px;
  margin-right: 8px;
  color: rgba(229,229,229,.46);
  font-size: 11px;
  text-align: right;
  white-space: nowrap;
}
html[data-theme="nostr"] .nostr-filter-options {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
}
html[data-theme="nostr"] .nostr-filter-option {
  flex: 0 0 auto;
  min-width: 54px;
  height: 28px;
  margin-right: 6px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 3px;
  background: transparent;
  color: rgba(229,229,229,.62);
  font-size: 12px;
  text-align: center;
  white-space: nowrap;
}
html[data-theme="nostr"] .nostr-filter-option.active,
html[data-theme="nostr"] .nostr-filter-option:focus,
html[data-theme="nostr"] .nostr-filter-option.focus {
  border-color: rgba(229,9,20,.58);
  background: rgba(229,9,20,.16);
  color: #fff;
  outline: none;
}
html[data-theme="nostr"] .nostr-status { min-height: 22px; margin: 4px 0 8px; color: rgba(229,229,229,.52); font-size: 12px; }
html[data-theme="nostr"] .nostr-grid {
  display: flex;
  flex-wrap: wrap;
  margin-right: -10px;
}
html[data-theme="nostr"] .nostr-card {
  position: relative;
  flex: 0 0 146px;
  width: 146px;
  height: 274px;
  margin: 0 10px 12px 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid #383838;
  border-radius: 3px;
  background: #1f1f1f;
  color: #e5e5e5;
  text-align: left;
}
html[data-theme="nostr"] .nostr-card:focus,
html[data-theme="nostr"] .nostr-card.focus {
  z-index: 2;
  border-color: var(--accent);
  outline: 3px solid rgba(229,9,20,.32);
  outline-offset: 2px;
  box-shadow: 0 8px 24px rgba(0,0,0,.60);
  transform: scale(1.03);
}
html[data-theme="nostr"] .nostr-card-poster {
  display: block;
  width: 146px;
  height: 214px;
  object-fit: cover;
  background: #2a2a2a;
}
html[data-theme="nostr"] .nostr-card-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 146px;
  height: 214px;
  padding: 10px;
  background: #2a2a2a;
  color: rgba(229,229,229,.56);
  text-align: center;
}
html[data-theme="nostr"] .nostr-card-body { position: relative; height: 60px; padding: 8px 8px 6px; background: #1f1f1f; }
html[data-theme="nostr"] .nostr-card-title { display: block; max-width: 112px; overflow: hidden; font-size: 13px; font-weight: 600; line-height: 18px; white-space: nowrap; text-overflow: ellipsis; }
html[data-theme="nostr"] .nostr-card-meta { display: block; margin-top: 4px; color: rgba(229,229,229,.56); font-size: 11px; line-height: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html[data-theme="nostr"] .nostr-card-score { position: absolute; right: 7px; bottom: 7px; min-width: 26px; padding: 2px 4px; border-radius: 2px; background: var(--accent); color: #fff; font-size: 11px; text-align: center; }
html[data-theme="nostr"] .nostr-card-follow { position: absolute; right: 5px; top: 5px; width: 26px; height: 26px; border: 0; border-radius: 2px; background: rgba(0,0,0,.68); color: #fff; font-size: 16px; line-height: 26px; text-align: center; }
html[data-theme="nostr"] .nostr-card-follow:focus,
html[data-theme="nostr"] .nostr-card-follow.focus { background: var(--accent); outline: 2px solid rgba(229,9,20,.38); outline-offset: 1px; }
html[data-theme="nostr"] .nostr-empty,
html[data-theme="nostr"] .nostr-error { padding: 28px 14px; border: 1px dashed #444; color: rgba(229,229,229,.64); }
html[data-theme="nostr"] .nostr-error { border-color: rgba(229,9,20,.55); color: #ff9ca1; }
html[data-theme="nostr"] .nostr-identity-layer {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  z-index: 35;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 72px 20px 20px;
  background: rgba(0,0,0,.72);
}
html[data-theme="nostr"] .nostr-identity-layer.hidden { display: none; }
html[data-theme="nostr"] .nostr-identity-panel { width: 330px; max-width: 100%; padding: 18px; border: 1px solid #444; border-radius: 3px; background: #1f1f1f; box-shadow: 0 18px 44px rgba(0,0,0,.64); }
html[data-theme="nostr"] .nostr-identity-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
html[data-theme="nostr"] .nostr-identity-head h2 { margin: 0; color: #fff; font-size: 18px; }
html[data-theme="nostr"] .nostr-identity-close { width: 30px; height: 30px; border: 1px solid #444; border-radius: 2px; background: #2a2a2a; color: #fff; }
html[data-theme="nostr"] .nostr-identity-close:focus,
html[data-theme="nostr"] .nostr-identity-close.focus { border-color: var(--accent); outline: 2px solid rgba(229,9,20,.34); }
html[data-theme="nostr"] .nostr-identity-row { display: flex; justify-content: space-between; min-height: 28px; border-bottom: 1px solid rgba(255,255,255,.06); color: rgba(229,229,229,.62); font-size: 12px; line-height: 28px; }
html[data-theme="nostr"] .nostr-identity-row strong { color: #fff; font-weight: 500; }
html[data-theme="nostr"] .nostr-identity-note { margin: 12px 0; color: rgba(229,229,229,.58); font-size: 12px; line-height: 18px; }
html[data-theme="nostr"] .nostr-identity-actions { display: flex; margin-top: 12px; }
html[data-theme="nostr"] .nostr-identity-actions .btn { min-width: 0; height: 38px; margin-right: 8px; padding: 0 12px; border: 1px solid #444; border-radius: 3px; background: #2a2a2a; color: #fff; }
html[data-theme="nostr"] .nostr-identity-actions .btn.primary { border-color: var(--accent); background: var(--accent); }
html[data-theme="nostr"] .nostr-identity-actions .btn:focus,
html[data-theme="nostr"] .nostr-identity-actions .btn.focus { outline: 2px solid rgba(229,9,20,.36); outline-offset: 1px; }
html[data-theme="nostr"] .nostr-search-hint { margin-left: 10px; color: rgba(229,229,229,.42); font-size: 11px; white-space: nowrap; }

@media (max-width: 760px) {
  html[data-theme="nostr"] .brand { width: 118px; font-size: 16px; }
  html[data-theme="nostr"] .brand small { display: none; }
  html[data-theme="nostr"] .nav-item { min-width: 52px; padding: 0 6px; font-size: 12px; }
  html[data-theme="nostr"] .nostr-card { flex-basis: calc(25% - 10px); width: calc(25% - 10px); }
  html[data-theme="nostr"] .nostr-card-poster,
  html[data-theme="nostr"] .nostr-card-fallback { width: 100%; }
}

@media (min-width: 1100px) {
  html[data-theme="nostr"] .nostr-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); margin-right: 0; }
  html[data-theme="nostr"] .nostr-card { width: auto; margin-right: 10px; }
  html[data-theme="nostr"] .nostr-card-poster,
  html[data-theme="nostr"] .nostr-card-fallback { width: 100%; }
}
