:root {
  --bg-base: #0d0d0d;
  --bg-surface: #161616;
  --bg-elevated: #202020;
  --bg-hover: #262626;
  --border-subtle: #1f1f1f;
  --border-strong: #2e2e2e;
  --text-primary: #f5f5f5;
  --text-secondary: #a3a3a3;
  --text-muted: #737373;
  --accent: #ef4444;
  --rose: #fb7185;
  --emerald: #10b981;
  --amber: #f59e0b;
  --sky: #38bdf8;
  --sidebar-w: 224px;
  --topbar-h: 56px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scrollbar-gutter: stable;
}

html, body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select {
  font-family: inherit;
  color: inherit;
}

/* Subtle Thin Scrollbars */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #2a2a2a;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #404040;
}

.hidden {
  display: none !important;
}

/* ============================================================================
   APP SHELL, BORDERLESS TOP NAVBAR & SIDEBAR (EXACT SCREENSHOT 2 & 3 LOOK)
   ============================================================================ */

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.top-navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 60;
  background: rgba(13, 13, 13, 0.94);
  backdrop-filter: blur(10px);
  border: none;
  transition: background-color 0.3s ease;
}

.top-navbar.is-transparent {
  background: transparent;
  backdrop-filter: none;
}

.top-navbar-left {
  display: flex;
  align-items: center;
  width: 312px;
  justify-content: space-between;
  gap: 16px;
  transition: width 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

body.sidebar-collapsed .top-navbar-left {
  width: 232px;
  gap: 16px;
}

.top-brand-cluster {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  user-select: none;
  transition: opacity 0.15s ease;
}
.brand-logo:hover {
  opacity: 0.9;
}

.brand-mark-a {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #171717;
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-wordmark {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #f5f5f5;
  line-height: 1;
}

.history-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 0;
}

.history-circle-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(20, 20, 20, 0.65);
  color: #e5e5e5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.history-circle-btn:hover {
  background: rgba(38, 38, 38, 0.9);
  color: #ffffff;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease;
}
.icon-btn:hover {
  background: #262626;
}
.icon-btn.is-sm {
  width: 32px;
  height: 32px;
  background: rgba(24, 24, 24, 0.75);
}

/* Search Input (Clean dark pill without heavy borders) */
.top-search-wrap {
  position: relative;
  width: min(400px, 36vw);
  display: flex;
  align-items: center;
}

.top-search-icon {
  position: absolute;
  left: 14px;
  color: #8a8a8a;
  pointer-events: none;
}

.top-search-input {
  width: 100%;
  height: 36px;
  background: rgba(24, 24, 24, 0.75);
  border: none;
  border-radius: 99px;
  padding: 0 18px 0 38px;
  font-size: 13px;
  color: var(--text-primary);
  outline: none;
  transition: background 0.2s ease;
}
.top-search-input::placeholder {
  color: #7a7a7a;
}
.top-search-input:focus {
  background: #222222;
}

.search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #181818;
  border-radius: 12px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.85);
  max-height: 440px;
  overflow-y: auto;
  z-index: 90;
  padding: 8px;
}

.search-result-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.12s ease;
}
.search-result-row:hover {
  background: var(--bg-hover);
}
.search-result-thumb {
  width: 40px;
  height: 56px;
  border-radius: 6px;
  object-fit: cover;
  background: #222;
  flex-shrink: 0;
}
.search-result-meta {
  flex: 1;
  min-width: 0;
}
.search-result-title {
  font-weight: 600;
  font-size: 13.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-result-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.top-navbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.scrobble-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 12px;
  border-radius: 99px;
  border: none;
  background: rgba(24, 24, 24, 0.72);
  font-size: 12px;
  font-weight: 500;
  color: #d4d4d4;
  cursor: pointer;
  transition: background 0.15s ease;
}
.scrobble-pill:hover {
  background: #262626;
  color: #fff;
}
.scrobble-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #525252;
}
.scrobble-dot.is-on {
  background: var(--emerald);
}
.scrobble-dot.is-watching {
  background: var(--sky);
}

.top-notif-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.top-notif-btn {
  position: relative;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(24, 24, 24, 0.78);
  color: #d4d4d4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.top-notif-btn:hover {
  background: #242424;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.18);
}

.notif-unread-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  padding: 0 3px;
  border-radius: 999px;
  background: #e5e5e5;
  color: #0d0d0d;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #0d0d0d;
  pointer-events: none;
}

.notifications-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 356px;
  max-height: 440px;
  display: flex;
  flex-direction: column;
  background: #161616;
  border: 1px solid #262626;
  border-radius: 12px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.88);
  z-index: 105;
  overflow: hidden;
}

.notif-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid #222222;
}

.notif-dropdown-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #f5f5f5;
  letter-spacing: -0.01em;
}

.notif-mark-read-btn {
  border: none;
  background: transparent;
  color: #8a8a8a;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
  transition: color 0.12s ease, background 0.12s ease;
}
.notif-mark-read-btn:hover {
  color: #f5f5f5;
  background: #222222;
}

.notif-dropdown-list {
  overflow-y: auto;
  max-height: 380px;
  padding: 6px;
}

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 9px 10px;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: background 0.12s ease;
  position: relative;
}
.notif-item:hover {
  background: #202020;
}
.notif-item.is-unread {
  background: rgba(255, 255, 255, 0.03);
}
.notif-item.is-unread:hover {
  background: #222222;
}

.notif-thumb-wrap {
  position: relative;
  width: 38px;
  height: 52px;
  flex-shrink: 0;
}
.notif-thumb {
  width: 38px;
  height: 52px;
  border-radius: 6px;
  object-fit: cover;
  background: #222;
  display: block;
}
.notif-friend-mini-avatar {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #161616;
  background: #222;
}

