:root {
  --bg-dark: #111113;
  --bg-card: #18181c;
  --bg-elevated: #202026;
  --text-main: #f2f2f3;
  --text-muted: #9a9aa6;
  --accent-red: #d9232e;
  --accent-red-hover: #b81b25;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --radius-sm: 4px;
  --radius-md: 6px;
}

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

html, body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* LITE MODE */
body.lite-mode * {
  transition: none !important;
  animation: none !important;
  backdrop-filter: none !important;
  box-shadow: none !important;
}

body.lite-mode .media-card:hover {
  transform: none !important;
}

.hidden {
  display: none !important;
}

code {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.85em;
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 5px;
  border-radius: 3px;
  color: #e4e4e7;
}

/* NAVBAR */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 58px;
  padding: 0 3.5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 100;
  background: rgba(17, 17, 19, 0.94);
  border-bottom: 1px solid var(--border-subtle);
  backdrop-filter: blur(8px);
}

.navbar.scrolled {
  background: #111113;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo-text {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-main);
  cursor: pointer;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.logo-text::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-red);
}

.nav-links {
  display: flex;
  gap: 16px;
  list-style: none;
}

.nav-links li {
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 500;
  transition: color 0.15s;
}

.nav-links li:hover,
.nav-links li.active {
  color: var(--text-main);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 5px 10px;
  gap: 7px;
}

.search-box:focus-within {
  border-color: var(--border-strong);
}

.search-box input {
  background: transparent;
  border: none;
  color: var(--text-main);
  outline: none;
  font-size: 0.84rem;
  width: 155px;
}

.nav-pill {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.nav-pill:hover {
  background: var(--bg-card);
  color: var(--text-main);
  border-color: var(--border-strong);
}

.nav-pill.party-pill {
  background: var(--bg-card);
  color: var(--text-main);
  border-color: var(--border-strong);
}

.nav-pill.party-pill:hover {
  border-color: var(--accent-red);
  background: rgba(217, 35, 46, 0.14);
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #6e6e7a;
  display: inline-block;
}

.live-dot.online {
  background: #48bb78;
}

.profile-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
}

.profile-chip:hover {
  border-color: var(--border-strong);
}

.chip-avatar {
  width: 24px;
  height: 24px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.76rem;
  font-weight: 600;
  background: var(--bg-elevated);
  color: var(--text-main);
}

/* HERO BANNER */
.hero-banner {
  position: relative;
  min-height: 410px;
  padding: 96px 3.5% 40px;
  display: flex;
  align-items: flex-end;
  background: #16161a;
  border-bottom: 1px solid var(--border-subtle);
}

.hero-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    var(--bg-dark) 4%,
    rgba(17, 17, 19, 0.45) 55%,
    rgba(17, 17, 19, 0.78) 100%
  );
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 620px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-red);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 3px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.hero-title {
  font-size: 2.3rem;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.hero-meta .match {
  color: #68d391;
  font-weight: 600;
}

.hero-meta .pill {
  border: 1px solid var(--border-strong);
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 0.72rem;
  color: var(--text-main);
}

.hero-desc {
  font-size: 0.94rem;
  line-height: 1.55;
  color: #d4d4d8;
  margin-bottom: 18px;
}

.hero-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-primary {
  background: var(--text-main);
  color: #111113;
  border: 1px solid transparent;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s;
}

.btn-primary:hover {
  background: #dcdce0;
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s, border-color 0.15s;
}

.btn-secondary:hover {
  background: #2b2b33;
  border-color: var(--border-strong);
}

/* CATALOG CAROUSEL ROWS */
.catalog-container {
  position: relative;
  z-index: 5;
  padding: 24px 3.5% 60px;
}

.catalog-row {
  margin-bottom: 28px;
}

.row-title {
  font-size: 1.04rem;
  font-weight: 600;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.row-scroller {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 10px;
  scrollbar-width: thin;
  scrollbar-color: #333 transparent;
}

.media-card {
  flex: 0 0 230px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--border-subtle);
  transition: transform 0.15s ease, border-color 0.15s ease;
  position: relative;
}

.media-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
}

