/* ================================================================
   OldieFlix accounts — UI styling.
   Monochrome, matching the existing site palette (#0b0b0b / #141414
   grounds, #fff headings, #888–#ccc greys, #2a2a2a hairlines).
   ================================================================ */

/* ---------------------------------------------------------- nav control -- */

.of-nav-host { position: relative; display: flex; align-items: center; margin: 0; }

.of-nav-btn {
  display: flex; align-items: center; gap: 8px;
  min-height: 34px; padding: 6px 12px;
  border: 1px solid #3a3a3a; border-radius: 3px;
  background: rgba(0, 0, 0, .45); color: #ddd;
  font: inherit; font-size: 12px; letter-spacing: .06em; text-transform: uppercase;
  cursor: pointer; white-space: nowrap;
}
.of-nav-btn:hover { border-color: #666; color: #fff; }
.of-nav-btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.of-nav-btn.has-profile { padding: 5px 10px; }

.of-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  flex: none; overflow: hidden;
  width: 46px; height: 46px;
  border: 1px solid #4a4a4a; border-radius: 4px;
  background: #1a1a1a; color: #eee;
  font-size: 22px; line-height: 1;
}
.of-avatar svg { width: 62%; height: 62%; display: block; }
.of-avatar.has-poster { padding: 0; border-color: #3a3a3a; }
.of-avatar-poster {
  width: 100%; height: 100%; display: block;
  object-fit: cover; filter: grayscale(100%) contrast(108%);
}
.of-avatar-sm { width: 24px; height: 24px; border-radius: 3px; }
.of-avatar-sm svg { width: 68%; height: 68%; }
.of-avatar-plus { font-size: 26px; border-style: dashed; color: #888; }

/* ---------------------------------------------------------------- menu -- */

.of-menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 120;
  min-width: 220px; padding: 6px;
  border: 1px solid #333; border-radius: 4px;
  background: #101010; box-shadow: 0 18px 44px rgba(0, 0, 0, .6);
  display: flex; flex-direction: column; gap: 1px;
}
.of-menu-head {
  padding: 8px 10px 10px; margin-bottom: 4px;
  border-bottom: 1px solid #262626;
  color: #777; font-size: 11px; word-break: break-all;
}
.of-menu-item {
  display: flex; align-items: center; gap: 9px;
  width: 100%; padding: 9px 10px;
  border: 0; border-radius: 3px; background: transparent;
  color: #ddd; font: inherit; font-size: 13px; text-align: left;
  text-decoration: none; cursor: pointer;
}
.of-menu-item:hover { background: #1d1d1d; color: #fff; }
.of-menu-item:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
.of-menu-item.is-active { background: #202020; color: #fff; }

/* --------------------------------------------------------------- modal -- */

body.of-modal-open { overflow: hidden; }

.of-overlay {
  position: fixed; inset: 0; z-index: 10050;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, .82);
}

.of-box {
  position: relative;
  width: min(420px, 100%); max-height: 90vh; overflow-y: auto;
  padding: 30px 28px 26px;
  border: 1px solid #333; border-radius: 6px;
  background: #121212;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .7);
}

.of-close {
  position: absolute; top: 8px; right: 10px;
  width: 36px; height: 36px;
  border: 0; background: transparent; color: #999;
  font-size: 26px; line-height: 1; cursor: pointer;
}
.of-close:hover { color: #fff; }
.of-close:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }

.of-title {
  margin: 0 0 16px;
  color: #fff; font-size: 21px; font-weight: 800; line-height: 1.2;
  letter-spacing: .2px;
}

.of-form { display: flex; flex-direction: column; gap: 14px; }

.of-note { margin: 0; color: #9a9a9a; font-size: 13.5px; line-height: 1.55; }
.of-hint { margin: -6px 0 0; color: #777; font-size: 12px; line-height: 1.5; }

.of-field { display: flex; flex-direction: column; gap: 6px; }
.of-field-label {
  color: #999; font-size: 10.5px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
}
.of-input {
  width: 100%; padding: 11px 12px;
  border: 1px solid #3a3a3a; border-radius: 3px;
  background: #0b0b0b; color: #eee;
  font: inherit; font-size: 15px;
}
.of-input:focus { border-color: #888; outline: none; }
.of-input:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }

.of-primary, .of-secondary {
  padding: 12px 16px; border-radius: 3px;
  font: inherit; font-size: 13px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; cursor: pointer;
}
.of-primary { border: 0; background: #fff; color: #000; }
.of-primary:hover:not(:disabled) { background: #ddd; }
.of-primary:disabled { opacity: .55; cursor: default; }
.of-secondary { border: 1px solid #444; background: transparent; color: #ccc; }
.of-secondary:hover { border-color: #777; color: #fff; }
.of-primary:focus-visible, .of-secondary:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

.of-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.of-actions .of-primary, .of-actions .of-secondary { flex: 1 1 150px; }

.of-links { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 2px; }
.of-link {
  padding: 0; border: 0; background: none;
  color: #9db4d0; font: inherit; font-size: 13px;
  text-decoration: underline; text-underline-offset: 2px; cursor: pointer;
}
.of-link:hover { color: #fff; }
.of-link:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 2px; }

.of-status { margin: 0; min-height: 1.2em; color: #9a9a9a; font-size: 13px; line-height: 1.5; }
.of-status.is-error { color: #e08b7f; }

.of-code {
  margin: 4px 0 20px; padding: 16px;
  border: 1px dashed #555; border-radius: 4px;
  background: #0b0b0b; color: #fff;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 20px; letter-spacing: .16em; text-align: center; word-break: break-all;
}

.of-check { display: flex; align-items: center; gap: 9px; color: #ccc; font-size: 14px; cursor: pointer; }
.of-check input { width: 16px; height: 16px; accent-color: #fff; }

/* ------------------------------------------------------- avatar picker -- */

.of-picker { display: flex; flex-direction: column; gap: 10px; }

.of-picker-tabs { display: flex; gap: 4px; border-bottom: 1px solid #2a2a2a; }
.of-picker-tab {
  padding: 8px 12px; border: 0; border-bottom: 2px solid transparent;
  background: none; color: #999;
  font: inherit; font-size: 11px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; cursor: pointer;
}
.of-picker-tab:hover { color: #fff; }
.of-picker-tab.is-on { color: #fff; border-bottom-color: #fff; }
.of-picker-tab:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }

.of-picker-search { font-size: 14px; padding: 9px 11px; }

.of-picker-grid {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 7px;
  max-height: 216px; overflow-y: auto; padding-right: 2px;
}
.of-picker-grid.is-posters { grid-template-columns: repeat(4, 1fr); max-height: 260px; }
.of-picker-grid .of-hint { grid-column: 1 / -1; margin: 6px 0; }

.of-picker-option {
  display: flex; padding: 0;
  border: 0; background: none; cursor: pointer;
}
.of-picker-option .of-avatar {
  width: 100%; height: auto; aspect-ratio: 1;
  transition: border-color .12s ease;
}
.of-picker-grid.is-posters .of-picker-option .of-avatar { aspect-ratio: 2 / 3; }
.of-picker-option:hover .of-avatar { border-color: #888; color: #fff; }
.of-picker-option.is-chosen .of-avatar {
  border-color: #fff; box-shadow: inset 0 0 0 1px #fff; color: #fff;
}
.of-picker-option.is-chosen .of-avatar-poster { filter: grayscale(0%); }
.of-picker-option:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 4px; }

/* --------------------------------------------------------- profile gate -- */

.of-gate {
  position: fixed; inset: 0; z-index: 10040;
  display: flex; align-items: center; justify-content: center;
  padding: 24px; background: #0b0b0b;
}
.of-gate-inner { width: min(720px, 100%); text-align: center; }
.of-gate-title {
  margin: 0 0 34px;
  color: #fff; font-size: clamp(26px, 5vw, 42px); font-weight: 800; line-height: 1.1;
}
.of-gate-grid {
  display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: center;
  gap: 22px; margin-bottom: 26px;
}
.of-profile-card {
  display: flex; flex-direction: column; align-items: center; gap: 9px;
  width: 108px; padding: 10px 6px;
  border: 0; border-radius: 5px; background: transparent;
  color: #b5b5b5; font: inherit; cursor: pointer;
}
.of-profile-card:hover { color: #fff; }
.of-profile-card:hover .of-avatar { border-color: #fff; }
.of-profile-card:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.of-profile-card:disabled { opacity: .5; cursor: default; }
.of-profile-card .of-avatar { width: 84px; height: 84px; }
.of-profile-name { font-size: 14px; line-height: 1.3; word-break: break-word; }
.of-profile-tag {
  padding: 2px 7px; border: 1px solid #4a4a4a; border-radius: 2px;
  color: #999; font-size: 9.5px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
}
.of-profile-add .of-avatar { border-style: dashed; color: #888; }

.of-gate-foot { display: flex; flex-wrap: wrap; gap: 20px; justify-content: center; margin-top: 8px; }

/* ------------------------------------------------------------ kids mode -- */

body.of-kids-mode #featuredHero { display: none; }

/* ----------------------------------------------------------- responsive -- */

@media (max-width: 600px) {
  .of-nav-host { margin: 0; }
  .of-nav-btn { min-height: 34px; padding: 5px 9px; font-size: 11px; }
  .of-box { padding: 26px 18px 22px; }
  .of-picker-grid { grid-template-columns: repeat(5, 1fr); }
  .of-picker-grid.is-posters { grid-template-columns: repeat(3, 1fr); }
  .of-profile-card { width: 92px; }
  .of-profile-card .of-avatar { width: 68px; height: 68px; }
  .of-menu { right: auto; left: 0; min-width: 200px; }
}

@media (prefers-reduced-motion: reduce) {
  .of-overlay, .of-gate, .of-menu { animation: none !important; transition: none !important; }
}

/* ------------------------------------------------------ account settings -- */

.of-panel {
  margin: 0 0 26px; padding: 24px;
  border: 1px solid #292929; border-radius: 6px;
  background: #111;
}
.of-panel h2 { margin: 0 0 12px; color: #fff; font-size: 19px; font-weight: 800; }
.of-panel .of-form { max-width: 420px; }
.of-panel-danger { border-color: #4a2b26; }

.of-linkbtn { display: inline-block; text-align: center; text-decoration: none; }
.of-danger { border-color: #6b3a33; color: #e08b7f; }
.of-danger:hover { border-color: #a2564a; color: #fff; }
.of-danger-link { color: #e08b7f; }

.of-profile-admin { display: flex; flex-direction: column; gap: 2px; margin-bottom: 18px; }
.of-profile-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding: 12px 4px; border-bottom: 1px solid #242424;
}
.of-profile-row:last-child { border-bottom: 0; }
.of-profile-row-name { flex: 1 1 140px; color: #eee; font-size: 15px; word-break: break-word; }
.of-profile-row-tags { display: flex; gap: 6px; }
.of-profile-row-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.of-profile-preferences {
  flex:1 0 100%; display:flex; flex-wrap:wrap; gap:10px 22px;
  padding:8px 0 2px 34px;
}
.of-profile-preferences .of-check { color:#999; font-size:12px; }
.of-compact-field { max-width:320px; margin:18px 0 12px; }
.of-activity-list,.of-device-list {
  display:flex; flex-direction:column; margin-top:12px;
  color:#999; font-size:13px;
}
.of-activity-row,.of-device-row {
  display:flex; align-items:center; justify-content:space-between; gap:16px;
  padding:11px 0; border-bottom:1px solid #242424;
}
.of-activity-row:last-child,.of-device-row:last-child { border-bottom:0; }
.of-activity-row a { color:#ddd; text-decoration:none; }
.of-activity-row a:hover { color:#fff; text-decoration:underline; }
.of-activity-row span { text-align:right; color:#777; font-size:12px; }
.of-device-row > span { display:flex; flex-direction:column; gap:3px; }
.of-device-row strong { color:#ddd; font-size:13px; }
.of-device-row small { color:#777; font-size:11px; }

@media (max-width:600px) {
  .of-profile-preferences { padding-left:0; }
  .of-activity-row,.of-device-row { align-items:flex-start; flex-direction:column; }
  .of-activity-row span { text-align:left; }
}
.of-plus-panel { border-color:#555; background:linear-gradient(145deg,#121212,#080808); }
.of-plus-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; }
.of-plus-heading h2 { margin-top:2px; }
.of-plus-kicker { margin:0; color:#777; font-size:9px; letter-spacing:2px; text-transform:uppercase; }
.of-plus-price { border:1px solid #555; border-radius:999px; padding:7px 11px; color:#fff; font-size:11px; letter-spacing:1px; white-space:nowrap; }