.notif-body {
  flex: 1;
  min-width: 0;
}

.notif-top-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 2px;
}

.notif-kind-label {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #8a8a8a;
}
.notif-kind-label.is-airing {
  color: #34d399;
}
.notif-kind-label.is-sequel {
  color: #60a5fa;
}
.notif-kind-label.is-recommendation {
  color: #e5e5e5;
}

.notif-time {
  font-size: 11px;
  color: #6e6e6e;
  flex-shrink: 0;
}

.notif-anime-title {
  font-size: 13px;
  font-weight: 600;
  color: #f5f5f5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notif-message {
  font-size: 12px;
  color: #9e9e9e;
  margin-top: 2px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notif-unread-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f5f5f5;
  flex-shrink: 0;
  margin-top: 6px;
}

.rec-friend-trigger {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border-radius: 9px;
  border: 1px solid #262626;
  background: #141414;
  color: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.rec-friend-trigger:hover {
  background: #1a1a1a;
  border-color: #363636;
}

.rec-friend-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #161616;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.88);
  padding: 5px;
  max-height: 230px;
  overflow-y: auto;
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rec-friend-option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 9px;
  border-radius: 7px;
  border: none;
  background: transparent;
  color: #f5f5f5;
  cursor: pointer;
  transition: background 0.12s ease;
}
.rec-friend-option:hover {
  background: #222222;
}
.rec-friend-option.is-selected {
  background: #252525;
}

.friend-profile-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  margin-bottom: 18px;
  background: #141414;
  border: 1px solid #222222;
  border-radius: 12px;
}

.friend-profile-identity {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.is-adult-blur {
  filter: blur(18px) brightness(0.68);
  transform: scale(1.08);
  transition: filter 0.2s ease;
}

.adult-cover-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(15, 15, 15, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #f87171;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  z-index: 4;
  pointer-events: none;
}

.top-user-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.top-profile-avatar-btn {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  padding: 0;
  background: #181818;
  cursor: pointer;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s ease, transform 0.12s ease;
}
.top-profile-avatar-btn:hover {
  border-color: rgba(255, 255, 255, 0.45);
}

.top-profile-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.top-login-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 16px;
  border-radius: 99px;
  border: 1px solid #ffffff;
  background: #ffffff;
  color: #0d0d0d;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}
.top-login-btn:hover {
  background: #e5e5e5;
  border-color: #e5e5e5;
  transform: translateY(-1px);
}

.user-profile-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 248px;
  background: #161616;
  border: 1px solid #262626;
  border-radius: 12px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.85);
  padding: 6px;
  z-index: 100;
}

.user-dropdown-header {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 10px 11px;
  border-bottom: 1px solid #222222;
  margin-bottom: 4px;
}

.user-dropdown-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  background: #222;
  flex-shrink: 0;
}

.user-dropdown-meta {
  min-width: 0;
  flex: 1;
}

.user-dropdown-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #f5f5f5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-dropdown-sub {
  font-size: 11.5px;
  color: #8a8a8a;
  margin-top: 1px;
}

.user-dropdown-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #e5e5e5;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
.user-dropdown-item:hover {
  background: #242424;
  color: #ffffff;
}
.user-dropdown-item.is-danger {
  color: #f87171;
}
.user-dropdown-item.is-danger:hover {
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
}

.user-dropdown-item-left {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.user-dropdown-divider {
  height: 1px;
  background: #222222;
  margin: 4px 6px;
}

/* Settings Page Layout */
.settings-container {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.settings-card {
  background: #141414;
  border: 1px solid #222222;
  border-radius: 12px;
  padding: 20px 22px;
}

.settings-card-title {
  font-size: 15px;
  font-weight: 700;
  color: #f5f5f5;
  margin-bottom: 4px;
}

.settings-card-desc {
  font-size: 12.5px;
  color: #8a8a8a;
  margin-bottom: 16px;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid #1f1f1f;
}
.settings-row:first-of-type {
  border-top: none;
  padding-top: 0;
}
.settings-row:last-of-type {
  padding-bottom: 0;
}

.settings-avatar-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.settings-avatar-pick {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  padding: 0;
  border: 2px solid transparent;
  background: #1f1f1f;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.15s ease, transform 0.12s ease;
}
.settings-avatar-pick:hover {
  transform: scale(1.05);
}
.settings-avatar-pick.is-selected {
  border-color: #f5f5f5;
}
.settings-avatar-pick img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Borderless Left Sidebar (Seamless blend into main content) */
.side-navbar {
  position: fixed;
  top: var(--topbar-h);
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  background: var(--bg-base);
  border: none;
  z-index: 50;
  will-change: transform;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.18s ease;
}

body.sidebar-collapsed .side-navbar {
  transform: translateX(-100%);
  opacity: 0;
  pointer-events: none;
}

.side-navbar-inner {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 12px 10px;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.side-navbar-inner::-webkit-scrollbar {
  display: none;
}

.nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 18px;
  border-radius: 12px;
  color: #e5e5e5;
  font-weight: 500;
  font-size: 14px;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-link:hover {
  background: #212121;
  color: #ffffff;
}
.nav-link.is-active {
  background: #262626;
  color: #ffffff;
  font-weight: 600;
}

.sidebar-saved-section {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #1f1f1f;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.sidebar-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 14px 10px 18px;
  font-size: 13px;
  font-weight: 600;
  color: #8a8a8a;
}

.sidebar-add-btn {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: #8a8a8a;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
}
.sidebar-add-btn:hover {
  background: #212121;
  color: #ffffff;
}
.sidebar-add-btn.has-requests {
  width: auto;
  min-width: 24px;
  padding: 0 7px;
  font-size: 11.5px;
  font-weight: 700;
  color: #ffffff;
  background: rgba(229, 9, 20, 0.22);
  border: 1px solid rgba(229, 9, 20, 0.45);
}

.sidebar-quick-list {
  list-style: none;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.sidebar-quick-list::-webkit-scrollbar {
  display: none;
}

.sidebar-friend-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  border-radius: 12px;
  color: #f5f5f5;
  transition: background 0.12s ease;
}
.sidebar-friend-item:hover {
  background: #1d1d1d;
}
.friend-avatar-wrap {
  position: relative;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}
.friend-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  background: #222;
  display: block;
}
.friend-status-dot {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--bg-base);
  background: #52525b;
}
.friend-status-dot.is-watching {
  background: var(--sky);
}
.friend-status-dot.is-online {
  background: var(--emerald);
}
.friend-status-dot.is-offline {
  background: #52525b;
}
.friend-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.friend-top-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
}
.friend-name {
  font-size: 13px;
  font-weight: 600;
  color: #f3f4f6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.friend-time {
  font-size: 11px;
  color: #6b7280;
  flex-shrink: 0;
}
.friend-time.is-live {
  color: var(--sky);
  font-weight: 600;
}
.friend-activity {
  font-size: 11.5px;
  color: #8a8a8a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.friend-activity.is-live {
  color: #cbd5e1;
}
.friend-activity.is-link {
  display: block;
}
.friend-name-link:hover,
.friend-activity.is-link:hover {
  text-decoration: underline;
  color: #ffffff;
}