.card-art {
  height: 126px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border-subtle);
}

.card-art-title {
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.25;
  z-index: 2;
  color: var(--text-main);
}

.card-badge {
  align-self: flex-start;
  background: rgba(17, 17, 19, 0.78);
  color: #d4d4d8;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border: 1px solid var(--border-subtle);
}

.card-play-icon {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(17, 17, 19, 0.85);
  color: var(--text-main);
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
}

.card-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.15);
}

.card-progress-fill {
  height: 100%;
  background: var(--accent-red);
}

.card-body {
  padding: 10px 12px;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.card-desc {
  font-size: 0.76rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.35;
}

/* LOGIN & PROFILE GATES */
.gate-screen {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: var(--bg-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-box {
  width: 100%;
  max-width: 390px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 28px;
}

.auth-box h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.auth-sub {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-bottom: 18px;
}

.form-group {
  margin-bottom: 12px;
}

.form-group label {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 8px 11px;
  background: var(--bg-dark);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.88rem;
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--text-muted);
}

.auth-error {
  color: #f56565;
  font-size: 0.82rem;
  margin-top: 8px;
  min-height: 18px;
}

.auth-switch {
  margin-top: 14px;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
}

.auth-switch a {
  color: var(--text-main);
  cursor: pointer;
  text-decoration: underline;
}

.gate-title {
  font-size: 1.65rem;
  font-weight: 600;
  margin-bottom: 24px;
}

.profiles-grid {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 28px;
}

.profile-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.profile-avatar {
  width: 108px;
  height: 108px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.9rem;
  font-weight: 600;
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  color: var(--text-main);
  transition: transform 0.15s, border-color 0.15s;
}

.profile-card:hover .profile-avatar {
  transform: translateY(-2px);
  border-color: var(--text-main);
}

.profile-name {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

.profile-card:hover .profile-name {
  color: var(--text-main);
}

/* VIDEO PLAYER OVERLAY */
.player-overlay {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: #000;
  display: flex;
  flex-direction: column;
}

.player-topbar {
  height: 54px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #111113;
  border-bottom: 1px solid var(--border-subtle);
  z-index: 10;
}

.player-controls-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.player-controls-right select {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-strong);
  padding: 4px 9px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
}

.player-stage {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #000;
}

.player-stage video {
  width: 100%;
  height: 100%;
  max-height: calc(100vh - 54px);
  background: #000;
}

.player-sidebar {
  width: 300px;
  height: 100%;
  background: var(--bg-card);
  border-left: 1px solid var(--border-subtle);
  overflow-y: auto;
  padding: 14px;
}

/* MODALS */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0, 0, 0, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}

.modal-card {
  width: 100%;
  max-width: 860px;
  max-height: 90vh;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  overflow-y: auto;
}

.modal-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: var(--bg-card);
  z-index: 5;
}

.modal-close {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 1.1rem;
}

.modal-close:hover {
  color: var(--text-main);
  border-color: var(--border-strong);
}

.modal-body {
  padding: 20px 22px;
}

.tabs-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 10px;
  flex-wrap: wrap;
}

.tab-btn {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 500;
}

.tab-btn.active {
  background: var(--bg-elevated);
  border-color: var(--border-strong);
  color: var(--text-main);
}

.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.stat-card {
  background: #141417;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.stat-card .stat-val {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-main);
}

.stat-card .stat-lbl {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  margin-bottom: 14px;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-subtle);
}

.data-table th {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.75rem;
}

.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 3px;
  font-size: 0.74rem;
  font-weight: 500;
}

.role-badge.ripper {
  background: rgba(217, 35, 46, 0.15);
  color: #feb2b2;
  border: 1px solid rgba(217, 35, 46, 0.35);
}

.role-badge.viewer {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

.episode-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.episode-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: #141417;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.episode-item:hover {
  border-color: var(--border-strong);
}

.episode-item .ep-num {
  font-weight: 600;
  color: var(--text-muted);
  margin-right: 12px;
  font-size: 0.82rem;
}

