* { box-sizing: border-box; letter-spacing: 0; }
[hidden] { display: none !important; }
body { margin: 0; background: #080808; color: #f5f5f5; font: 16px/1.5 Arial, Helvetica, sans-serif; }
a { color: #e8e8e8; text-underline-offset: 3px; }
button, input, select { font: inherit; }
button, .action { border: 1px solid #555; border-radius: 5px; background: #222; color: #fff; padding: 10px 16px; cursor: pointer; text-decoration: none; }
button:hover, .action:hover { border-color: #e50914; background: #301216; }
button:disabled { cursor: wait; opacity: .55; }
.primary { background: #d30712; border-color: #f41520; }
input, select { display: block; width: 100%; max-width: 540px; border: 1px solid #555; border-radius: 4px; color: #f5f5f5; background: #171717; padding: 10px; min-width: 0; }
input:focus, select:focus, button:focus, a:focus { outline: 2px solid #e50914; outline-offset: 3px; }
label { display: block; margin: 0 0 7px; font-weight: 600; }
h1 { font-size: 30px; margin: 0 0 16px; line-height: 1.2; }
h2 { font-size: 22px; margin: 0 0 16px; line-height: 1.3; }
h3 { font-size: 18px; }
.muted, .setting-info { color: #b6b6b6; }
.status { color: #ffd166; min-height: 0; overflow-wrap: break-word; }
.status:empty { margin: 0; }
.page-header { display: flex; align-items: center; border-bottom: 1px solid #e50914; padding: 12px 28px; min-height: 80px; }
.page-header img { width: 165px; height: 45px; object-fit: contain; margin-left: 18px; }
.page-header > a:last-child:not(:first-child) { margin-left: auto; }
.icon-link { display: inline-block; text-decoration: none; text-align: center; width: 44px; height: 44px; line-height: 38px; font-size: 40px; border: 1px solid #444; border-radius: 50%; background: #222; flex-shrink: 0; }
main { padding: 32px; margin: auto; }
.profile-page { max-width: 850px; }
.metadata-page { max-width: 1500px; }
.profile-identity { display: flex; align-items: center; padding: 14px 0 24px; }
.profile-identity h2 { margin: 0 0 0 20px; }
.profile-avatar { width: 72px; height: 72px; line-height: 72px; flex-shrink: 0; text-align: center; border-radius: 50%; border: 2px solid #c30a13; background: #2a1214; font-size: 30px; }
.settings-section, .credits { border-top: 1px solid #333; padding: 24px 0; }
.api-settings { margin-top: 30px; }
.api-settings input { max-width: none; }
.password-settings { max-width: 540px; }
.password-settings > input:not([type="hidden"]) { margin-bottom: 18px; }
.password-visibility { display: flex; align-items: center; min-height: 44px; margin: 0 0 16px; font-weight: 400; cursor: pointer; }
.password-visibility input { width: 20px; height: 20px; min-height: 20px; margin: 0 10px 0 0; flex-shrink: 0; accent-color: #e50914; }
.tv-page .password-visibility input { min-height: 20px; }
.setting-info { display: flex; flex-wrap: wrap; align-items: center; margin: 8px 0 24px; font-size: 14px; }
.setting-info > * { margin-right: 18px; }
.text-action { border: none; background: transparent; padding: 6px 0; text-decoration: underline; text-underline-offset: 3px; color: #ccc; }
.credits { color: #a9a9a9; font-size: 13px; }
.credits h2 { font-size: 17px; }
.credits img { display: block; width: 100px; max-height: 42px; margin-bottom: 12px; }
.manager-toolbar { display: flex; align-items: center; justify-content: space-between; margin: 22px 0; }
.tabs { display: flex; flex-wrap: wrap; }
.tabs button { margin: 0 8px 8px 0; }
.tabs [aria-pressed="true"] { border-color: #e50914; background: #351015; }
.manager-layout { display: flex; align-items: flex-start; }
.library-list { width: 34%; flex-shrink: 0; padding-right: 24px; }
.match-panel { width: 66%; border-left: 1px solid #333; padding-left: 32px; min-width: 0; }
.entry { display: block; text-align: left; width: 100%; border: 0; border-bottom: 1px solid #333; border-radius: 0; background: transparent; padding: 13px 10px; overflow-wrap: break-word; }
.entry[aria-current="true"] { border-left: 3px solid #e50914; background: #241315; }
.entry strong, .entry small { display: block; }
.entry small { color: #aaa; margin-top: 4px; }
.search-form { margin: 20px 0; }
.input-action { display: flex; }
.input-action input { flex: 1; max-width: none; }
.input-action button { margin-left: 10px; }
.search-results { display: block; }
.candidate { display: flex; width: 100%; align-items: flex-start; margin: 0 0 12px; padding: 12px; text-align: left; }
.candidate img { flex-shrink: 0; width: 70px; height: 105px; object-fit: cover; margin-right: 16px; border-radius: 4px; }
.candidate .candidate-text { display: block; min-width: 0; overflow-wrap: break-word; }
.candidate strong { display: block; font-size: 18px; }
.candidate small { display: block; margin-top: 6px; color: #bdbdbd; }
.candidate[aria-pressed="true"] { border-color: #e50914; background: #281114; }
.confirm-match { padding: 12px 0 22px; }
.confirm-match p { font-weight: 700; }
.episode-section { margin-top: 28px; border-top: 1px solid #333; padding-top: 15px; }
.episode-form { display: flex; flex-wrap: wrap; align-items: flex-end; }
.episode-form > * { margin: 0 12px 12px 0; }
.episode-form input { width: 110px; }
.episode-section .entry { font-size: 14px; }
.tv-page { font-size: 20px; }
.tv-page main { max-width: 1700px; }
.tv-page .profile-page { max-width: 950px; }
.tv-page .candidate strong { font-size: 23px; }
.tv-page button, .tv-page input, .tv-page select { min-height: 48px; }
@media (max-width: 650px) {
  main { padding: 24px 16px; }
  .page-header { padding: 10px 16px; }
  .page-header img { width: 125px; margin-left: 12px; }
  .page-header > a:last-child:not(:first-child) { font-size: 14px; }
  .manager-toolbar { align-items: flex-start; flex-wrap: wrap; }
  .manager-layout { display: block; }
  .library-list, .match-panel { width: 100%; padding: 0; border: 0; }
  .match-panel { border-top: 1px solid #333; margin-top: 26px; padding-top: 24px; }
  .candidate img { width: 60px; height: 90px; margin-right: 12px; }
  .profile-identity { padding-top: 0; }
}