.sidebar-footer {
  margin-top: auto;
  padding: 12px 18px 6px;
}
.sidebar-db-stats {
  font-size: 11.5px;
  color: #666;
}
.sidebar-footer-links {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 11.5px;
  color: #5a5a5a;
}
.sidebar-footer-links a {
  color: #777;
  text-decoration: none;
  transition: color 0.15s ease;
}
.sidebar-footer-links a:hover,
.sidebar-footer-links a.is-active {
  color: #e5e5e5;
}

.info-prose {
  font-size: 13.5px;
  line-height: 1.65;
  color: #b8b8b8;
}
.info-prose + .info-prose {
  margin-top: 10px;
}
.info-list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13.5px;
  line-height: 1.6;
  color: #b8b8b8;
}
.info-list strong {
  color: #ececec;
  font-weight: 600;
}
.info-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}
.info-feature-item {
  background: #101010;
  border: 1px solid #202020;
  border-radius: 10px;
  padding: 14px 15px;
}
.info-feature-title {
  font-size: 13.5px;
  font-weight: 600;
  color: #f3f3f3;
  margin-bottom: 4px;
}
.info-feature-desc {
  font-size: 12.5px;
  line-height: 1.55;
  color: #8f8f8f;
}

/* Main Content Viewport */
.main-content {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  padding-bottom: 80px;
}

body.sidebar-collapsed .main-content {
  margin-left: 0;
}

/* ============================================================================
   HERO SPOTLIGHT BANNER (EXACT SCREENSHOT 2 & 3 SEAMLESS FADE)
   ============================================================================ */

.hero-banner-wrap {
  position: relative;
  width: 100%;
  height: clamp(440px, 50vw, 580px);
  background: var(--bg-base);
  overflow: hidden;
  user-select: none;
}

.hero-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left top;
  opacity: 0.72;
  display: block;
}

/* Seamless Bottom Fade into Page Canvas */
.hero-banner-vignette-bottom {
  position: absolute;
  inset: 0;
  bottom: -2px;
  background: linear-gradient(
    0deg,
    var(--bg-base) 0%,
    var(--bg-base) 6%,
    rgba(13, 13, 13, 0.72) 28%,
    rgba(13, 13, 13, 0.18) 65%,
    rgba(13, 13, 13, 0.35) 100%
  );
}

/* Seamless Left Fade into Sidebar */
.hero-banner-vignette-left {
  position: absolute;
  inset: 0;
  left: -2px;
  background: linear-gradient(
    90deg,
    var(--bg-base) 0%,
    rgba(13, 13, 13, 0.78) 16%,
    rgba(13, 13, 13, 0.25) 42%,
    rgba(13, 13, 13, 0) 75%
  );
}

.hero-banner-content {
  position: absolute;
  left: 0;
  bottom: 118px;
  width: min(760px, 92%);
  padding: 0 32px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero-title {
  font-size: clamp(28px, 3.4vw, 46px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.12;
  color: #ffffff;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-airing-line {
  font-size: 16px;
  font-weight: 500;
  color: var(--rose);
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 36px;
  margin-top: 10px;
}

.btn-play-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 154px;
  height: 42px;
  border-radius: 8px;
  border: none;
  background: #f5f5f5;
  color: #0a0a0a;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
  transition: opacity 0.2s ease;
}
.btn-play-primary:hover {
  opacity: 0.82;
}

/* Stacked Icon + Label Action (Exact Screenshot 2 & 3 Details / List buttons) */
.hero-stacked-action {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: transparent;
  border: none;
  color: #f5f5f5;
  cursor: pointer;
  transition: opacity 0.15s ease;
}
.hero-stacked-action:hover {
  opacity: 0.78;
}
.hero-stacked-action span {
  font-size: 13px;
  font-weight: 500;
  color: #e5e5e5;
}

/* ============================================================================
   SPACIOUS SECTIONS, RAILS & CLEAN 11:16 POSTER CARDS
   ============================================================================ */

.page-container {
  padding: 20px 24px;
  width: 100%;
}

.page-container.has-top-offset {
  padding-top: calc(var(--topbar-h) + 28px);
}

.section-block {
  margin-bottom: 52px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 18px;
}

.section-header-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 28px;
}

.section-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: #ffffff;
}