.log-box {
  background: #0e0e10;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 0.78rem;
  color: #a3e635;
  max-height: 150px;
  overflow-y: auto;
  white-space: pre-wrap;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 768px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .hero-title {
    font-size: 1.75rem;
  }
  .nav-links {
    display: none;
  }
}

/* WATCH PARTY SIDEBAR & FLOATING REACTIONS */
.player-wp-sidebar {
  width: 310px;
  height: 100%;
  background: var(--bg-card);
  border-left: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  z-index: 15;
}

.wp-sidebar-header {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.wp-sync-status {
  padding: 7px 14px;
  font-size: 0.76rem;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
}

.wp-members-box {
  padding: 8px 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.wp-members-list {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.wp-member-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 3px;
  font-size: 0.74rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
}

.wp-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 0.82rem;
}

.wp-msg-item {
  line-height: 1.38;
  word-break: break-word;
}

.wp-msg-system {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.wp-emoji-bar {
  display: flex;
  justify-content: space-around;
  padding: 6px 10px;
  border-top: 1px solid var(--border-subtle);
}

.wp-emoji-btn {
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 1.05rem;
  padding: 3px 7px;
  cursor: pointer;
}

.wp-emoji-btn:hover {
  background: var(--bg-elevated);
}

.wp-chat-form {
  display: flex;
  gap: 6px;
  padding: 10px 12px;
  border-top: 1px solid var(--border-subtle);
}

.wp-chat-form input {
  flex: 1;
  background: var(--bg-dark);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  color: var(--text-main);
  font-size: 0.82rem;
  outline: none;
}

.player-emoji-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 20;
}

.floating-emoji {
  position: absolute;
  bottom: 68px;
  font-size: 2rem;
  animation: floatUpEmoji 2.2s ease-out forwards;
}

@keyframes floatUpEmoji {
  0% {
    transform: translateY(0) scale(0.85);
    opacity: 1;
  }
  100% {
    transform: translateY(-180px) scale(1.15);
    opacity: 0;
  }
}

.wp-room-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--bg-dark);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}

/* PUBLIC TAGGING BAR & TAG CHIPS */
.public-tags-bar {
  padding: 14px 3.5% 0;
  position: relative;
  z-index: 6;
}

.public-tags-bar-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(24, 24, 28, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 8px 12px;
}