.pill-tabs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.pill-tab {
  padding: 6px 14px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #a3a3a3;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.pill-tab:hover {
  background: #222222;
  color: #ffffff;
}
.pill-tab.is-active {
  background: #262626;
  color: #ffffff;
  font-weight: 600;
}
.pill-tab.is-today {
  color: var(--rose);
}

/* Poster Grid & Horizontal Rail (Spacious 11:16 Aspect Ratio) */
.poster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(176px, 1fr));
  gap: 28px 18px;
}

.poster-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 186px;
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 10px;
  scroll-snap-type: x proximity;
}

.anime-card {
  display: flex;
  flex-direction: column;
  position: relative;
  cursor: pointer;
  scroll-snap-align: start;
  contain: layout style;
}

.anime-card-cover-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 11 / 16;
  border-radius: 10px;
  overflow: hidden;
  background: #1c1c1c;
}

.anime-card-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.anime-card:hover .anime-card-cover {
  transform: scale(1.03);
}

/* Subtle Card Badges (Single-Line, Never Wrapping) */
.card-top-left-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(15, 15, 15, 0.82);
  backdrop-filter: blur(6px);
  color: #f5f5f5;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
  z-index: 2;
}
.card-top-left-badge.is-rank {
  background: #f5f5f5;
  color: #0a0a0a;
  font-weight: 700;
}

.card-top-right-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(15, 15, 15, 0.82);
  backdrop-filter: blur(6px);
  color: #fbbf24;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 7px;
  border-radius: 6px;
  white-space: nowrap;
  z-index: 2;
}

.card-bottom-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 24px 8px 8px;
  background: linear-gradient(0deg, rgba(10, 10, 10, 0.85) 0%, rgba(10, 10, 10, 0) 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  z-index: 2;
}

/* Clean Single-Word Status Badge ("Watching", "Completed", "On Hold", etc.) */
.card-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
  background: rgba(18, 18, 18, 0.88);
  backdrop-filter: blur(6px);
  color: #e5e5e5;
}
.card-status-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #a3a3a3;
}
.card-status-pill.st-watching::before { background: #38bdf8; }
.card-status-pill.st-completed::before { background: #10b981; }
.card-status-pill.st-planned::before { background: #a855f7; }
.card-status-pill.st-on-hold::before { background: #f59e0b; }
.card-status-pill.st-dropped::before { background: #ef4444; }

.card-quick-btns {
  display: flex;
  align-items: center;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.anime-card:hover .card-quick-btns {
  opacity: 1;
}

.card-mini-btn {
  height: 24px;
  padding: 0 7px;
  border-radius: 5px;
  border: none;
  background: rgba(20, 20, 20, 0.9);
  color: #f5f5f5;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.card-mini-btn:hover {
  background: #f5f5f5;
  color: #0a0a0a;
}
.card-mini-btn.is-fav {
  color: var(--rose);
}

.anime-card-title {
  margin-top: 10px;
  padding: 0 2px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  color: #f3f4f6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.anime-card-sub {
  margin-top: 3px;
  padding: 0 2px;
  font-size: 12px;
  color: #8a8a8a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============================================================================
   SKELETON LOADING TILES
   ============================================================================ */

@keyframes pulseNeutral {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.skeleton-pulse {
  animation: pulseNeutral 1.6s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.skeleton-card {
  display: flex;
  flex-direction: column;
}
.skeleton-poster {
  width: 100%;
  aspect-ratio: 11 / 16;
  border-radius: 10px;
  background: #222222;
}
.skeleton-line-lg {
  height: 18px;
  width: 82%;
  margin-top: 10px;
  border-radius: 6px;
  background: #222222;
}
.skeleton-line-sm {
  height: 13px;
  width: 50%;
  margin-top: 6px;
  border-radius: 5px;
  background: #1c1c1c;
}

/* ============================================================================
   ANIME DETAILS PAGE (SEAMLESS FADE, NO BOXY BORDERS)
   ============================================================================ */

.details-banner-wrap {
  position: relative;
  width: 100%;
  height: clamp(280px, 34vw, 420px);
  background: var(--bg-base);
  overflow: hidden;
}
.details-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
}
.details-banner-fade {
  position: absolute;
  inset: 0;
  bottom: -2px;
  left: -2px;
  background:
    linear-gradient(
      90deg,
      var(--bg-base) 0%,
      rgba(13, 13, 13, 0.65) 14%,
      rgba(13, 13, 13, 0) 45%
    ),
    linear-gradient(
      180deg,
      rgba(13, 13, 13, 0.5) 0%,
      rgba(13, 13, 13, 0.1) 30%,
      rgba(13, 13, 13, 0.55) 65%,
      rgba(13, 13, 13, 0.94) 88%,
      var(--bg-base) 97%,
      var(--bg-base) 100%
    );
}

.details-container {
  max-width: 1380px;
  margin: 0 auto;
  padding: 0 32px 64px;
  position: relative;
  z-index: 4;
}

.details-header-grid {
  display: grid;
  grid-template-columns: 204px 1fr;
  gap: 32px;
  margin-top: -136px;
  align-items: end;
}

.details-poster-box {
  width: 204px;
  aspect-ratio: 11 / 16;
  border-radius: 10px;
  overflow: hidden;
  background: #1a1a1a;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.6);
}
.details-poster-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.details-title-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 4px;
}

.details-title-main {
  font-size: clamp(24px, 2.8vw, 38px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: #fff;
}

.details-title-sub {
  font-size: 14px;
  color: var(--text-secondary);
}

.details-meta-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.meta-chip {
  background: #1c1c1c;
  padding: 4px 11px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #e5e5e5;
}
.meta-chip.is-gold {
  color: #fbbf24;
}
.meta-chip.is-airing {
  color: var(--rose);
}

/* Friends Activity Strip on Anime Details Page */
.details-friends-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.friend-detail-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 11px 4px 5px;
  background: rgba(24, 24, 24, 0.85);
  border-radius: 99px;
  font-size: 12px;
  line-height: 1;
}

.friend-detail-avatar {
  width: 21px;
  height: 21px;
  border-radius: 50%;
  object-fit: cover;
  background: #222;
  flex-shrink: 0;
}

.friend-detail-name {
  font-weight: 600;
  color: #f3f4f6;
}

.friend-detail-sep {
  color: #52525b;
}

.friend-detail-status {
  color: #9ca3af;
  font-weight: 500;
}

.friend-detail-pill.is-watching .friend-detail-status {
  color: var(--sky);
}

.friend-detail-pill.is-completed .friend-detail-status {
  color: var(--emerald);
}

/* Personal Tracker Controls Bar on Details Page (Borderless Surface) */
.details-tracker-bar {
  margin-top: 26px;
  padding: 14px 20px;
  background: #151515;
  border-radius: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.tracker-control-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tracker-label {
  font-size: 12px;
  font-weight: 500;
  color: #8a8a8a;
}

.tracker-select, .tracker-input {
  height: 36px;
  background: #222222;
  border: none;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  outline: none;
}

.tracker-select {
  appearance: none;
  -webkit-appearance: none;
  padding: 0 30px 0 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a8a8a' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  cursor: pointer;
  transition: background-color 0.14s ease;
}
.tracker-select:hover {
  background-color: #2a2a2a;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  border: none;
  background: #222222;
  color: #f5f5f5;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.14s ease;
}
.btn-secondary:hover {
  background: #2e2e2e;
}
.btn-secondary.is-sm {
  height: 32px;
  padding: 0 12px;
  font-size: 12.5px;
}
.btn-secondary.is-fav-active {
  background: rgba(244, 63, 94, 0.18);
  color: var(--rose);
}

/* Underline Tabs */
.underline-tabs {
  display: flex;
  align-items: center;
  gap: 28px;
  border-bottom: 1px solid #1f1f1f;
  margin: 30px 0 28px;
  overflow-x: auto;
}

.underline-tab {
  padding: 10px 2px 12px;
  border: none;
  background: transparent;
  color: #8a8a8a;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.underline-tab:hover {
  color: #fff;
}
.underline-tab.is-active {
  color: #fff;
  border-bottom-color: #fff;
}

/* Score Distribution Bars (Stats.svelte style) */
.stats-score-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px 24px;
  margin-top: 14px;
}

.score-dist-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.score-dist-head {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #d4d4d4;
}
.score-dist-track {
  width: 100%;
  height: 12px;
  background: #222;
  border-radius: 6px;
  overflow: hidden;
}
.score-dist-fill {
  height: 100%;
  background: #eab308;
  border-radius: 6px;
}

/* Characters Circle / Cards */
.char-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 14px;
}

.char-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  background: #151515;
  border-radius: 10px;
  padding: 10px 14px;
  gap: 14px;
  overflow: hidden;
}
.char-side {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  overflow: hidden;
}
.char-side.is-right {
  text-align: right;
  flex-direction: row-reverse;
  justify-self: end;
  width: 100%;
}
.char-text {
  min-width: 0;
  flex: 1;
  overflow: hidden;
}
.char-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  background: #242424;
  flex-shrink: 0;
}
.char-name {
  font-size: 13px;
  font-weight: 600;
  color: #f3f4f6;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  white-space: normal;
  overflow: hidden;
  word-break: break-word;
}
.char-role {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Info Facts (Info.svelte style — clean inline flow without boxy cards) */
.info-facts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  background: #151515;
  border-radius: 12px;
  padding: 18px 20px;
}
.info-fact-label {
  font-size: 12px;
  color: #8a8a8a;
}
.info-fact-val {
  font-size: 14px;
  font-weight: 600;
  color: #f3f4f6;
  margin-top: 2px;
}

/* ============================================================================
   NEWS / OFFICIAL TWITTER TIMELINE CARDS
   ============================================================================ */

.news-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 28px;
  align-items: start;
}

.news-sidebar-card {
  background: transparent;
  padding: 0;
  position: sticky;
  top: calc(var(--topbar-h) + 20px);
}

.news-sidebar-heading {
  font-weight: 700;
  font-size: 11.5px;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
  padding: 0 8px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.news-tracked-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: calc(100vh - 150px);
  overflow-y: auto;
  scrollbar-width: none;
}
.news-tracked-list::-webkit-scrollbar {
  display: none;
}

.news-empty-state {
  padding: 28px;
  background: #141414;
  border-radius: 12px;
  color: var(--text-secondary);
  font-size: 13.5px;
}

.tweet-feed-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 680px;
}

.tweet-card {
  background: #141414;
  border-radius: 12px;
  padding: 18px 20px;
}

.tweet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.tweet-author {
  display: flex;
  align-items: center;
  gap: 10px;
}
.tweet-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  background: #222;
}
.tweet-inline-translate {
  background: none;
  border: none;
  padding: 0;
  color: var(--text-secondary);
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s ease;
}
.tweet-inline-translate:hover {
  color: #fff;
  text-decoration: underline;
}
.tweet-body {
  font-size: 14px;
  line-height: 1.58;
  white-space: pre-wrap;
  color: #e5e7eb;
  margin-bottom: 12px;
}
.tweet-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}
.tweet-stats {
  display: flex;
  gap: 18px;
}
.tweet-ext-link {
  color: var(--text-muted);
  transition: color 0.15s ease;
}
.tweet-ext-link:hover {
  color: #e5e7eb;
}

.tweet-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 10px;
}
.tweet-media-grid img {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  border-radius: 8px;
}

.tweet-video-slot {
  width: 100%;
  margin-bottom: 10px;
}