.public-tags-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.public-tags-scroller {
  display: flex;
  align-items: center;
  gap: 7px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.public-tags-scroller::-webkit-scrollbar {
  display: none;
}

.tag-filter-pill {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: #d4d4d8;
  font-size: 0.76rem;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.tag-filter-pill:hover {
  border-color: var(--border-strong);
  color: #fff;
}

.tag-filter-pill.active {
  background: var(--accent-red);
  border-color: var(--accent-red);
  color: #fff;
  font-weight: 600;
}

.tag-filter-count {
  font-size: 0.68rem;
  opacity: 0.82;
  background: rgba(0, 0, 0, 0.28);
  padding: 0 5px;
  border-radius: 999px;
}

/* CARD TAG PILLS */
.card-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.card-tag-pill {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  font-size: 0.68rem;
  font-weight: 500;
  padding: 1px 7px;
  border-radius: 999px;
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* INFO MODAL PUBLIC TAGS & POSTER PREVIEW */
.info-poster-preview {
  width: 120px;
  height: 168px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  background: #141417;
  flex-shrink: 0;
}

.info-poster-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.info-tags-section {
  background: #141417;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 12px 14px;
  margin-bottom: 18px;
}

.info-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 10px;
}

.info-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  color: #e4e4e7;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s, border-color 0.15s;
}

.info-tag-chip:hover {
  border-color: #79c0ff;
}

.info-tag-chip.my-tag {
  background: rgba(56, 139, 253, 0.18);
  border-color: rgba(121, 192, 255, 0.55);
  color: #fff;
}

.info-tag-chip .tag-count {
  font-size: 0.7rem;
  color: #9a9aa6;
  background: rgba(0, 0, 0, 0.3);
  padding: 0 6px;
  border-radius: 999px;
}

.info-tag-chip .tag-remove {
  color: #ff8080;
  font-weight: 700;
  font-size: 0.85rem;
  line-height: 1;
  padding-left: 2px;
  opacity: 0.8;
}

.info-tag-chip .tag-remove:hover {
  opacity: 1;
  color: #ff4d4d;
}

.info-tags-add-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.info-tags-add-row input {
  flex: 1;
  padding: 7px 11px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: #111113;
  color: #fff;
  font-size: 0.82rem;
}

.pc-node-badge{font-size:12px;padding:3px 9px;border-radius:12px;margin-right:10px;font-weight:600}
.pc-node-badge.on{background:#16a34a33;color:#4ade80}
.pc-node-badge.off{background:#dc262633;color:#f87171}
.media-card.pc-offline{filter:grayscale(1);opacity:.45}
.media-card.pc-offline::after{content:'PC offline';position:absolute;top:6px;left:6px;font-size:11px;background:#000c;color:#f87171;padding:2px 6px;border-radius:6px}
.media-card{position:relative}

/* ===== PC offline/online banner ===== */
:root{--pcb-h:0px}
.pc-banner{position:fixed;top:0;left:0;right:0;z-index:100000;display:flex;align-items:center;gap:10px;
  padding:calc(10px + env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) 10px max(14px, env(safe-area-inset-left));
  background:linear-gradient(90deg,#b91c1c,#d97706);color:#fff;font-size:15px;line-height:1.3;box-shadow:0 2px 12px #0008}
.pc-banner.hidden{display:none}
.pc-banner.online{background:linear-gradient(90deg,#15803d,#16a34a)}
.pc-banner-icon{font-size:20px;flex:0 0 auto}
.pc-banner-text{display:flex;flex-wrap:wrap;column-gap:10px;row-gap:2px;min-width:0}
.pc-banner-sub{opacity:.9;font-size:13px}
body.has-pc-banner .navbar{top:var(--pcb-h)}
body.has-pc-banner .gate-screen{padding-top:var(--pcb-h)}
body.has-pc-banner #main-app{padding-top:var(--pcb-h)}
@media (max-width:600px){.pc-banner{font-size:14px}.pc-banner-sub{font-size:12px}}

/* ================= PHONE LAYOUT (<=700px) — desktop untouched ================= */
.m-only{display:none}
.m-sheet,.m-sheet-backdrop{display:none}
@media (max-width:700px){
  .m-only{display:flex}
  :root{--m-top:52px;--m-tab:58px}
  html,body{overflow-x:hidden}
  /* slim one-line banner, in normal flow above everything */
  .pc-banner{font-size:12.5px;padding:calc(6px + env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) 6px max(10px,env(safe-area-inset-left));gap:7px;cursor:pointer}
  .pc-banner-icon{font-size:14px}
  .pc-banner-text{flex-wrap:nowrap;overflow:hidden}
  .pc-banner-text strong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:600}
  .pc-banner-sub{display:none;font-size:11.5px}
  .pc-banner.expanded .pc-banner-text{flex-wrap:wrap}
  .pc-banner.expanded .pc-banner-text strong{white-space:normal}
  .pc-banner.expanded .pc-banner-sub{display:block}
  .pc-banner::after{content:'ⓘ';margin-left:auto;opacity:.8;font-size:13px}
  /* compact top bar */
  .navbar{height:var(--m-top);padding:0 max(12px,env(safe-area-inset-right)) 0 max(12px,env(safe-area-inset-left));background:rgba(17,17,19,.96)!important;backdrop-filter:blur(8px)}
  body:not(.has-pc-banner) .navbar{padding-top:env(safe-area-inset-top);height:calc(var(--m-top) + env(safe-area-inset-top))}
  .navbar .logo-text{font-size:1.25rem}
  .nav-links{display:none!important}
  .nav-right{display:flex;gap:6px;align-items:center;margin-left:auto}
  .nav-right>.nav-pill,.nav-right>.profile-chip{display:none!important}
  .nav-right .search-box{display:none}
  body.m-search-open .nav-right .search-box{display:flex;position:fixed;left:10px;right:10px;top:calc(var(--pcb-h) + var(--m-top) + 6px);z-index:60;background:#1c1c20;border:1px solid #333;border-radius:10px;padding:9px 12px}
  body.m-search-open .nav-right .search-box input{width:100%;font-size:16px}
  .pc-node-badge{font-size:11px;padding:2px 7px;margin-right:2px}
  .m-menu-btn{align-items:center;justify-content:center;width:38px;height:38px;border-radius:10px;border:1px solid #333;background:#1c1c20;color:#fff;font-size:18px;margin-left:6px}
  /* content spacing */
  #main-app{padding-bottom:calc(var(--m-tab) + env(safe-area-inset-bottom) + 10px)}
  .hero-banner{min-height:300px;padding:calc(var(--m-top) + 22px) 16px 22px;background-size:cover!important}
  .hero-title{font-size:1.6rem!important;line-height:1.15}
  .hero-desc{font-size:.86rem;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
  .hero-actions{display:flex;gap:8px;flex-wrap:wrap}
  .hero-actions button{flex:1 1 auto;min-height:42px;font-size:.92rem}
  .catalog-container{padding:12px 0 20px}
  .row-title{padding:0 14px;font-size:1rem}
  .row-scroller{padding:0 14px 8px;gap:8px;scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch;scrollbar-width:none}
  .row-scroller::-webkit-scrollbar{display:none}
  .media-card{flex:0 0 42vw;max-width:180px;scroll-snap-align:start}
  .media-card .card-body,.media-card .card-info{padding:6px 8px}
  #public-tags-bar{padding:0 14px}
  /* bottom tab bar */
  .m-tabbar{position:fixed;left:0;right:0;bottom:0;z-index:250;height:calc(var(--m-tab) + env(safe-area-inset-bottom));padding-bottom:env(safe-area-inset-bottom);background:rgba(17,17,19,.97);border-top:1px solid #2a2a30;backdrop-filter:blur(8px)}
  #main-app.hidden ~ .m-tabbar, body:not(.m-app-visible) .m-tabbar{display:none}
  .m-tabbar button{flex:1;background:none;border:0;color:#9a9aa6;font-size:11px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px}
  .m-tabbar button span{font-size:19px;filter:grayscale(1)}
  .m-tabbar button.active{color:#fff}.m-tabbar button.active span{filter:none}
  /* bottom sheet menu */
  .m-sheet-backdrop{display:block;position:fixed;inset:0;z-index:600;background:#000a}
  .m-sheet{display:block;position:fixed;left:0;right:0;bottom:0;z-index:601;background:#18181c;border-radius:18px 18px 0 0;padding:8px 16px calc(14px + env(safe-area-inset-bottom));max-height:85vh;overflow:auto;transform:translateY(0);transition:transform .22s ease;box-shadow:0 -8px 30px #000a}
  .m-sheet.hidden,.m-sheet-backdrop.hidden{display:none}
  .m-sheet-grip{width:40px;height:5px;border-radius:3px;background:#444;margin:4px auto 12px}
  .m-sheet-user{display:flex;gap:10px;align-items:center;margin-bottom:12px;font-weight:600}
  .m-sheet-role{font-size:12px;color:#7cb7ff;font-weight:400}
  .m-sheet-cats{display:flex;gap:6px;overflow-x:auto;margin-bottom:10px;scrollbar-width:none}
  .m-sheet-cats button{flex:0 0 auto;padding:7px 13px;border-radius:16px;border:1px solid #333;background:#222;color:#ddd;font-size:13px}
  .m-sheet-list{display:flex;flex-direction:column}
  .m-sheet-list button{text-align:left;background:none;border:0;border-bottom:1px solid #26262b;color:#eee;font-size:15px;padding:13px 4px}
  .m-sheet-close{width:100%;margin-top:12px;padding:12px;border-radius:12px;border:0;background:#2a2a30;color:#fff;font-size:15px}
  /* login / profiles */
  .gate-screen{padding-left:14px;padding-right:14px;overflow-y:auto;justify-content:flex-start!important;padding-top:calc(var(--pcb-h) + 40px)!important}
  .auth-box{width:100%;max-width:420px;padding:22px 18px!important}
  .auth-box input{font-size:16px!important}
  .profiles-grid{gap:14px!important;justify-content:center}
  /* modals as full-height sheets */
  .modal-backdrop{align-items:flex-end!important;padding:0!important}
  .modal-card{max-width:100%!important;max-height:92vh!important;border-radius:16px 16px 0 0!important;padding-bottom:env(safe-area-inset-bottom)}
  .modal-header{padding:14px 16px!important}
  .modal-body{padding:14px 16px!important}
  .modal-body .grid-2,.grid-2{grid-template-columns:1fr!important}
  /* player */
  .player-overlay{padding-top:env(safe-area-inset-top);padding-bottom:env(safe-area-inset-bottom)}
  .player-topbar{flex-wrap:wrap;gap:6px;padding:8px 10px!important;font-size:13px}
  .player-topbar select,.player-topbar button{font-size:13px}
  .player-stage video{width:100%;max-height:60vh}
  .player-sidebar,.player-wp-sidebar{width:100%!important;height:40vh!important;border-left:0!important;border-top:1px solid #2a2a30}
  .player-overlay>div{flex-direction:column}
}
@media (max-width:700px){
  .hero-actions{display:grid!important;grid-template-columns:1fr 1fr;gap:8px}
  .hero-actions #btn-hero-play{grid-column:1 / -1}
  .hero-actions button{width:100%;padding:10px 8px!important;font-size:.88rem!important}
  .media-card.pc-offline::after{left:auto;right:6px;top:6px;font-size:10px}
  .media-card{flex-basis:44vw}
}
@media (max-width:700px){.hero-content{max-width:100%!important;width:100%}}
@media (max-width:700px){body.m-app-visible .m-menu-btn{display:none!important}}

/* ===== Netflix-style portrait poster tiles on phone; desktop keeps the old card ===== */
.card-poster{display:none}
.card-meta{gap:8px;min-width:0}
.card-meta>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media (max-width:700px){
  .media-card{flex:0 0 calc((100vw - 28px - 3*8px) / 3.2)!important;max-width:none!important;background:none!important;border:0!important;border-radius:8px;box-shadow:none!important}
  .media-card:hover{transform:none}
  .media-card .card-art,.media-card .card-body{display:none!important}
  .card-poster{display:block;position:relative;aspect-ratio:2/3;border-radius:8px;overflow:hidden;background:#1c1c20}
  .card-poster img{width:100%;height:100%;object-fit:cover;display:block}
  .card-poster-fallback{width:100%;height:100%;display:flex;align-items:flex-end;padding:8px;box-sizing:border-box}
  .card-poster-fallback span{font-size:12px;font-weight:600;line-height:1.2;color:#fff;text-shadow:0 1px 3px #000}
  .card-poster .card-progress-bar{position:absolute;left:0;right:0;bottom:0}
  .media-card.pc-offline::after{content:'';display:none}
  .media-card.pc-offline{opacity:.4}
  .row-scroller{gap:8px!important}
  /* hero */
  .hero-banner{min-height:62vh!important;background-position:center 18%!important;background-size:cover!important;justify-content:flex-end}
  .hero-content{text-align:left}
  .hero-actions{grid-template-columns:repeat(3,1fr)!important}
  .hero-actions #btn-hero-play{grid-column:1 / -1}
  .hero-actions button:not(#btn-hero-play){font-size:.78rem!important;padding:9px 4px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-height:40px}
}

.m-only-inline{display:none}
@media (max-width:700px){.m-only-inline{display:inline}.d-only{display:none}
  .hero-banner::before{content:'';position:absolute;inset:0;background:linear-gradient(180deg,rgba(17,17,19,.15) 0%,rgba(17,17,19,.35) 45%,rgba(17,17,19,.97) 100%);pointer-events:none}
  .hero-content{position:relative;z-index:1}}

/* ===== Netflix-style title details (desktop + phone) ===== */
#info-modal .info-card{position:relative;max-width:640px;width:100%;padding:0;overflow-y:auto;overflow-x:hidden;background:#141414}
.info-close{position:absolute;top:12px;right:12px;z-index:5;width:36px;height:36px;border-radius:50%;background:rgba(0,0,0,.65)!important;border:0;color:#fff;font-size:22px;display:flex;align-items:center;justify-content:center}
.info-hero{position:relative;height:340px;background-size:cover;background-position:center 22%;background-repeat:no-repeat;display:flex;align-items:flex-end}
.info-hero::after{content:'';position:absolute;inset:0;background:linear-gradient(180deg,rgba(20,20,20,0) 35%,rgba(20,20,20,.75) 75%,#141414 100%)}
.info-hero.no-art{height:200px}
.info-hero-text{position:relative;z-index:1;padding:0 22px 8px;width:100%;box-sizing:border-box}
#info-title{font-size:1.9rem;font-weight:800;line-height:1.1;margin:0;text-shadow:0 2px 10px rgba(0,0,0,.6)}
#info-meta{color:#bcbcc4;font-size:.85rem;margin-top:6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.info-body{padding:10px 22px 26px!important}
.info-play{width:100%;padding:12px!important;font-size:1.05rem!important;font-weight:700;border-radius:6px;justify-content:center}
.info-actions3{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin:14px 0 6px}
.info-icon-btn{background:none;border:0;color:#e6e6ea;display:flex;flex-direction:column;align-items:center;gap:4px;padding:6px 2px;cursor:pointer;border-radius:8px}
.info-icon-btn:hover{background:rgba(255,255,255,.06)}
.ib-ico{font-size:1.45rem;line-height:1;height:26px;display:flex;align-items:center}
.ib-lbl{font-size:.74rem;color:#a8a8b0}
.info-desc{color:#d8d8dd;line-height:1.55;font-size:.95rem;margin:10px 0 4px}
.info-status{font-size:.78rem;color:#68d391}
.info-episodes{margin-top:18px;border-top:1px solid rgba(255,255,255,.08);padding-top:14px}
.info-episodes h3{font-size:1.05rem;margin-bottom:10px}
.ep-desc{font-size:.78rem;color:#9a9aa6;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
#info-edit-section{margin-top:16px}
.info-more{position:fixed;inset:0;z-index:2000;display:flex;align-items:flex-end;justify-content:center}
.info-more.hidden{display:none}
.info-more-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.55)}
.info-more-panel{position:relative;width:100%;max-width:440px;background:#1f1f23;border-radius:16px 16px 0 0;padding:8px 10px calc(14px + env(safe-area-inset-bottom));display:flex;flex-direction:column;gap:2px}
.info-more-grip{width:40px;height:4px;border-radius:2px;background:#555;margin:4px auto 8px}
.info-more-item{background:none;border:0;color:#eee;text-align:left;padding:14px 12px;font-size:1rem;border-radius:10px;cursor:pointer}
.info-more-item:hover{background:rgba(255,255,255,.06)}
.info-more-item.danger{color:#ff8a8a}
.info-more-item.cancel{text-align:center;color:#aaa;margin-top:4px;border-top:1px solid rgba(255,255,255,.08);border-radius:0}
@media (min-width:701px){.info-more{align-items:center}.info-more-panel{border-radius:14px}}
@media (max-width:700px){
  #info-modal .info-card{max-width:100%!important;max-height:100%!important;height:100%;border-radius:0!important;margin:0!important}
  .info-hero{height:56vh}
  #info-title{font-size:1.7rem}
  .info-body{padding:8px 16px 40px!important}
}
.info-actions3{grid-template-columns:repeat(2,1fr)}
@media (max-width:700px){.hero-actions{grid-template-columns:repeat(2,1fr)!important}}
.form-group:has(#edit-featured){display:none!important}
.hidden[data-m-proxy]{display:none!important}