.tweet-video-facade {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: none;
  border-radius: 10px;
  overflow: hidden;
  background: #0a0a0a;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.tweet-video-facade img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.tweet-video-facade:hover img {
  opacity: 1;
  transform: scale(1.015);
}
.tweet-video-play-btn {
  position: relative;
  z-index: 2;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(15, 15, 15, 0.85);
  color: #fff;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 3px;
  backdrop-filter: blur(6px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  transition: transform 0.15s ease, background 0.15s ease;
}
.tweet-video-facade:hover .tweet-video-play-btn {
  transform: scale(1.08);
  background: rgba(255, 255, 255, 0.95);
  color: #000;
}

.tweet-video-frame {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 440px;
  border: none;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
  object-fit: contain;
  outline: none;
}

/* ============================================================================
   MODALS & TOASTS
   ============================================================================ */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.84);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 120;
  padding: 20px;
}

.trailer-modal-card {
  width: min(1040px, 96vw);
  background: #141414;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.85);
  transition:
    width 280ms cubic-bezier(0.22, 1, 0.36, 1),
    left 320ms cubic-bezier(0.22, 1, 0.36, 1),
    top 320ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 220ms cubic-bezier(0.22, 1, 0.36, 1),
    border-radius 220ms ease,
    box-shadow 220ms ease;
}

.trailer-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 18px;
}
.trailer-modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}
.trailer-modal-title-wrap h3 {
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.trailer-modal-tag {
  font-size: 10px;
  font-weight: 800;
  background: var(--accent);
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}
.trailer-modal-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Uncropped 16:9 Trailer Player */
.trailer-modal-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}
.trailer-modal-player iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Minimized Corner Mini-Player (PiP) */
#trailer-modal-backdrop {
  transition: background 220ms ease, backdrop-filter 220ms ease;
}
#trailer-modal-backdrop.is-pip {
  background: transparent;
  backdrop-filter: none;
  pointer-events: none;
  padding: 0;
}
#trailer-modal-backdrop.is-pip .trailer-modal-card {
  pointer-events: auto;
  position: fixed;
  width: min(380px, calc(100vw - 32px));
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.88);
  z-index: 140;
}
#trailer-modal-backdrop.is-pip .trailer-modal-header {
  padding: 8px 10px;
  cursor: grab;
  user-select: none;
  touch-action: none;
}
#trailer-modal-backdrop.is-pip .trailer-modal-tag {
  display: none;
}
#trailer-modal-backdrop.is-pip .trailer-modal-title-wrap h3 {
  font-size: 12.5px;
  font-weight: 600;
}
#trailer-modal-backdrop.is-pip .trailer-modal-card.is-dragging {
  transition: none !important;
  cursor: grabbing;
  transform: scale(1.02);
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.94), 0 0 0 1px rgba(255, 255, 255, 0.24);
}
#trailer-modal-backdrop.is-pip .trailer-modal-card.is-dragging .trailer-modal-header {
  cursor: grabbing;
}
#trailer-modal-backdrop.is-pip .trailer-modal-card.is-dragging .trailer-modal-player iframe {
  pointer-events: none;
}
.trailer-pip-snap-preview {
  position: fixed;
  border-radius: 12px;
  border: 2px dashed rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.04);
  pointer-events: none;
  z-index: 135;
  transition: left 180ms cubic-bezier(0.22, 1, 0.36, 1), top 180ms cubic-bezier(0.22, 1, 0.36, 1), opacity 160ms ease;
}

.dialog-modal-card {
  width: min(480px, 95vw);
  background: #181818;
  border-radius: 14px;
  padding: 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85);
}

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 200;
}
.toast-item {
  background: #222222;
  color: #fff;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.75);
}

/* ============================================================================
   RESPONSIVE MOBILE / TABLET (< 1024px)
   ============================================================================ */

@media (max-width: 1023px) {
  .desktop-only {
    display: none !important;
  }
  .main-content {
    margin-left: 0 !important;
    padding-bottom: 76px;
  }
  .top-navbar-left,
  body.sidebar-collapsed .top-navbar-left {
    width: auto;
  }
  .side-navbar,
  body.sidebar-collapsed .side-navbar {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 60px;
    background: rgba(16, 16, 16, 0.98);
    backdrop-filter: blur(12px);
    transform: none !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }
  .side-navbar-inner {
    padding: 4px 8px;
    overflow: hidden;
  }
  .nav-list {
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    height: 100%;
  }
  .nav-link {
    flex-direction: column;
    gap: 3px;
    padding: 6px 10px;
    font-size: 11px;
  }
  .details-header-grid {
    grid-template-columns: 120px 1fr;
    gap: 16px;
    margin-top: -60px;
  }
  .details-poster-box {
    width: 120px;
  }
  .news-layout {
    grid-template-columns: 1fr;
  }
  .top-search-wrap {
    width: 48vw;
  }
}

/* ============================================================================
   INTERACTIVE 2D TIMELINE WORKSPACE (SCALE CANVAS + DENSITY MINIMAP + HISTORY)
   ============================================================================ */

.tl-workspace {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tl-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #141414;
  padding: 10px 14px;
  border-radius: 12px;
}

.tl-toolbar-left,
.tl-toolbar-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.tl-toolbar-stat {
  font-size: 12px;
  font-weight: 500;
  color: #8a8a8a;
  padding: 0 4px;
}

.tl-control-pill {
  display: inline-flex;
  align-items: center;
  background: #1c1c1c;
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}

.tl-step-btn {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #d4d4d4;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s ease, color 0.12s ease;
}
.tl-step-btn:hover {
  background: #2a2a2a;
  color: #fff;
}

.tl-scale-readout {
  font-size: 11.5px;
  font-weight: 600;
  color: #a3a3a3;
  min-width: 58px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.tl-viewport {
  position: relative;
  width: 100%;
  height: clamp(480px, 64vh, 660px);
  background-color: #111111;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size: 22px 22px;
  border-radius: 14px;
  overflow: hidden;
  cursor: grab;
  user-select: none;
  touch-action: none;
}
.tl-viewport.is-dragging,
.tl-viewport:active {
  cursor: grabbing;
}

.tl-scene {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  will-change: transform;
}

.tl-axis {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.16);
  pointer-events: none;
  z-index: 1;
}

.tl-tick {
  position: absolute;
  width: 1px;
  height: 14px;
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-6px);
  pointer-events: none;
  z-index: 1;
}

.tl-tick-label {
  position: absolute;
  top: 18px;
  left: 0;
  transform: translateX(-50%);
  font-size: 10.5px;
  font-weight: 600;
  color: #787878;
  white-space: nowrap;
  background: rgba(17, 17, 17, 0.85);
  padding: 1px 5px;
  border-radius: 4px;
}

.tl-day-dot {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #e5e5e5;
  border: 2px solid #111111;
  transform: translate(-50%, -42%);
  pointer-events: none;
  z-index: 3;
}

.tl-stem {
  position: absolute;
  width: 1.5px;
  background: rgba(255, 255, 255, 0.16);
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 1;
}

.tl-node-card {
  position: absolute;
  width: 120px;
  height: 180px;
  border-radius: 10px;
  overflow: hidden;
  background: #1a1a1a;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.55);
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
  z-index: 4;
  display: block;
}
.tl-node-card:hover {
  transform: translateY(-3px) scale(1.035);
  z-index: 12;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.8);
}
.tl-node-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  z-index: 1;
}

.tl-node-score {
  position: absolute;
  top: 6px;
  right: 6px;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(12, 12, 12, 0.84);
  backdrop-filter: blur(4px);
  color: #fbbf24;
  font-size: 10px;
  font-weight: 700;
  z-index: 2;
}

.tl-node-shade {
  position: absolute;
  inset: auto 0 0 0;
  padding: 28px 8px 7px;
  background: linear-gradient(0deg, rgba(8, 8, 8, 0.95) 0%, rgba(8, 8, 8, 0.55) 55%, rgba(8, 8, 8, 0) 100%);
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 2;
}

.tl-node-title {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  color: #f3f4f6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tl-node-date {
  font-size: 9.5px;
  font-weight: 600;
  color: #9ca3af;
}

/* Density Overview Minimap Scrubber */
.tl-overview-bar {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) max-content;
  align-items: center;
  gap: 12px;
  background: #141414;
  padding: 8px 14px;
  border-radius: 12px;
  user-select: none;
}

.tl-overview-edge {
  font-size: 11px;
  font-weight: 600;
  color: #8a8a8a;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.tl-overview-track {
  position: relative;
  height: 34px;
  background: #1b1b1b;
  border-radius: 9px;
  overflow: hidden;
  cursor: pointer;
}

.tl-density-svg {
  display: block;
  width: 100%;
  height: 34px;
}

.tl-overview-window {
  position: absolute;
  top: 3px;
  bottom: 3px;
  min-width: 3%;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.12);
  pointer-events: none;
}
.tl-overview-window::before,
.tl-overview-window::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 3px;
  height: 14px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.65);
  transform: translateY(-50%);
}
.tl-overview-window::before { left: 3px; }
.tl-overview-window::after { right: 3px; }

/* Undated Dimension Rail */
.tl-undated-section {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  background: #141414;
  border-radius: 12px;
  padding: 12px 16px;
}

.tl-undated-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tl-undated-title {
  font-size: 13px;
  font-weight: 700;
  color: #f3f4f6;
}

.tl-undated-sub {
  font-size: 11.5px;
  color: #8a8a8a;
  line-height: 1.35;
}

.tl-undated-rail {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 2px 0 4px;
}

.tl-undated-card {
  position: relative;
  width: 76px;
  height: 114px;
  flex: 0 0 76px;
  border-radius: 8px;
  overflow: hidden;
  background: #1d1d1d;
  display: block;
  transition: transform 0.14s ease;
}
.tl-undated-card:hover {
  transform: translateY(-2px);
}
.tl-undated-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* History Mode (Year -> Month Left-Border Timeline) */
.tl-history-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 6px 0 36px;
}

.tl-history-year {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tl-history-year-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.tl-history-year-title {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.tl-history-month {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 18px;
  padding-left: 12px;
  border-left: 2px solid #262626;
}

.tl-history-month-head {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-top: 4px;
}

.tl-history-month-name {
  font-size: 14px;
  font-weight: 700;
  color: #e5e5e5;
}

.tl-history-month-count {
  font-size: 11.5px;
  color: #8a8a8a;
}

.tl-history-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(124px, 124px));
  gap: 16px 14px;
}

.tl-history-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 124px;
}

.tl-history-item .tl-node-card {
  position: relative;
  width: 124px;
  height: 184px;
}

.tl-history-day {
  font-size: 11px;
  font-weight: 600;
  color: #8a8a8a;
  text-align: center;
}

/* ============================================================================
   TIERED SCORE DASHBOARD (DRAG & DROP LANES + BATCH MOVE + ZOOM SLIDER)
   ============================================================================ */

.sd-shell {
  --sd-poster-w: 84px;
  --sd-poster-h: 126px;
  --sd-poster-gap: 8px;
  --sd-lane-pad: 8px;
  --sd-lane-min-h: 142px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sd-controls-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #141414;
  padding: 10px 14px;
  border-radius: 12px;
}

.sd-controls-left,
.sd-controls-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.sd-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 12px;
  border: none;
  border-radius: 8px;
  background: #1e1e1e;
  color: #b3b3b3;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease;
}
.sd-tool-btn:hover {
  background: #282828;
  color: #fff;
}
.sd-tool-btn.is-active {
  background: #f5f5f5;
  color: #0a0a0a;
}

.sd-tool-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 19px;
  padding: 0 5px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.sd-tool-btn.is-active .sd-tool-badge {
  background: rgba(0, 0, 0, 0.14);
  color: #0a0a0a;
}

.sd-zoom-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  background: #1e1e1e;
  color: #a3a3a3;
  font-size: 12px;
  font-weight: 600;
}

.sd-zoom-slider {
  width: 110px;
  accent-color: #f5f5f5;
  cursor: pointer;
}

.sd-zoom-val {
  min-width: 36px;
  text-align: right;
  color: #e5e5e5;
  font-variant-numeric: tabular-nums;
}

/* Batch Selection Action Bar */
.sd-batch-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #1a1a1a;
  padding: 10px 14px;
  border-radius: 12px;
}

.sd-batch-left,
.sd-batch-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.sd-batch-count {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  min-width: 84px;
}

/* Score Tier Board */
.sd-board {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sd-lane {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  min-height: var(--sd-lane-min-h);
  background: #131313;
  border-radius: 10px;
  overflow: hidden;
  content-visibility: auto;
  contain-intrinsic-size: 1px 145px;
  transition: background 0.14s ease, box-shadow 0.14s ease;
}

.sd-lane-more-btn {
  width: var(--sd-poster-w);
  height: var(--sd-poster-h);
  border-radius: 6px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6px;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}
.sd-lane-more-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}
.comments-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.comments-composer {
  background: #141414;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.comments-textarea {
  width: 100%;
  min-height: 74px;
  resize: vertical;
  background: #0d0d0d;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 10px 12px;
  color: #f3f4f6;
  font-size: 13.5px;
  font-family: inherit;
  line-height: 1.45;
  outline: none;
}
.comments-textarea:focus {
  border-color: rgba(255, 255, 255, 0.25);
}
.comments-composer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.comments-spoiler-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}
.comments-login-bar {
  background: #141414;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--text-secondary);
}
.comments-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.comment-card {
  background: #141414;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  gap: 11px;
}
.comment-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: #202020;
}
.comment-main {
  min-width: 0;
  flex: 1;
}
.comment-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.comment-author {
  font-size: 13px;
  font-weight: 600;
  color: #f3f4f6;
}
.comment-author:hover {
  text-decoration: underline;
}
.comment-time {
  font-size: 11.5px;
  color: #787878;
}
.comment-delete-btn {
  background: transparent;
  border: 0;
  color: #787878;
  font-size: 11.5px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
}
.comment-delete-btn:hover {
  color: #f87171;
  background: rgba(248, 113, 113, 0.08);
}
.comment-body {
  font-size: 13.5px;
  line-height: 1.5;
  color: #d4d4d8;
  white-space: pre-wrap;
  word-break: break-word;
}
.comment-body.is-spoiler-hidden {
  filter: blur(5px);
  cursor: pointer;
  user-select: none;
  transition: filter 0.16s ease;
}
.comment-spoiler-tag {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 600;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.12);
  padding: 1px 6px;
  border-radius: 4px;
  margin-right: 6px;
}

  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

.sd-lane.is-drop-target {
  background: #1b222a;
  box-shadow: inset 0 0 0 2px var(--sky);
}

.sd-lane-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 8px 4px;
  background: color-mix(in srgb, var(--lane-color, #525252) 14%, #141414);
  user-select: none;
  text-align: center;
}

.sd-lane-score {
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  color: var(--lane-color, #a3a3a3);
  font-variant-numeric: tabular-nums;
}

.sd-lane-count {
  font-size: 10.5px;
  font-weight: 600;
  color: #8a8a8a;
}

.sd-lane-posters {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  align-items: flex-start;
  gap: var(--sd-poster-gap);
  padding: var(--sd-lane-pad) 12px;
  min-width: 0;
  background: color-mix(in srgb, var(--lane-color, #141414) 4%, #131313);
}

.sd-lane-empty {
  align-self: center;
  font-size: 12px;
  color: #525252;
  padding: 8px 4px;
}

.sd-poster {
  position: relative;
  flex: 0 0 var(--sd-poster-w);
  width: var(--sd-poster-w);
  height: var(--sd-poster-h);
  border-radius: 6px;
  overflow: hidden;
  background: #1e1e1e;
  cursor: grab;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
  display: block;
}
.sd-poster:active {
  cursor: grabbing;
}
.sd-poster:hover {
  z-index: 4;
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.65);
}
.sd-poster.is-dragging {
  opacity: 0.38;
}
.sd-poster.is-selected {
  box-shadow: 0 0 0 2.5px #f5f5f5, 0 8px 20px rgba(0, 0, 0, 0.65);
  transform: scale(0.96);
}

.sd-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.sd-poster-title {
  position: absolute;
  inset: auto 0 0 0;
  padding: 20px 5px 4px;
  background: linear-gradient(0deg, rgba(8, 8, 8, 0.94) 0%, rgba(8, 8, 8, 0) 100%);
  font-size: 10.5px;
  font-weight: 600;
  color: #f3f4f6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  transition: opacity 0.14s ease;
  pointer-events: none;
}
.sd-poster:hover .sd-poster-title {
  opacity: 1;
}

.sd-poster-check {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(12, 12, 12, 0.78);
  border: 1.5px solid rgba(255, 255, 255, 0.6);
  color: #0a0a0a;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
}
.sd-poster.is-selected .sd-poster-check {
  background: #f5f5f5;
  border-color: #f5f5f5;
}

@media (max-width: 768px) {
  .tl-undated-section {
    grid-template-columns: 1fr;
  }
  .tl-history-month {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .sd-lane {
    grid-template-columns: 56px minmax(0, 1fr);
  }
}
