@font-face {
  font-family: 'Exo 2';
  src: url('../assets/shared/overlay-fonts/Exo2-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'Gotham';
  src: url('../assets/shared/overlay-fonts/Gotham Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
}

/* Logo Scale Slider Styles (matching Card Lab effect slider) */
.logo-scale-slider-group {
  margin-top: 18px;
  margin-bottom: 10px;
}
.logo-scale-label {
  font-size: 0.95rem;
  color: #ffffff;
  font-weight: 400;
  margin-bottom: 0.3rem;
  display: block;
  width: 100%;
  text-align: left;
}
.logo-scale-slider-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
#logo-scale-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 5px;
  border-radius: 3px;
  background: linear-gradient(to right, #00bfa5, #8e24aa);
  margin: 0;
  padding: 0;
  outline: none;
  transition: background 0.3s;
}
#logo-scale-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  border: none;
}
#logo-scale-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;
  border: none;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}
#logo-scale-slider::-ms-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;
  border: none;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}
#logo-scale-slider:focus {
  outline: none;
}
#logo-scale-slider::-webkit-slider-runnable-track {
  height: 5px;
  border-radius: 3px;
  background: linear-gradient(to right, #00bfa5, #8e24aa);
}
#logo-scale-slider::-ms-fill-lower {
  background: #00bfa5;
}
#logo-scale-slider::-ms-fill-upper {
  background: #8e24aa;
}
.logo-scale-value {
  font-size: 0.95rem;
  color: #00bfa5;
  min-width: 48px;
  text-align: right;
  font-family: 'Gabarito', sans-serif;
}
/* ==========================================
   BASE STYLES
   ========================================== */
:root {
  --overlay-accent: #4f7dff;
  --overlay-accent-strong: #79a0ff;
  --overlay-accent-soft: rgba(79, 125, 255, 0.18);
  --overlay-accent-faint: rgba(79, 125, 255, 0.08);
  --overlay-accent-border: rgba(79, 125, 255, 0.28);
  --overlay-panel-bg: linear-gradient(180deg, rgba(29, 30, 52, 0.92), rgba(25, 18, 34, 0.82));
  --overlay-panel-hover: linear-gradient(180deg, rgba(35, 37, 63, 0.94), rgba(29, 21, 38, 0.86));
}

   body {
    margin: 0;
    font-family: 'Gabarito', sans-serif;
    background-color: #060511;
    background-image:
      radial-gradient(ellipse 74% 56% at 12% 0%, rgba(79, 125, 255, 0.16) 0%, transparent 58%),
      radial-gradient(ellipse 56% 36% at 96% 20%, rgba(79, 125, 255, 0.08) 0%, transparent 48%),
      radial-gradient(ellipse 95% 70% at 50% 100%, rgba(29, 35, 88, 0.32) 0%, transparent 62%),
      linear-gradient(180deg, #090d1b 0%, #090d19 24%, #0c1022 58%, #090b16 100%);
    background-attachment: fixed;
    color: white;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
      linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
      linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 120px 120px;
    mask-image: linear-gradient(180deg, rgba(255,255,255,0.24), transparent 72%);
    opacity: 0.12;
}

/* ==========================================
   LAYOUT STRUCTURE
   ========================================== */
.layout {
    display: flex;
    flex: 1 0 auto;
    min-height: calc(100vh - 68px);
    align-items: stretch;
    overflow: visible;
}

.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 5rem;
    gap: 1rem;
    position: relative;
    isolation: isolate;
    background:
        radial-gradient(circle at top left, var(--overlay-accent-soft), transparent 28%),
        radial-gradient(circle at bottom right, var(--overlay-accent-faint), transparent 32%),
      linear-gradient(180deg, rgba(9, 11, 24, 0.96), rgba(7, 9, 19, 0.98));
}

.main::before {
  content: '';
  position: absolute;
  inset: 0.8rem;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.025), transparent 18%),
      linear-gradient(135deg, var(--overlay-accent-faint), rgba(255, 255, 255, 0.01));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
  pointer-events: none;
  z-index: 0;
}

.main > * {
  position: relative;
  z-index: 1;
}

.main-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;  /* spacing between edit-bar-unit and canvas-meta-row is handled per-component */
}

/* ==========================================
   HEADER STYLING
   ========================================== */
header {
    padding: 0.625rem 2rem 0.625rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
  background: linear-gradient(180deg, rgba(25, 33, 64, 0.97), rgba(15, 21, 42, 0.95));
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.26), inset 0 1px 0 rgba(255,255,255,0.07);
  border-bottom: 1px solid var(--overlay-accent-border);
    backdrop-filter: blur(16px);
    position: sticky;
    top: 0;
    z-index: 6000;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.95rem;
}

.header-left a {
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--overlay-panel-bg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 12px 28px rgba(0, 0, 0, 0.26);
  text-decoration: none;
  flex-shrink: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  isolation: isolate;
}

.header-left a::before {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 20px;
  background: radial-gradient(circle at 50% 50%, rgba(79, 125, 255, 0.26), rgba(121, 160, 255, 0.14) 52%, transparent 76%);
  filter: blur(14px);
  opacity: 0.85;
  z-index: -1;
}

.header-left a:hover {
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 14px 30px rgba(0, 0, 0, 0.28);
}

.header-left img {
  width: auto;
  height: 36px;
  margin-top: 0;
  filter: drop-shadow(0 0 10px rgba(79,125,255,0.36));
}

.header-left h1 {
  margin: 0;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.1rem;
  line-height: 1;
  font-weight: 400;
  letter-spacing: 0.08em;
  background: linear-gradient(100deg, #ffffff 0%, #d8e4ff 40%, #79a0ff 75%, #4f7dff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 16px rgba(79, 125, 255, 0.3));
}

.header-center {
    display: none; /* Hide the center logo as requested */
}

.header-actions {
    display: flex;
  gap: 0.75rem;
    align-items: center;
    margin-left: auto;
}
/* ==========================================
   NAVIGATION STYLES
   ========================================== */
.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-link {
  color: rgba(255,255,255,0.9);
    text-decoration: none;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.035em;
  text-transform: uppercase;
  padding: 0.72rem 1.05rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: linear-gradient(135deg, rgba(255,255,255,0.12), rgba(255,255,255,0.05));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(79,125,255,0.16), rgba(79,125,255,0.07));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 7px;
  height: 1px;
  background: linear-gradient(90deg, rgba(79,125,255,0.72), rgba(79,125,255,0.24));
  opacity: 0;
  transform: scaleX(0.4);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.nav-link:hover {
    color: white;
  border-color: var(--overlay-accent-border);
  background: linear-gradient(135deg, rgba(255,255,255,0.16), rgba(255,255,255,0.07));
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.18);
}

.nav-link:hover::before {
  opacity: 1;
}

.nav-link:hover::after {
  opacity: 1;
  transform: scaleX(1);
}

/* ==========================================
   BUTTON STYLES
   ========================================== */
.nav-button {
    background: linear-gradient(135deg, rgba(0, 255, 240, 0.1), rgba(166, 0, 255, 0.1));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: white;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.nav-button {
    padding: 0.5rem 1.2rem;
}

.nav-button:hover {
    background: linear-gradient(135deg, rgba(0, 255, 240, 0.2), rgba(166, 0, 255, 0.2));
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 255, 255, 0.2);
}

.bmc-btn {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  transition: all 0.25s ease;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

.bmc-btn img {
  height: 36px;
  width: auto;
  display: block;
}

.bmc-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(255, 221, 0, 0.5);
}

button.action-button,
.sidebar button.action-button {
  background: linear-gradient(180deg, rgba(255,255,255,0.11), rgba(255,255,255,0.045)) !important;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 0.68rem 0.96rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 10px 22px rgba(0,0,0,0.14);
  font-weight: 800;
  font-size: 0.73rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: white !important;
  font-family: "Gabarito", sans-serif;
  margin-left: 0.5rem;
}

.action-icon {
    width: 22px;
    height: 22px;
    min-width: 22px;
    min-height: 22px;
    margin-right: 8px;
    filter: invert(1);
    display: inline-block;
    vertical-align: middle;
}

button.action-button:hover,
.sidebar button.action-button:hover {
  background: linear-gradient(180deg, rgba(255,255,255,0.15), rgba(255,255,255,0.06)) !important;
  border-color: rgba(255,255,255,0.18);
  transform: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 10px 22px rgba(0,0,0,0.14);
}

.action-button-icon {
  padding: 0.68rem;
  min-width: 40px;
  min-height: 40px;
}

.action-button-icon .action-icon {
  margin-right: 0;
}

/* Removed shine animation to match Card Lab styling */

@keyframes shine {
    0% { left: -100%; }
    20% { left: 100%; }
    100% { left: 100%; }
}

/* Removed duplicate action-icon class */

.dialog-btn {
    padding: 0.7rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.dialog-btn:hover {
    transform: translateY(-2px);
}

.dialog-btn.movie {
    background: linear-gradient(135deg, #ff7043, #f44336);
    color: white;
}

.dialog-btn.tv {
    background: linear-gradient(135deg, #2196f3, #3f51b5);
    color: white;
}

/* Icon buttons */
.icon-button {
  background: linear-gradient(180deg, rgba(255,255,255,0.11), rgba(255,255,255,0.045));
  border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    padding: 0.68rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex: 1;
    transition: none;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 10px 22px rgba(0,0,0,0.14);
}

.icon-button:hover {
  background: linear-gradient(180deg, rgba(255,255,255,0.15), rgba(255,255,255,0.06));
  border-color: rgba(255,255,255,0.18);
    transform: none;
}

.icon-button img.icon {
    width: 22px;
    height: 22px;
    filter: invert(100%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(1.5);
}

#download-btn.icon-button.teal {
  background: linear-gradient(135deg, #5a94ff, #356dff);
    color: white;
    border: 1px solid rgba(126, 171, 255, 0.34);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 12px 26px rgba(53, 109, 255, 0.24);
    transition: none;
    position: relative;
    overflow: hidden;
}

#download-btn.icon-button.teal:hover {
  background: linear-gradient(135deg, #75a7ff, #4b82ff);
  border-color: rgba(155, 191, 255, 0.42);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 12px 26px rgba(53, 109, 255, 0.24);
    transform: none;
}

#download-btn.icon-button.teal::before {
    content: none;
}

@keyframes shine {
    0% { left: -100%; }
    20% { left: 100%; }
    100% { left: 100%; }
}

#reset-btn {
  background: linear-gradient(135deg, #ff7f92, #f14f72 55%, #d83d60 100%);
    color: white;
    border: 1px solid rgba(255, 135, 158, 0.34);
    box-shadow: 0 12px 26px rgba(216, 61, 96, 0.24);
    transition: none;
    position: relative;
    overflow: hidden;
}

#reset-btn:hover {
  background: linear-gradient(135deg, #ff98aa, #f66a8b 55%, #e24f73 100%);
    border-color: rgba(255, 170, 185, 0.46);
    box-shadow: 0 12px 26px rgba(216, 61, 96, 0.24);
    transform: none;
}

#emby-push-canvas-btn.icon-button.emby-green {
  background: linear-gradient(135deg, #44d48e, #24b86f);
    color: white;
    border: 1px solid rgba(113, 224, 161, 0.32);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 12px 26px rgba(36, 184, 111, 0.24);
    transition: none;
}

#emby-push-canvas-btn.icon-button.emby-green:hover {
  background: linear-gradient(135deg, #5bdfa0, #35c57e);
  border-color: rgba(142, 236, 186, 0.4);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 12px 26px rgba(36, 184, 111, 0.24);
    transform: none;
}

.sidebar-action-row {
    display: flex;
    gap: 0.5rem;
    justify-content: space-between;
    margin-top: -0.3rem;
    width: 100%;
}

.dialog-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}
/* ==========================================
   SIDEBAR STYLING
   ========================================== */
.sidebar {
    width: 280px;
    min-width: 280px;
    position: sticky;
    align-self: flex-start;
    top: 68px;
  height: calc(100vh - 68px);
  min-height: calc(100vh - 68px);
  max-height: calc(100vh - 68px);
    isolation: isolate;
    background:
      linear-gradient(180deg, rgba(79, 125, 255, 0.1), transparent 18%),
      radial-gradient(circle at 0% 0%, rgba(121, 160, 255, 0.12), transparent 30%),
      linear-gradient(180deg, rgba(24, 31, 56, 0.97), rgba(13, 18, 34, 0.985)),
      linear-gradient(90deg, var(--overlay-accent-soft), transparent 24%);
    backdrop-filter: blur(10px);
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.04), 18px 0 38px rgba(0, 0, 0, 0.24);
    padding: 1.05rem 1rem 1.2rem;
    border-right: 1px solid var(--overlay-accent-border);
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    box-sizing: border-box;
    align-items: center;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) rgba(0, 0, 0, 0.1);
}

.sidebar::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
      linear-gradient(180deg, rgba(255,255,255,0.035), transparent 14%),
      radial-gradient(circle at -10% 0%, rgba(79, 125, 255, 0.16), transparent 28%),
      linear-gradient(180deg, rgba(121, 160, 255, 0.05), transparent 24%);
    z-index: -1;
}

.sidebar::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: 100%;
  background: linear-gradient(180deg, rgba(121, 160, 255, 0.38), rgba(79, 125, 255, 0.06) 32%, rgba(79, 125, 255, 0.2) 70%, rgba(79, 125, 255, 0.04));
    pointer-events: none;
}

.sidebar::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.sidebar::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.5);
}

/* ==========================================
   SIDEBAR SECTIONS
   ========================================== */
.sidebar-section {
    width: 100%;
    margin-bottom: 0;
}

.sidebar-section .sidebar-section {
    margin-bottom: 0.7rem;
    margin-top: 0;
}

.section-title {
    font-size: 1rem;
    font-weight: 600;
    color: white;
    margin-bottom: 0.6rem;
    padding: 0.5rem 0.7rem;
    width: 100%;
    text-align: left;
    background: linear-gradient(90deg, rgba(79, 125, 255, 0.18), rgba(14, 28, 58, 0.44));
    border-radius: 4px;
    position: relative;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    border-left: 3px solid var(--overlay-accent);
    box-sizing: border-box;
}

/* ── Collapsible sidebar sections (matches card-lab pattern) ── */
.sidebar .collapsible {
  margin-bottom: 0.55rem;
    width: 100%;
}

.sidebar .collapsible-header {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(15, 19, 35, 0.98), rgba(9, 12, 24, 0.98));
  padding: 0.78rem 0.88rem;
  border-radius: 14px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
  gap: 0.72rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 8px 18px rgba(0, 0, 0, 0.16);
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
  margin-bottom: 0;
  min-height: 48px;
}

.sidebar .collapsible-header:hover {
  background: linear-gradient(180deg, rgba(17, 23, 42, 0.98), rgba(11, 15, 29, 0.98));
  border-color: var(--overlay-accent-border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 10px 20px rgba(0, 0, 0, 0.18);
}

.sidebar .collapsible-header h3 {
    margin: 0;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.015em;
    color: white;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
}

.sidebar .toggle-icon {
  width: 18px;
  height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  color: rgba(255, 255, 255, 0.62);
    position: relative;
  border-radius: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

.sidebar .toggle-icon::before {
    content: "";
    width: 8px;
    height: 8px;
  border-right: 2px solid rgba(255, 255, 255, 0.68);
  border-bottom: 2px solid rgba(255, 255, 255, 0.68);
    transform: rotate(45deg);
    display: block;
    transition: transform 0.25s ease;
  margin-top: -1px;
}

.sidebar .collapsible.active .toggle-icon::before {
    transform: rotate(-135deg);
    margin-top: 2px;
}

.sidebar .collapsible-header + .section-body {
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.25s ease;
}

.section-body {
    max-height: 3000px;
    opacity: 1;
    overflow: visible;
    transition: max-height 0.3s ease, opacity 0.25s ease;
  padding: 1rem 0.95rem 0.95rem;
  background: linear-gradient(180deg, rgba(16, 23, 42, 0.9), rgba(9, 13, 28, 0.94));
  border-radius: 14px;
  margin-top: 0.36rem;
  border: 1px solid rgba(79, 125, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02), 0 10px 24px rgba(0, 0, 0, 0.14);
}

.section-body.collapsed {
    max-height: 0 !important;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
  margin-top: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-width: 0;
  box-shadow: none;
}

.sidebar .collapsible.active .collapsible-header {
  border-radius: 14px;
  margin-bottom: 0.36rem;
  background: linear-gradient(180deg, rgba(18, 26, 46, 0.98), rgba(12, 17, 31, 0.98));
  border-color: rgba(79, 125, 255, 0.28);
  box-shadow: inset 0 -2px 0 rgba(79, 125, 255, 0.82), inset 0 1px 0 rgba(255,255,255,0.04), 0 10px 22px rgba(0, 0, 0, 0.18);
}

.sidebar .collapsible .section-body {
  padding-top: 1rem;
  padding-bottom: 0.95rem;
}

.sidebar .collapsible .section-body.collapsed {
  display: none;
  padding: 0;
  margin-top: 0;
  border-width: 0;
  box-shadow: none;
}

#mediux-username-filter {
    margin-bottom: -2rem;
}

.section-separator {
    width: 100%;
  border-top: 1px solid rgba(79, 125, 255, 0.16);
    margin: 0.3rem 0 !important;
    padding: 0;
    position: relative;
}

/* Toggle button for sidebar - Enhanced */
.sidebar-toggle {
    width: 90% !important;
    padding: 0.7rem 1rem;
    text-align: center;
    cursor: pointer;
    background: linear-gradient(135deg, rgba(0, 187, 170, 0.2), rgba(138, 43, 226, 0.2));
    border-radius: 8px;
    margin-bottom: 0.7rem;
    margin: -0.4rem auto 0.7rem auto;
    font-weight: 600;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    color: white;
}

.sidebar-toggle:hover {
    background: linear-gradient(135deg, rgba(0, 187, 170, 0.3), rgba(138, 43, 226, 0.3));
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 255, 255, 0.15);
}

.sidebar-toggle::after {
    content: "▼";
    font-size: 0.8rem;
  filter: brightness(1.08);
    transition: transform 0.3s;
}

.sidebar.expanded .sidebar-toggle::after {
    content: "▲";
}

/* ==========================================
   SIDEBAR FORM ELEMENTS
   ========================================== */
.sidebar label {
  font-size: 0.95rem;
  font-weight: 400;
  color: #ffffff;
  letter-spacing: 0.4px;
  margin-bottom: 0.3rem;
  display: block;
  width: 100%;
  text-align: left;
  filter: brightness(1.08);
}

.sidebar select,
.sidebar input[type="text"],
.sidebar input[type="password"],
#tmdb-search-input, 
#mediux-search-input {
    width: 100%;
    padding: 0.5rem;
    font-size: 0.9rem;
  background: rgba(25, 25, 35, 0.72);
    color: white;
  border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    box-sizing: border-box;
    margin-bottom: 0.4rem;
}

.sidebar select:focus,
.sidebar input:focus,
#tmdb-search-input:focus,
#mediux-search-input:focus {
  outline: none;
  border-color: rgba(79, 125, 255, 0.28);
  box-shadow: 0 0 0 2px rgba(79, 125, 255, 0.18);
}

.sidebar select:focus, 
.sidebar input:focus, 
#tmdb-search-input:focus {
    outline: 1px solid rgba(0, 255, 255, 0.5);
}

.sidebar button:not(.action-button):not(.media-type-btn):not(.logo-picker-refresh):not(.logo-picker-close-btn):not(.logo-picker-title):not(.poster-drop-browse):not(.designer-reset-btn):not(.ct-reset-btn):not(.sidebar-range-btn) {
    width: 100%;
  padding: 0.68rem 0.96rem;
  font-size: 0.73rem;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
    margin-top: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.11), rgba(255,255,255,0.045));
  color: white;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
    cursor: pointer;
    transition: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 10px 22px rgba(0,0,0,0.14);
}

.sidebar button:hover {
  transform: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 10px 22px rgba(0,0,0,0.14);
}

#reset-btn {
  background: linear-gradient(135deg, #ff7f92, #f14f72 55%, #d83d60 100%);
    color: white;
  border: 1px solid rgba(255, 135, 158, 0.34);
  box-shadow: 0 12px 26px rgba(216, 61, 96, 0.24);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

#reset-btn:hover {
  background: linear-gradient(135deg, #ff98aa, #f66a8b 55%, #e24f73 100%);
  border-color: rgba(255, 170, 185, 0.46);
  box-shadow: 0 16px 32px rgba(216, 61, 96, 0.3);
    transform: translateY(-2px);
}

.sidebar input[type="file"] {
    display: none;
}

/* ==========================================
   FILE UPLOAD ZONE
   ========================================== */

/* ==========================================
   CANVAS AND DISPLAY CONTAINERS
   ========================================== */
.canvas-container {
    width: 550px;
    height: 800px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: transparent;
    border-radius: 12px;
    transition: all 0.3s ease;
}

canvas {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    background: #111;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 0 30px rgba(0, 0, 0, 0.6);
}

/* ==========================================
   METADATA PANEL
   ========================================== */
.metadata-panel {
  width: var(--metadata-panel-width, clamp(420px, 34vw, 560px));
  height: 800px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.8rem;
  padding: 1.1rem 1.15rem 1.2rem;
  background:
    radial-gradient(circle at top, rgba(0, 255, 240, 0.08), transparent 40%),
    linear-gradient(180deg, rgba(18, 22, 42, 0.96), rgba(10, 12, 28, 0.98));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 22px;
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 0 1px rgba(255, 255, 255, 0.02);
  color: white;
  font-size: 1rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  isolation: isolate;
}

.metadata-panel::before {
  content: '';
  display: block;
  width: 64px;
  height: 5px;
  margin: 0 auto 0.2rem;
  border-radius: 999px;
  background: linear-gradient(90deg, #00fff0, #b57bff);
  box-shadow: 0 0 16px rgba(0,255,240,0.18);
}

.title-row {
  display: grid;
  justify-items: center;
  gap: 0.34rem;
  padding-bottom: 0.18rem;
}

.title-row h2,
.meta-title-link {
  font-size: 1.52rem;
  margin: 0;
  width: 100%;
  color: #f4fbff;
  line-height: 1.04;
  letter-spacing: -0.03em;
  text-align: center;
}

.meta-title-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease, text-shadow 0.2s ease;
}

.meta-title-link:hover,
.meta-title-link:focus-visible {
  color: #ffffff;
  text-shadow: 0 0 18px rgba(121, 160, 255, 0.22);
}

.meta-title-link.is-disabled {
  pointer-events: none;
}

.info-group {
  margin: 0;
}

.meta-facts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.075);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.035);
}

.meta-fact,
.meta-detail-panel {
  background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.075);
  border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.035);
}

.meta-fact {
  min-width: 0;
  min-height: 50px;
  padding: 0.6rem 0.76rem 0.62rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.16rem;
  border-right: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  border-radius: 0;
  box-shadow: none;
}

.meta-fact:nth-child(3n) {
  border-right: none;
}

.meta-fact:nth-last-child(-n + 3) {
  border-bottom: none;
}

.meta-fact .label,
.meta-detail-row .label {
  color: rgba(255,255,255,0.42);
  font-weight: 700;
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.meta-fact > span:not(.label) {
  min-width: 0;
  color: rgba(255,255,255,0.94);
  font-weight: 700;
  font-size: 0.94rem;
  line-height: 1.18;
}

.meta-detail-panel {
  padding: 0.18rem 1rem;
}

.meta-detail-row {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 0.72rem;
  align-items: baseline;
  padding: 0.74rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.055);
}

.meta-detail-row:last-child {
  border-bottom: none;
}

.meta-detail-row > span:not(.label) {
  min-width: 0;
  color: rgba(255,255,255,0.88);
  font-weight: 600;
  font-size: 0.92rem;
  line-height: 1.42;
}

.meta-detail-row-cast > span:not(.label) {
  max-width: 40ch;
  line-height: 1.48;
}

.info-pair {
    font-weight: 600;
    color: #ccc;
}

.tagline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.72rem;
  width: 100%;
  font-style: italic;
  font-size: 0.84rem;
  color: rgba(255,255,255,0.48);
  line-height: 1.24;
  margin: 0 auto 0.18rem;
  max-width: none;
  text-align: center;
}

.tagline::before,
.tagline::after {
  content: '';
  flex: 1 1 92px;
  max-width: 148px;
  height: 1px;
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,0.1));
}

.tagline::after {
  background: linear-gradient(90deg, rgba(255,255,255,0.1), rgba(255,255,255,0));
}

.tagline:empty {
  display: none;
}

.overview {
  flex: 1 1 auto;
  min-height: 0;
  margin-top: 0;
  font-size: 0.91rem;
  line-height: 1.58;
  color: rgba(255,255,255,0.8);
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.018));
  border: 1px solid rgba(255,255,255,0.075);
  border-radius: 18px;
  padding: 0.9rem 1rem 0.96rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.035);
}

.overview::before {
  content: 'Overview';
  display: block;
  margin-bottom: 0.62rem;
  color: rgba(255,255,255,0.42);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ==========================================
   POSTER GRID
   ========================================== */
.poster-grid-wrapper {
    overflow-x: auto;
    padding: 0rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    max-width: 1440px;
}

.poster-grid {
    display: flex;
    flex-direction: row;
    gap: 0.75rem;
    padding: 1rem;
    width: calc(130px * 10 + 0.7rem * 9);
    max-width: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: #00ffff rgba(255, 255, 255, 0.05);
    scroll-behavior: smooth;
    scroll-padding-left: 1rem;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.1);
    white-space: nowrap;
}

.poster-grid::-webkit-scrollbar {
    height: 8px;
}

.poster-grid::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
}

.poster-grid::-webkit-scrollbar-thumb {
    background-color: #00ffff;
    border-radius: 6px;
    border: 2px solid rgba(15, 10, 30, 0.9);
}

.poster-grid::-webkit-scrollbar-thumb:hover {
    background-color: #0ff;
}

.poster-grid img {
    width: 130px;
    height: 200px;
    object-fit: cover;
    flex: 0 0 auto;
    border-radius: 6px;
    scroll-snap-align: start;
    cursor: pointer;
    transition: transform 0.2s;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.poster-grid img:hover {
    transform: scale(1.05);
}

.poster-wrapper {
    scrollbar-gutter: stable both-edges;
}
/* ==========================================
   SEARCH COMPONENTS
   ========================================== */
.tmdb-search {
    position: relative;
    width: 100%;
    margin-bottom: 0.5rem;
  isolation: isolate;
}

#tmdb-search-input {
    width: 100%;
    background: #333;
    color: white;
    border-radius: 6px;
}

.autocomplete-suggestions {
    position: absolute;
  top: calc(100% + 8px);
  left: -8px;
  width: calc(100% + 16px);
  box-sizing: border-box;
  z-index: 140;
  background:
    radial-gradient(circle at top, rgba(0, 255, 240, 0.06), transparent 42%),
    linear-gradient(180deg, rgba(20, 24, 42, 0.98), rgba(10, 12, 24, 0.98));
    color: white;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255,255,255,0.04);
  max-height: 340px;
    overflow-y: auto;
  padding: 6px;
}

.autocomplete-suggestions > div {
  padding: 0.72rem 0.85rem;
    cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
  font-weight: 600;
    color: white;
  border: 1px solid transparent;
  border-radius: 10px;
  margin: 0;
}

.autocomplete-suggestions > div:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.autocomplete-suggestions .search-result-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 0.65rem;
  border-bottom: none;
  min-height: 0;
  line-height: 1.2;
}

.autocomplete-suggestions .search-result-item + .search-result-item {
  margin-top: 4px;
}

.autocomplete-suggestions .search-result-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.42rem;
  min-width: 0;
}

.autocomplete-suggestions .search-result-title {
  min-width: 0;
  width: 100%;
  font-size: 0.94rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.96);
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.18;
}

.autocomplete-suggestions .search-result-meta {
  grid-column: 2;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
  align-self: flex-start;
}

.autocomplete-suggestions .type-badge {
  flex-shrink: 0;
  width: 28px;
  height: 24px;
  padding: 0;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(180deg, rgba(255,255,255,0.055), rgba(255,255,255,0.025));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

.autocomplete-suggestions .type-badge svg {
  width: 10px;
  height: 10px;
  opacity: 0.88;
}

.autocomplete-suggestions .type-badge.movie {
  border-color: rgba(255, 148, 112, 0.2);
  background: linear-gradient(180deg, rgba(255, 128, 88, 0.12), rgba(255, 103, 82, 0.06));
  color: rgba(255, 191, 168, 0.92);
}

.autocomplete-suggestions .type-badge.tv {
  border-color: rgba(122, 171, 255, 0.2);
  background: linear-gradient(180deg, rgba(98, 154, 255, 0.12), rgba(82, 118, 255, 0.06));
  color: rgba(187, 214, 255, 0.94);
}

.autocomplete-suggestions .type-badge.collection {
  border-color: rgba(255, 191, 110, 0.2);
  background: linear-gradient(180deg, rgba(255, 188, 92, 0.12), rgba(255, 150, 72, 0.06));
  color: rgba(255, 219, 166, 0.94);
}

.autocomplete-suggestions .search-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.22rem 0.46rem;
  border-radius: 999px;
  font-size: 0.63rem;
  font-weight: 800;
  letter-spacing: 0.035em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.autocomplete-suggestions .search-status-badge.has-posters {
  background: rgba(49, 193, 124, 0.18);
  border: 1px solid rgba(49, 193, 124, 0.28);
  color: #bff6d8;
}

.autocomplete-suggestions .search-status-badge.collection {
  background: rgba(255, 196, 72, 0.18);
  border: 1px solid rgba(255, 196, 72, 0.26);
  color: #ffe4a3;
}

.autocomplete-suggestions .search-status-badge.no-posters {
  background: rgba(255, 95, 95, 0.16);
  border: 1px solid rgba(255, 95, 95, 0.24);
  color: #ffc7c7;
}

.autocomplete-suggestions .search-result-empty {
  display: flex;
  justify-content: flex-start;
  min-height: 0;
  color: rgba(255,255,255,0.72);
}

#section-search,
#body-search,
#section-search .section-body {
  overflow: visible;
}

#body-search .tmdb-search {
  margin-bottom: 0.85rem;
}

#body-search .tmdb-search .autocomplete-suggestions {
  position: relative;
  top: auto;
  left: auto;
  width: 100%;
  margin-top: 8px;
}

.network-logo-search-container {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    margin-bottom: 0.6rem;
}

#network-logo-search {
    flex: 1;
    max-width: none;
    padding: 8px 10px;
    border-radius: 6px;
    background: #333;
    color: white;
    border: none;
}

.network-logo-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 100;
    background: #222;
    color: white;
    border-radius: 0 0 6px 6px;
    overflow: hidden;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    max-height: 220px;
    overflow-y: auto;
    display: none;
}

.suggestion-item {
    padding: 0.75rem;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    min-height: 40px;
}

.suggestion-item:hover {
    background: #444;
}

/* ==========================================
   NETWORK LOGO COMPONENTS
   ========================================== */
.network-logo-select {
    position: relative;
    width: 100%;
}

.network-logo-select select {
    appearance: none;
    width: 100%;
    padding: 0.75rem;
    padding-left: 50px;
    background-color: #333;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

.network-logo-select select:hover {
    background-color: #444;
}

.network-logo-select::after {
    content: '';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid white;
    pointer-events: none;
}

.network-logo-preview {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 15px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 2;
}

#network-logo-select, #overlay-select, #poster-fit-mode {
    background: #333;
    color: white;
    text-align: left;
  font-family: 'Gabarito', sans-serif;
  font-size: 0.85rem;
    font-weight: 400;
}

.logo-preview-img {
    max-width: 120px;
    max-height: 30px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.logo-options label {
    margin-bottom: 0.25rem;
    color: white;
}
/* ==========================================
   BADGES AND TYPE INDICATORS
   ========================================== */
.rating-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  white-space: nowrap;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: rgba(243, 248, 255, 0.92);
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  line-height: 1;
  min-height: 1.9rem;
}

.rating-badge.imdb-rating {
  gap: 0.32rem;
}

.rating-badge::before {
  content: "";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.7rem;
  height: 1.08rem;
  flex: 0 0 1.7rem;
  background: url("../assets/integrations/tmdblogo.svg") center/contain no-repeat;
  opacity: 0.95;
}

.rating-badge.imdb-rating::before {
  content: "";
  width: 1.78rem;
  height: 1rem;
  flex: 0 0 1.78rem;
  background: url("../assets/integrations/IMDb-Logo.wine.svg") center/contain no-repeat;
  opacity: 0.98;
}

.type-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  padding: 0.24rem 0.48rem 0.24rem 0.36rem;
  margin-left: 0;
  border-radius: 11px;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(241, 246, 255, 0.88);
  border: 1px solid rgba(255,255,255,0.07);
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.025));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
  line-height: 1;
  min-height: 1.5rem;
}

.type-badge::before {
  content: "";
  width: 0.15rem;
  height: 0.68rem;
  flex: 0 0 0.15rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.9);
  box-shadow: none;
}

.type-badge.movie {
  background: linear-gradient(135deg, rgba(255, 125, 88, 0.12), rgba(233, 74, 73, 0.08));
  border-color: rgba(255, 130, 97, 0.2);
}

.type-badge.movie::before {
  background: linear-gradient(180deg, #ffb18f, #ff714e);
}

.type-badge.tv {
  background: linear-gradient(135deg, rgba(76, 162, 255, 0.12), rgba(86, 108, 255, 0.08));
  border-color: rgba(100, 150, 255, 0.2);
}

.type-badge.tv::before {
  background: linear-gradient(180deg, #9ad0ff, #5f8cff);
}

.type-badge.collection {
  background: linear-gradient(135deg, rgba(255, 177, 66, 0.12), rgba(255, 125, 41, 0.08));
  border-color: rgba(255, 172, 74, 0.22);
}

.type-badge.collection::before {
  background: linear-gradient(180deg, #ffd38a, #ff9d3f);
}

.type-badge:not(.movie):not(.tv):not(.collection) {
  color: rgba(228, 233, 247, 0.76);
  background: rgba(255,255,255,0.035);
}

.type-badge:not(.movie):not(.tv):not(.collection)::before {
  background: rgba(210, 217, 236, 0.58);
  box-shadow: 0 0 0 4px rgba(255,255,255,0.04);
}

.rating-badge.is-high,
.rating-badge.is-mid,
.rating-badge.is-low {
  color: rgba(243, 248, 255, 0.92);
}

.rating-badge.is-empty {
  color: rgba(223, 230, 244, 0.76);
}

.rating-badge.is-pending {
  color: rgba(223, 230, 244, 0.6);
}

.rating-badge.is-high::before {
  filter: drop-shadow(0 0 8px rgba(55, 210, 154, 0.14));
}

.rating-badge.is-mid::before {
  filter: drop-shadow(0 0 8px rgba(255, 197, 89, 0.12));
}

.rating-badge.is-low::before,
.rating-badge.is-empty::before {
  filter: none;
}

.rating-badge.imdb-rating.is-high::before,
.rating-badge.imdb-rating.is-mid::before,
.rating-badge.imdb-rating.is-low::before,
.rating-badge.imdb-rating.is-empty::before,
.rating-badge.imdb-rating.is-pending::before {
  filter: none;
}

.meta-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.52rem;
  flex-wrap: wrap;
  width: 100%;
  margin-top: 0.06rem;
}

#content-type-indicator {
  font-size: 0.64rem;
  padding: 0.3rem 0.56rem 0.3rem 0.42rem;
}

@media screen and (max-width: 900px) {
  .title-row h2,
  .meta-title-link {
    font-size: 1.3rem;
  }

  .meta-facts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .meta-fact:nth-child(3n) {
    border-right: 1px solid rgba(255,255,255,0.06);
  }

  .meta-fact:nth-child(2n) {
    border-right: none;
  }

  .meta-fact:nth-last-child(-n + 3) {
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }

  .meta-fact:nth-last-child(-n + 2) {
    border-bottom: none;
  }

  .meta-detail-row {
    grid-template-columns: 1fr;
    gap: 0.3rem;
  }
}

.icon-badge {
    background: linear-gradient(to bottom right, #2196f3, #3f51b5);
    padding: 6px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ==========================================
   TOOLTIP STYLING
   ========================================== */
.custom-tooltip {
    position: fixed;
  background:
    radial-gradient(circle at top, rgba(0, 255, 240, 0.12), transparent 38%),
    linear-gradient(180deg, rgba(16, 20, 38, 0.985), rgba(7, 10, 22, 0.995));
  color: #c9fff8;
  padding: 12px 16px;
  border-radius: 14px;
    font-size: 0.9rem;
    pointer-events: none;
    opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s ease, transform 0.22s ease;
    z-index: 99999;
  transform: translateY(4px) scale(0.98);
  box-shadow:
    0 22px 42px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(255,255,255,0.04),
    0 0 22px rgba(0, 255, 240, 0.08),
    inset 0 1px 0 rgba(255,255,255,0.08);
  font-weight: 700;
    font-family: 'Gabarito', sans-serif;
  letter-spacing: 0.012em;
  text-shadow: 0 0 10px rgba(0, 255, 240, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  max-width: 320px;
  text-align: left;
  line-height: 1.5;
}

.custom-tooltip.tooltip-visible {
  visibility: visible;
  transform: translateY(0) scale(1);
}

.custom-tooltip.tooltip-top::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  margin-left: -8px;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid rgba(8, 11, 24, 0.995);
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.26));
}

.custom-tooltip.tooltip-bottom::after {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  margin-left: -8px;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid rgba(16, 20, 38, 0.985);
  filter: drop-shadow(0 -3px 6px rgba(0, 0, 0, 0.26));
}

.info-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-left: 8px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,0.1), rgba(255,255,255,0.04));
  border: 1px solid rgba(255,255,255,0.12);
  color: #c9fff8;
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 8px 18px rgba(0,0,0,0.14);
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.info-button:hover {
  background: linear-gradient(180deg, rgba(255,255,255,0.15), rgba(255,255,255,0.06));
  border-color: rgba(255,255,255,0.18);
  color: #ffffff;
  transform: translateY(-1px);
}

/* ==========================================
   TOGGLE SWITCHES
   ========================================== */
.toggle-switch-container {
    margin-left: auto;
    padding-left: 10px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 46px !important;
    height: 24px;
    margin-left: 8px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #444;
    transition: .3s;
    border-radius: 24px;
    overflow: hidden;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
    z-index: 2;
}

input:checked + .toggle-slider {
    background: linear-gradient(90deg, #00bfa5 0%, #8e24aa 100%);
}

input:checked + .toggle-slider:before {
    transform: translateX(22px);
}

.toggle-slider:after, input:checked + .toggle-slider:after {
    content: none;
}
/* ==========================================
   MODAL DIALOGS
   ========================================== */
.modal-dialog {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: #222;
    border-radius: 12px;
    padding: 2.5rem;
    width: 90%;
    max-width: 600px;
    color: white;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.2);
    border: 1px solid rgba(0, 255, 255, 0.1);
    text-align: center;
}

.modal-content h3 {
    margin-top: 0;
    font-size: 1.4rem;
    color: white !important;
}

.large-modal {
    max-width: 800px !important;
    max-height: 90vh;
    overflow-y: auto;
}

.close-modal {
    position: absolute;
    top: -2.5rem;
    right: 0;
    background: #ff4d4d;
    color: white;
    padding: 0.4rem 0.8rem;
    border: none;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
}

/* ==========================================
   SEARCH RESULTS
   ========================================== */
.result-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.result-section h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid rgba(0, 255, 255, 0.2);
    padding-bottom: 0.25rem;
    color: #00ffff;
}

.result-header {
    background: rgba(0, 255, 255, 0.1);
    color: #00ffff;
    font-weight: bold;
    padding: 8px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(0, 255, 255, 0.3);
}

.search-results-list {
    max-height: 400px;
    overflow-y: auto;
    margin: 1rem 0;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    text-align: left;
}

.search-result-item {
    padding: 0.75rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: background 0.2s;
}

.search-result-item:hover {
    background: rgba(0, 255, 255, 0.1);
}

.result-poster img, .no-poster {
    width: 60px;
    height: 90px;
    object-fit: cover;
    border-radius: 4px;
}

.no-poster {
    background: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #999;
    font-size: 0.8rem;
}

.result-info {
    flex: 1;
}

.result-title {
    font-weight: bold;
    margin-bottom: 0.3rem;
}

.result-year {
    font-size: 0.9rem;
    color: #aaa;
}

.result-type {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    font-weight: 600;
    color: white;
}

.loading, .no-results, .error {
    padding: 1rem;
    text-align: center;
    color: #aaa;
}

.error {
    color: #ff6b6b;
}
/* ==========================================
   COLOR PICKER COMPONENTS
   ========================================== */
.color-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

#logo-color-picker {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 22px;
    border: none;
    border-radius: 6px;
    background: #333;
    cursor: pointer;
}

#pickr {
    width: 100%;
    height: 32px;
    border-radius: 6px;
    background: #ffffff;
    cursor: pointer;
    border: 1px solid #555;
}

.logo-row-aligned {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.logo-select-container {
    flex: 1;
}

.pickr-inline-square {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid #555;
    cursor: pointer;
    margin-top: 2px;
}

.pickr-bar-container {
    width: 100%;
    margin-top: 0 !important;
    margin-bottom: 0.7rem !important;
    height: 12px;
}

.pickr-bar-container .pcr-button {
    width: 100% !important;
    height: 12px !important;
    border-radius: 6px !important;
    border: 1px solid #444 !important;
}

/* Pickr Theme Customization */
.pcr-app[data-theme='monolith'] {
    background: #111 !important;
    border-radius: 10px !important;
    border: 1px solid rgba(0, 255, 255, 0.2) !important;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.1) !important;
    color: white !important;
    z-index: 1000 !important;
}

.pcr-app[data-theme='monolith'] .pcr-result {
    background: #222 !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

.pcr-app[data-theme='monolith'] input {
    background: #222 !important;
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.pcr-app[data-theme='monolith'] .pcr-save {
    background: linear-gradient(135deg, #00bfa5, #8e24aa) !important;
    color: white !important;
    font-weight: bold;
    border: none !important;
    border-radius: 6px !important;
    padding: 0.4rem 0.8rem !important;
    box-shadow: 0 0 6px rgba(0, 255, 255, 0.2) !important;
}

.pcr-app[data-theme='monolith'] .pcr-slider {
    border-radius: 6px !important;
    height: 10px !important;
}

/* ==========================================
   MEDIA TYPE SELECTOR
   ========================================== */
.media-type-selector {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    gap: 6px;
    background: transparent;
    margin-top: 4px;
    margin-bottom: 2px;
}

.sidebar button.media-type-btn {
    flex: 1 1 auto;
    min-width: 0;
    padding: 8px 10px;
    text-align: center;
    background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.03)) !important;
    color: rgba(255, 255, 255, 0.55) !important;
    font-weight: 600;
    font-size: 0.8rem;
    font-family: 'Gabarito', sans-serif;
    letter-spacing: 0;
    text-transform: none;
    cursor: pointer;
    transition: background 0.18s, border-color 0.18s, color 0.18s, box-shadow 0.18s;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 10px;
    position: relative;
    z-index: 1;
    margin: 0;
    white-space: nowrap;
    line-height: 1.25;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.sidebar button.media-type-btn.active {
    background: linear-gradient(to right, #00bfa5, #8e24aa) !important;
    color: white !important;
    border-color: rgba(142, 36, 170, 0.6) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.15), 0 0 14px rgba(0,191,165,0.25) !important;
    font-weight: 700;
}

.sidebar button.media-type-btn:hover:not(.active) {
    background: linear-gradient(to right, rgba(0,191,165,0.2), rgba(142,36,170,0.2)) !important;
    color: rgba(255, 255, 255, 0.85) !important;
    border-color: rgba(0, 191, 165, 0.35) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06) !important;
}

.media-type-btn::after,
.media-type-btn.active::after {
    content: none !important;
}

/* Fix for mobile view media type buttons */
.mobile-tab-content .media-type-selector {
  margin-bottom: 0.85rem;
  margin-top: 0.2rem;
  gap: 0.55rem;
  background: transparent;
  border: none;
  box-shadow: none;
}

.mobile-tab-content .media-type-btn {
    flex: 1 1 auto;
    min-width: 0;
  padding: 0.78rem 0.75rem;
    text-align: center;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.025));
  color: rgba(234, 238, 255, 0.62);
  font-weight: 700;
  font-size: 0.78rem;
    font-family: 'Gabarito', sans-serif;
  letter-spacing: 0.02em;
  text-transform: uppercase;
    cursor: pointer;
    transition: background 0.18s, border-color 0.18s, color 0.18s;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
    position: relative;
    z-index: 1;
    white-space: normal;
    line-height: 1.25;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.mobile-tab-content .media-type-btn.active {
  background: linear-gradient(180deg, rgba(79, 125, 255, 0.32), rgba(79, 125, 255, 0.18)) !important;
  color: #f8fbff !important;
  border-color: rgba(121, 160, 255, 0.46) !important;
    font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 10px 24px rgba(22, 27, 58, 0.28);
}

/* Fix for mobile view media type buttons */
.mobile-tab-content .media-type-selector {
    margin-bottom: 0.5rem;
}

.mobile-tab-content .media-type-btn::after,
.mobile-tab-content .media-type-btn.active::after {
    content: none !important;
}

/* ==========================================
   LOADING INDICATORS
   ========================================== */
.loading-indicator {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(25, 26, 47, 0.9);
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    z-index: 1000;
    font-family: 'Gabarito', sans-serif;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.loading-indicator p {
    margin: 0;
    font-size: 14px;
}

.loading-indicator::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    margin-right: 10px;
    animation: spin 1s linear infinite;
}

.loading-overlay {
    position: fixed;
  inset: 0;
  padding: 1.5rem;
  background: rgba(4, 6, 14, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  transition: opacity 0.24s ease;
}

.loading-overlay.is-visible {
  opacity: 1;
}

.custom-modal.loading-modal {
  background:
    radial-gradient(circle at top, rgba(0, 255, 240, 0.08), transparent 40%),
    linear-gradient(180deg, rgba(18, 22, 42, 0.96), rgba(10, 12, 28, 0.98));
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 0 1px rgba(255, 255, 255, 0.02);
  padding: 1.9rem 1.75rem 1.45rem;
  width: min(460px, 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  color: white;
}

.custom-modal.loading-modal::before {
  content: '';
  display: block;
  width: 58px;
  height: 4px;
  margin: 0 auto 1rem;
  border-radius: 999px;
  background: linear-gradient(90deg, #00fff0, #b57bff);
  box-shadow: 0 0 18px rgba(0,255,240,0.24);
}

.loading-spinner-large {
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-top-color: #b57bff;
  border-right-color: #00fff0;
    border-radius: 50%;
  width: 48px;
  height: 48px;
  animation: loadingSpin 1s linear infinite;
  margin-bottom: 0.95rem;
  box-shadow: 0 0 14px rgba(0, 255, 240, 0.14);
}

.loading-title {
  margin: 0 0 0.45rem;
  font-size: 1.65rem;
  line-height: 1.08;
  font-weight: 800;
  background: linear-gradient(90deg, #ffffff 0%, #bffdf7 36%, #d3c3ff 78%, #ffffff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.loading-message {
  margin: 0 0 1.1rem;
  color: rgba(255,255,255,0.76);
  line-height: 1.6;
}

.loading-progress-container {
  width: 100%;
  height: 6px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  margin: 0.2rem 0 0.9rem;
  overflow: hidden;
}

.loading-progress-bar,
.progress-bar {
    height: 100%;
  background: linear-gradient(90deg, #8f63ff, #00d4c8);
    transition: width 0.3s ease;
  border-radius: 999px;
  box-shadow: 0 0 14px rgba(0, 212, 200, 0.2);
}

.loading-details {
  color: rgba(255,255,255,0.62);
  font-size: 0.88rem;
  line-height: 1.5;
  margin: 0;
}

@keyframes loadingSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==========================================
   BRANDING AND SPECIAL ELEMENTS
   ========================================== */
.poster-tools-brand {
    height: 60px;
    filter: drop-shadow(0 0 6px rgba(0, 255, 255, 0.5));
    transform: translateX(140px);
}
/* ==========================================
   MOBILE RESPONSIVENESS
   ========================================== */
@media screen and (min-width: 901px) {
    .sidebar-toggle {
        display: none;
    }
    
    .mobile-canvas-actions {
        display: none !important;
    }
    
    .header-mobile-menu {
        display: none;
    }

    .header-mobile-dropdown {
        display: none !important;
    }

    .header-actions {
        justify-content: flex-end;
        flex: 0 0 auto;
    }
}

/* Main Mobile Layout */
@media screen and (max-width: 900px) {
    .layout {
        flex-direction: column;
        overflow-y: auto;
    }

    .mobile-canvas-actions {
        display: flex;
        justify-content: space-between;
        gap: 1rem;
        width: 90%;
        max-width: 550px;
        margin: -1.5rem auto 0.5rem auto;
        padding: 0;
    }

    .mobile-canvas-actions .icon-button {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.7rem;
        padding: 0.9rem 0.75rem;
        border-radius: 8px;
        font-weight: 600;
        color: white;
        border: none;
        cursor: pointer;
        position: relative;
        overflow: hidden;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        transition: all 0.3s ease;
    }

    .mobile-canvas-actions .icon-button.teal {
        background: linear-gradient(135deg, #00fff0, #6a11cb);
        box-shadow: 0 4px 12px rgba(0, 255, 255, 0.25);
    }

    .mobile-canvas-actions .icon-button.teal:hover, 
    .mobile-canvas-actions .icon-button.teal:active {
        background: linear-gradient(135deg, #00e5ff, #8e2de2);
        box-shadow: 0 6px 16px rgba(0, 255, 255, 0.4);
        transform: translateY(-2px);
    }

    .mobile-canvas-actions .icon-button.teal::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0));
        animation: shine 1.5s infinite;
        animation-delay: 0.5s;
    }

    .mobile-canvas-actions .icon-button.red {
        background: linear-gradient(135deg, #ff5252, #ff1744, #d50000);
        box-shadow: 0 4px 12px rgba(255, 23, 68, 0.3);
    }

    .mobile-canvas-actions .icon-button.red:hover,
    .mobile-canvas-actions .icon-button.red:active {
        background: linear-gradient(135deg, #ff5252, #d50000);
        box-shadow: 0 6px 16px rgba(255, 23, 68, 0.4);
        transform: translateY(-2px);
    }

    .mobile-canvas-actions .icon {
        width: 22px;
        height: 22px;
        filter: brightness(0) invert(1);
    }

    .sidebar {
        width: 100%;
        max-width: 100%;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        padding: 1rem;
        z-index: 10;
        /* Hide the sidebar by default on mobile */
        max-height: 60px;
        overflow: hidden;
        transition: max-height 0.3s ease-in-out;
    }
    
    /* When sidebar is expanded */
    .sidebar.expanded {
        max-height: 80vh;
        overflow-y: auto;
        padding-bottom: 2rem;
    }
    
    /* Toggle button for sidebar */
    .sidebar-toggle {
        width: 100%;
        padding: 0.7rem 1rem;
        text-align: center;
        cursor: pointer;
        background: linear-gradient(135deg, rgba(0, 187, 170, 0.2), rgba(138, 43, 226, 0.2));
        border-radius: 8px;
        margin-bottom: 0.7rem;
        font-weight: 600;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 0.5rem;
        border: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
        transition: all 0.3s ease;
        color: white;
    }
    
    .sidebar-toggle:hover {
        background: linear-gradient(135deg, rgba(0, 187, 170, 0.3), rgba(138, 43, 226, 0.3));
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 255, 255, 0.15);
    }
    
    .sidebar-toggle::after {
        content: "▼";
        font-size: 0.8rem;
        transition: transform 0.3s;
    }
    
    .sidebar.expanded .sidebar-toggle::after {
        content: "▲";
    }

    .main {
        padding: 1rem;
        align-items: center;
    }
    
    .canvas-container {
        width: 100%;
        height: auto;
        max-width: 550px;
        aspect-ratio: 2/3;
    }
    
    canvas {
        width: 100%;
        height: 100%;
    }
    
    .metadata-panel {
        width: 100%;
        max-width: 550px;
        min-height: 0;
        height: auto;
        padding: 1.5rem;
        margin-top: 1rem;
    }
    
    .main-content {
        width: 100%;
        flex-direction: column;
        align-items: center;
    }
    
    header {
        padding: 0.8rem 1rem;
    }

    .header-left {
      gap: 0.72rem;
    }

    .header-left a {
      width: 48px;
      height: 48px;
      border-radius: 12px;
    }

    .header-left img {
      height: 30px;
    }
    
    .header-left h1 {
      font-size: 1.55rem;
      letter-spacing: 0.06em;
    }
    
    .sidebar-section {
        margin-bottom: 0.8rem;
    }
    
    #poster-modal {
        margin-top: 0.5rem;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 200;
        background: rgba(0,0,0,0.9);
        justify-content: center;
        align-items: center;
        padding: 1rem;
    }
    
    .poster-grid-wrapper {
        width: 100%;
        max-height: 80vh;
        overflow-y: auto;
    }
    
    .poster-grid {
        width: 100%;
        padding: 0.5rem;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
    
    .poster-grid img {
        flex: 0 0 auto;
        width: calc(33% - 0.7rem);
        height: auto;
        aspect-ratio: 2/3;
        max-width: 130px;
        min-width: 100px;
    }
    
    .modal-content {
        width: 95%;
        padding: 1.5rem;
    }
    
    .close-modal {
        top: 1rem;
        right: 1rem;
        padding: 0.5rem 1rem;
        z-index: 210;
    }
    
    /* Improved touch feedback */
    .suggestion-item,
    .search-result-item,
    .sidebar button,
    .media-type-btn {
        padding: 0.8rem;
    }
}

.mobile-upload-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    margin-top: 0.5rem;
}

.mobile-upload-button {
    background: linear-gradient(135deg, #00fff0, #6a11cb);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 255, 255, 0.25);
    flex-shrink: 0;
}

.mobile-upload-button:hover {
    background: linear-gradient(135deg, #00e5ff, #8e2de2);
    box-shadow: 0 6px 16px rgba(0, 255, 255, 0.4);
    transform: translateY(-2px);
}

#mobile-file-name {
    color: #cccccc;
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mobile-file-input {
    display: none;
}

.mobile-drop-zone-label {
    border: 1.5px dashed rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    font-size: 0.95rem;
    text-align: center;
    font-weight: 500;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: block;
}

.mobile-drop-zone-label:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(0, 255, 255, 0.4);
}

.mobile-input-group.network-search-group {
    position: relative;
    margin-bottom: 1.3rem;
  max-width: none;
}

.mobile-input-group.network-search-group input {
    width: 100%;
    padding: 0.8rem;
    background: rgba(0, 0, 0, 0.4);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 0.95rem;
    text-align: center;
}

.mobile-tab-content .mobile-input-group {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  padding-right: 0;
}

.mobile-input-group.network-search-group.logo-row-aligned {
  display: grid;
  gap: 0.48rem;
  margin-bottom: 0;
}

.mobile-input-group.network-search-group.logo-row-aligned input.logo-select-container {
  width: 100%;
  text-align: left;
}

/* Mobile color picker styling */
#mobile-pickr.mobile-color-picker.pickr-inline-square {
    width: 100%;
  height: 56px;
    flex: 0 0 auto;
    margin: 0;
    border-radius: 16px;
    border: 1px solid rgba(121, 160, 255, 0.22);
    display: block;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

@media screen and (max-width: 900px) {
    .mobile-input-group.network-search-group.logo-row-aligned {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
        padding-right: 0;
    }
}

/* ==========================================
   SMALL SCREEN DEVICES
   ========================================== */
@media screen and (max-width: 480px) {
  header {
    padding: 0.72rem 0.85rem;
  }

  .header-left {
    gap: 0.62rem;
  }

  .header-left a {
    width: 44px;
    height: 44px;
    border-radius: 11px;
  }

  .header-left img {
    height: 26px;
  }

  .header-left h1 {
    font-size: 1.32rem;
    letter-spacing: 0.05em;
  }

    .canvas-container {
        width: 100%;
        max-width: 100%;
    }
    
    .metadata-panel {
        width: 100%;
        min-height: 0;
        height: auto;
        padding: 1rem;
        font-size: 0.9rem;
    }
    
    .info-item {
        font-size: 0.9rem;
    }
    
    .title-row h2 {
        font-size: 1.3rem;
    }
    
    .main {
        padding: 0.5rem;
    }
    
    .search-result-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .result-poster {
        margin-bottom: 0.5rem;
    }
    
    /* Fix for header actions */
    .header-actions {
        display: flex;
    }
    
    .header-actions .nav-link {
        display: none;
    }
    
    /* Modern burger menu styling */
    .header-mobile-menu {
        display: block;
        cursor: pointer;
        background: linear-gradient(135deg, rgba(0, 187, 170, 0.2), rgba(138, 43, 226, 0.2));
        border-radius: 8px;
        padding: 0.5rem 0.8rem;
        font-size: 1.2rem;
        border: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
        transition: all 0.3s ease;
        font-weight: 600;
    }
    
    .header-mobile-menu:hover {
        background: linear-gradient(135deg, rgba(0, 187, 170, 0.3), rgba(138, 43, 226, 0.3));
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 255, 255, 0.15);
    }
    
    /* Mobile header menu dropdown */
    .header-mobile-dropdown {
        position: absolute;
        top: 100%;
        right: 1rem;
        background: rgba(20, 20, 30, 0.95);
        border: 1px solid rgba(0, 255, 255, 0.1);
        border-radius: 8px;
        z-index: 1000;
        display: none;
        min-width: 180px;
        backdrop-filter: blur(10px);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
        animation: fadeIn 0.2s ease;
    }
    
    .header-mobile-dropdown.active {
        display: block;
    }
    
    .header-mobile-dropdown a {
        display: block;
        padding: 0.8rem 1.2rem;
        color: white;
        text-decoration: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        transition: background 0.2s ease;
        font-weight: 600;
    }
    
    .header-mobile-dropdown a:hover {
        background: rgba(0, 255, 255, 0.1);
    }
    
    .header-mobile-dropdown a:last-child {
        border-bottom: none;
    }
    
    .poster-grid img {
        width: calc(50% - 0.5rem);
    }
}

/* Tooltip adjustment for mobile */
@media screen and (max-width: 768px) {
    #tooltip {
        display: none !important;
    }
    
    #overlay-canvas {
        width: 90%;
        height: auto;
        margin: 0 auto;
    }

    #metadata-panel {
        display: none !important;
    }
}

/* Only show mobile menu overlay on mobile */
@media (min-width: 901px) {
    .mobile-menu-overlay {
        display: none !important;
    }
}

/* ==========================================
   MOBILE MENU OVERLAY
   ========================================== */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
  align-items: flex-start;
    justify-content: center;
  padding: calc(env(safe-area-inset-top, 0px) + 4.95rem) 0.75rem calc(env(safe-area-inset-bottom, 0px) + 0.9rem);
    background:
      linear-gradient(180deg, rgba(5, 8, 20, 0.58), rgba(5, 9, 20, 0.9)),
      radial-gradient(circle at top, rgba(79, 125, 255, 0.14), transparent 38%);
    z-index: 1000;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.mobile-menu-overlay.is-open {
    display: flex;
}

.mobile-menu-container {
    max-width: min(680px, 100%);
    width: 100%;
  max-height: calc(100vh - 6rem);
    margin: 0;
    padding: 1rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background:
      radial-gradient(circle at top left, rgba(79, 125, 255, 0.16), transparent 34%),
      linear-gradient(180deg, rgba(17, 21, 40, 0.98), rgba(10, 12, 25, 0.99));
    border-radius: 28px;
    box-shadow: 0 26px 80px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255,255,255,0.06);
    border: 1px solid rgba(121, 160, 255, 0.18);
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.25rem 0.15rem 1rem;
    margin-bottom: 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.options-tools-container {
    width: 90%;
    max-width: 550px;
    margin: 0 auto;
    border-radius: 8px;
    overflow: hidden;
}

.mobile-menu-title {
  font-size: 1.42rem;
    font-weight: 700;
  color: white;
    margin: 0;
  letter-spacing: -0.02em;
}

.mobile-menu-title-group {
  display: grid;
  gap: 0.32rem;
}

.mobile-menu-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.26rem 0.58rem;
  border-radius: 999px;
  background: rgba(79, 125, 255, 0.14);
  border: 1px solid rgba(121, 160, 255, 0.24);
  color: #dbe6ff;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mobile-menu-subtitle {
  margin: 0;
  max-width: 38ch;
  color: rgba(226, 231, 245, 0.68);
  font-size: 0.9rem;
  line-height: 1.45;
}

.mobile-menu-close {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(243, 246, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 0.56rem 1rem;
  font-size: 0.84rem;
  font-weight: 700;
    cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
  letter-spacing: 0.06em;
  text-transform: uppercase;
    flex-shrink: 0;
}

.mobile-menu-close:hover {
  background: rgba(79, 125, 255, 0.14);
  border-color: rgba(121, 160, 255, 0.36);
  color: #ffffff;
  transform: translateY(-1px);
}

.mobile-menu-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 18px;
  margin-bottom: 0.9rem;
  padding: 0.55rem;
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.mobile-menu-tabs::-webkit-scrollbar {
    height: 4px;
}

.mobile-menu-tabs::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.mobile-menu-tabs::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 255, 0.3);
    border-radius: 4px;
}

.mobile-menu-tab {
    flex: 1 1 auto;
  min-width: 0;
  padding: 0.8rem 0.65rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.02));
  color: rgba(228, 233, 247, 0.64);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 14px;
  font-size: 0.82rem;
  font-weight: 700;
    cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
    text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.mobile-menu-tab.active {
  background: linear-gradient(180deg, rgba(79, 125, 255, 0.3), rgba(79, 125, 255, 0.18));
  color: #ffffff;
  border-color: rgba(121, 160, 255, 0.34);
  box-shadow: 0 16px 28px rgba(18, 24, 51, 0.34), inset 0 1px 0 rgba(255,255,255,0.08);
}

.mobile-menu-tab.active::after {
  display: none;
}

.mobile-tab-content {
    display: none;
  padding: 1rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  border-radius: 22px;
  margin-bottom: 0;
  min-height: 0;
  flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 1.35rem);
}

.mobile-tab-content.active {
  display: grid;
  align-content: start;
  gap: 0.95rem;
    animation: fadeIn 0.3s ease;
}

#mobile-tab-style {
  gap: 0.8rem;
}

.mobile-style-card {
  display: grid;
  gap: 0.85rem;
  padding: 0.15rem 0 0.9rem;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.mobile-style-card + .mobile-style-card {
  padding-top: 1rem;
}

.mobile-style-card .mobile-section-label {
  margin: 0;
  padding-bottom: 0.55rem;
  border-bottom: none;
}

.mobile-style-card .mobile-input-group,
.mobile-style-card .mobile-toggle-group,
.mobile-style-card .mobile-gradient-controls,
.mobile-style-card .mobile-config-actions {
  margin: 0;
}

.mobile-style-actions {
  gap: 0;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Additional style fixes for mobile content */
.mobile-input-group {
    position: relative;
    margin-bottom: 0;
}

.mobile-input-group label {
    display: block;
    color: rgba(241, 245, 255, 0.92);
    font-size: 0.84rem;
    margin-bottom: 0.48rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.mobile-input-group input,
.mobile-input-group textarea,
.mobile-input-group select {
    width: 100%;
    padding: 0.9rem 0.95rem;
    background: rgba(6, 9, 20, 0.68);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    font-size: 0.95rem;
    font-family: 'Gabarito', sans-serif;
    font-weight: 400;
    box-sizing: border-box;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

  .mobile-input-group textarea {
    min-height: 92px;
    resize: vertical;
    line-height: 1.4;
  }

.mobile-input-group select {
  -webkit-appearance: auto;
  -moz-appearance: auto;
  appearance: auto;
  background-image: none;
  padding-right: 0.8rem;
}

.mobile-input-group select option {
  background: #333;
  color: white;
}

.mobile-toggle-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
  width: 100% !important;
  margin-left: 0;
  margin-right: 0;
  padding: 0.95rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 18px;
  margin-bottom: 0;
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-sizing: border-box;
  min-height: 62px;
}

.mobile-toggle-label {
  font-size: 0.92rem;
  color: rgba(244, 246, 255, 0.92);
  font-weight: 700;
  line-height: 1.25;
}

/* Mobile slider groups */
.mobile-slider-group label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.85);
    margin-bottom: 6px;
}
.mobile-slider-group label span {
  color: #dbe6ff;
    font-size: 0.76rem;
    font-weight: 700;
  min-width: 3.2rem;
  text-align: right;
  padding: 0.22rem 0.48rem;
  border-radius: 999px;
  background: rgba(79, 125, 255, 0.12);
  border: 1px solid rgba(121, 160, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}
.mobile-slider-row {
  display: grid;
  grid-template-columns: 2.4rem minmax(0, 1fr) 2.4rem;
  align-items: center;
  gap: 0.65rem;
}

.mobile-range-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  padding: 0;
  border-radius: 16px;
  border: 1px solid rgba(121, 160, 255, 0.22);
  background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.03));
  color: #eef4ff;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 8px 18px rgba(8, 12, 28, 0.18);
  transition: background 0.18s, border-color 0.18s, color 0.18s, transform 0.18s;
}

.mobile-range-btn:hover,
.mobile-range-btn:focus-visible {
  background: linear-gradient(180deg, rgba(79, 125, 255, 0.22), rgba(79, 125, 255, 0.12));
  border-color: rgba(121, 160, 255, 0.4);
  color: #ffffff;
  transform: translateY(-1px);
}

.mobile-range-btn:active {
  transform: translateY(0);
}

.mobile-slider {
    width: 100%;
  accent-color: var(--overlay-accent-strong);
    cursor: pointer;
    height: 0.4rem;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(79, 125, 255, 0.88), rgba(121, 160, 255, 0.5));
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.25);
}

.mobile-slider::-webkit-slider-runnable-track {
  height: 0.4rem;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(79, 125, 255, 0.88), rgba(121, 160, 255, 0.5));
}

.mobile-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 1rem;
  height: 1rem;
  margin-top: -0.3rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.62);
  background: linear-gradient(180deg, #ffffff, #dce7ff);
  box-shadow: 0 4px 12px rgba(17, 25, 48, 0.35);
}

.mobile-slider::-moz-range-track {
  height: 0.4rem;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(79, 125, 255, 0.88), rgba(121, 160, 255, 0.5));
}

.mobile-slider::-moz-range-thumb {
  width: 1rem;
  height: 1rem;
  border: 1px solid rgba(255,255,255,0.62);
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff, #dce7ff);
  box-shadow: 0 4px 12px rgba(17, 25, 48, 0.35);
}

.mobile-slider:focus-visible {
  outline: none;
}

/* Section label inside tab (e.g. "Gradient") */
.mobile-section-label {
  font-size: 0.72rem;
    font-weight: 700;
  letter-spacing: 0.12em;
    text-transform: uppercase;
  color: rgba(185, 203, 255, 0.76);
  padding: 0 0 0.45rem;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  margin-bottom: -0.15rem;
  margin-top: 0.15rem;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
}

/* Gradient controls collapsible area */
.mobile-gradient-controls {
    margin-top: 0.15rem;
  display: grid;
  gap: 0.8rem;
}

/* Config tab action buttons */
.mobile-config-actions {
    display: flex;
    flex-direction: column;
  gap: 0.7rem;
  padding: 0;
  width: 100%;
  margin: 0;
}
.mobile-config-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
  padding: 0.92rem 1rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  color: rgba(240, 244, 255, 0.88);
  font-size: 0.95rem;
  font-weight: 700;
    cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
    font-family: inherit;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}
.mobile-config-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}
.mobile-config-btn--upload {
  min-height: 3.7rem;
}
.mobile-config-btn:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.2);
    color: #fff;
  transform: translateY(-1px);
}
.mobile-config-btn--accent {
  background: linear-gradient(180deg, rgba(79, 125, 255, 0.18), rgba(79, 125, 255, 0.08));
  border-color: rgba(121, 160, 255, 0.34);
  color: #dce7ff;
}
.mobile-config-btn--accent:hover {
  background: linear-gradient(180deg, rgba(79, 125, 255, 0.28), rgba(79, 125, 255, 0.14));
  border-color: rgba(121, 160, 255, 0.48);
}

.mobile-style-card .toggle-switch {
  transform: scale(0.96);
  transform-origin: right center;
}

.mobile-network-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px;
  gap: 0.6rem;
  align-items: start;
}

.mobile-color-group {
  display: grid;
  gap: 0;
  justify-items: stretch;
  align-self: start;
  padding-top: 2.4rem;
}

.mobile-color-group label {
  margin-bottom: 0;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(185, 203, 255, 0.72);
  text-align: center;
}

/* ==========================================
   MOBILE LAYOUT REFINEMENTS v2
   ========================================== */
@media screen and (max-width: 900px) {
    /* Hide Quick Edit bar — desktop-only feature */
    .po-eb-unit { display: none !important; }

    /* Hide desktop sidebar — mobile overlay handles all options */
    .sidebar { display: none !important; }

  /* Slim the header and use the home-page mobile hamburger */
    .nav-link { display: none !important; }
    .bmc-btn       { display: none !important; }
    .whats-new-btn { display: none !important; }

  header {
    gap: 0.55rem;
    padding: 0.82rem 0.9rem;
    flex-wrap: nowrap;
  }

  .header-left {
    gap: 0.7rem;
    min-width: 0;
  }

  .header-left a {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .header-left h1 {
    font-size: 1.02rem;
    letter-spacing: 0.02em;
    white-space: nowrap;
  }

  .header-actions {
    gap: 0.4rem;
    margin-left: auto;
    padding-right: 3.35rem;
    flex-shrink: 0;
  }

  .header-actions .action-button,
  .header-actions .config-dropdown .action-button,
  #emby-button {
    margin-left: 0;
    padding: 0.62rem;
    min-width: 40px;
    min-height: 40px;
    border-radius: 12px;
    flex-shrink: 0;
  }

  .header-mobile-menu {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    right: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    width: 40px;
    height: 40px;
    padding: 0;
    font-size: 1.1rem;
    line-height: 1;
    transition: background 0.2s, border-color 0.2s;
    color: #ffffff;
    font-family: inherit;
    user-select: none;
  }

  .header-mobile-menu:hover,
  .header-mobile-menu:focus-visible {
    background: rgba(255,255,255,0.14);
    border-color: rgba(255,255,255,0.2);
    transform: translateY(-50%);
  }

  .header-mobile-dropdown {
    position: absolute;
    top: 100%;
    right: 0.85rem;
    background: rgba(10, 8, 24, 0.98);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    z-index: 1000;
    display: none;
    min-width: 200px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 16px 48px rgba(0,0,0,0.55);
    animation: fadeDown 0.15s ease;
  }

  .header-mobile-dropdown.active {
    display: block;
  }

  .header-mobile-dropdown a {
    display: block;
    padding: 0.8rem 1.2rem;
    color: #ffffff;
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.15s;
  }

  .header-mobile-dropdown a:last-child {
    border-bottom: none;
  }

  .header-mobile-dropdown a:hover {
    background: rgba(0,212,200,0.07);
  }

    /* Canvas area: single-column centered */
    .po-canvas-meta-row {
        flex-direction: column;
        align-items: center;
    margin-top: 0;
    gap: 1rem;
    }

    .po-canvas-col {
    width: min(100%, 430px);
        display: flex;
        flex-direction: column;
        align-items: center;
    }

  .canvas-container {
    width: min(100%, 430px);
    margin: 0 auto;
  }

    /* Main fills all available width */
  .main {
    flex: 1;
    width: 100%;
    padding: 0.85rem 0.75rem 1.5rem;
  }

  /* Mobile action buttons sit directly under the canvas as a centered control tray */
    .mobile-canvas-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
    width: min(100%, 390px);
    max-width: 390px;
    margin: 0.7rem auto 0;
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    }

    .mobile-canvas-actions .icon-button {
    width: 100%;
    min-height: 42px;
    padding: 0.62rem 0.7rem;
    border-radius: 12px;
    justify-content: center;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: none;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 8px 16px rgba(8, 10, 20, 0.18);
    transition: background 0.18s, border-color 0.18s, box-shadow 0.18s;
  }

  .mobile-canvas-actions .icon-button.teal {
    background: linear-gradient(135deg, #5a94ff, #356dff);
    color: white;
    border: 1px solid rgba(126, 171, 255, 0.34);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 10px 20px rgba(53, 109, 255, 0.2);
  }

  .mobile-canvas-actions .icon-button.red {
    background: linear-gradient(135deg, #ff7f92, #f14f72 55%, #d83d60 100%);
    color: white;
    border: 1px solid rgba(255, 135, 158, 0.34);
    box-shadow: 0 10px 20px rgba(216, 61, 96, 0.2);
  }

  .mobile-canvas-actions .icon-button.teal:hover,
  .mobile-canvas-actions .icon-button.teal:active,
  .mobile-canvas-actions .icon-button.teal:focus-visible {
    transform: none;
    background: linear-gradient(135deg, #75a7ff, #4b82ff);
    border-color: rgba(155, 191, 255, 0.42);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 10px 20px rgba(53, 109, 255, 0.2);
  }

  .mobile-canvas-actions .icon-button.red:hover,
  .mobile-canvas-actions .icon-button.red:active,
  .mobile-canvas-actions .icon-button.red:focus-visible {
    transform: none;
    background: linear-gradient(135deg, #ff98aa, #f66a8b 55%, #e24f73 100%);
    border-color: rgba(255, 170, 185, 0.46);
    box-shadow: 0 10px 20px rgba(216, 61, 96, 0.2);
  }

  .mobile-canvas-actions .icon-button:hover,
  .mobile-canvas-actions .icon-button:active,
  .mobile-canvas-actions .icon-button:focus-visible {
    transform: none;
  }

  .mobile-canvas-actions .icon-button::before,
  .mobile-canvas-actions .icon-button.teal::before,
  .mobile-canvas-actions .icon-button.red::before {
    content: none !important;
  }

  .mobile-canvas-actions .icon {
    width: 15px;
    height: 15px;
    }
}

/* Header nav dropdown — works at all mobile widths (≤900px) */
@media screen and (max-width: 900px) {
    .header-mobile-dropdown { right: 0.85rem; }
}

/* Tighten tab labels on smaller phones */
@media screen and (max-width: 480px) {
    .mobile-menu-tab {
    padding: 0.72rem 0.42rem;
    font-size: 0.68rem;
    }

  header {
    padding: 0.78rem 0.72rem;
  }

  .header-left h1 {
    font-size: 0.94rem;
  }

  .header-actions .nav-link {
    padding: 0.52rem 0.62rem;
    font-size: 0.64rem;
  }

  .mobile-menu-container {
    padding: 0.85rem;
    border-radius: 24px;
  }

  .mobile-menu-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mobile-tab-content {
    padding: 0.9rem;
  }

  .mobile-menu-overlay {
    padding-top: calc(env(safe-area-inset-top, 0px) + 4.5rem);
  }

  .mobile-canvas-actions {
    grid-template-columns: 1fr;
  }

  .mobile-slider-row {
    grid-template-columns: 2.15rem minmax(0, 1fr) 2.15rem;
    gap: 0.5rem;
  }

  .mobile-range-btn {
    width: 2.15rem;
    height: 2.15rem;
    font-size: 1.08rem;
  }

  .mobile-style-card {
    padding: 0.9rem;
  }

  .mobile-network-row {
    grid-template-columns: minmax(0, 1fr) 48px;
  }
}

/* Fanart.tv connected row inside mobile Config tab */
.mobile-fanart-connected {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.55rem 1rem;
  background: rgba(79, 125, 255, 0.08);
  border: 1px solid rgba(121, 160, 255, 0.2);
  border-radius: 16px;
    margin-bottom: 0.9rem;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
    box-sizing: border-box;
}
.mobile-fanart-connected-label {
    flex: 1;
    font-size: 0.88rem;
  color: #dbe6ff;
    font-weight: 600;
}
.mobile-fanart-change-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.65);
    border-radius: 6px;
    padding: 0.25rem 0.6rem;
    font-size: 0.8rem;
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.2s, color 0.2s;
}
.mobile-fanart-change-btn:hover {
  border-color: rgba(121, 160, 255, 0.5);
  color: #dbe6ff;
}

/* ==========================================
   CUSTOM OVERLAY STYLING
   ========================================== */
.custom-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 14, 0.72);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1200;
  padding: 1.5rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.custom-modal {
  background:
    radial-gradient(circle at top, rgba(0, 255, 240, 0.08), transparent 42%),
    linear-gradient(180deg, rgba(18, 22, 42, 0.96), rgba(10, 12, 28, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 1.85rem 1.75rem 1.5rem;
  text-align: center;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 0 1px rgba(255, 255, 255, 0.02);
  max-width: 90%;
  width: min(430px, 100%);
}

.custom-modal::before {
  content: '';
  display: block;
  width: 54px;
  height: 4px;
  margin: 0 auto 1rem;
  border-radius: 999px;
  background: linear-gradient(90deg, #00fff0, #b57bff);
  box-shadow: 0 0 18px rgba(0, 255, 240, 0.24);
}

.custom-modal h3 {
  font-size: 1.45rem;
  margin-top: 0;
  margin-bottom: 0.75rem;
  color: white;
  background: linear-gradient(90deg, #f8fbff 0%, #b8fff8 44%, #d7b7ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.custom-modal p {
  margin-bottom: 1.4rem;
  font-size: 0.96rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.78);
}

.custom-buttons {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.custom-btn {
  min-width: 132px;
  padding: 0.78rem 1.08rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-weight: 800;
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 10px 22px rgba(0,0,0,0.14);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.custom-btn-red {
  background: linear-gradient(135deg, #ff7f7f, #f04b73 55%, #cf2d61 100%);
  border-color: rgba(255, 122, 146, 0.34);
  box-shadow: 0 12px 26px rgba(240, 61, 99, 0.24);
}

.custom-btn-red:hover {
  border-color: rgba(255, 159, 176, 0.46);
  box-shadow: 0 16px 32px rgba(240, 61, 99, 0.3);
  transform: translateY(-2px);
}

.custom-btn:active {
  transform: translateY(0);
}

.custom-btn-blue {
  background: linear-gradient(135deg, rgba(0,255,240,0.2), rgba(153,69,255,0.18));
  border-color: rgba(0,255,240,0.24);
}

.custom-btn-blue:hover {
  background: linear-gradient(135deg, rgba(0,255,240,0.28), rgba(153,69,255,0.24));
  border-color: rgba(0,255,240,0.34);
  box-shadow: 0 14px 28px rgba(0,0,0,0.18);
  transform: translateY(-2px);
}

.custom-btn-gray {
  background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.04));
  color: rgba(255, 255, 255, 0.92);
  border-color: rgba(255, 255, 255, 0.14);
}

.custom-btn-gray:hover {
  background: linear-gradient(135deg, rgba(255,255,255,0.14), rgba(255,255,255,0.06));
  box-shadow: 0 14px 28px rgba(0,0,0,0.16);
  transform: translateY(-2px);
}

/* ==========================================
   POSTER DESIGNER
   ========================================== */

/* Logo picker — dark backdrop */
#logo-picker-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 14, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 199;
}

/* Logo picker — centered overlay dialog */
#logo-picker-modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 200;
  width: min(var(--logo-picker-width, 780px), 92vw);
  max-height: 85vh;
  overflow-y: auto;
  background:
    radial-gradient(circle at top, rgba(0, 255, 240, 0.08), transparent 40%),
    linear-gradient(180deg, rgba(18, 22, 42, 0.96), rgba(10, 12, 28, 0.98));
  border-radius: 22px;
  padding: 1.4rem 1.6rem 1.8rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 0 1px rgba(255, 255, 255, 0.02);
  box-sizing: border-box;
  position: fixed;
  isolation: isolate;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.18) transparent;
}
#logo-picker-modal::before {
  content: '';
  display: block;
  width: 58px;
  height: 4px;
  margin: 0 auto 0.95rem;
  border-radius: 999px;
  background: linear-gradient(90deg, #00fff0, #b57bff);
  box-shadow: 0 0 18px rgba(0,255,240,0.24);
}
#logo-picker-modal::-webkit-scrollbar { width: 4px; }
#logo-picker-modal::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.18); border-radius: 999px; }

.logo-picker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  margin: 0 -1.6rem 1.15rem;
  padding: 0 1.6rem 0.95rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.logo-picker-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 0.55rem;
  font-size: 1.05rem;
  font-weight: 800;
  color: #f4fbff;
  letter-spacing: 0.01em;
  flex: 1;
  min-width: 0;
}

.logo-picker-title-main {
  color: rgba(255,255,255,0.9);
  font-size: 0.98rem;
  letter-spacing: 0.015em;
}

.logo-picker-title-subject {
  display: inline-flex;
  align-items: center;
  max-width: min(100%, 52rem);
  min-width: 0;
  padding: 0.4rem 0.84rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(0,255,240,0.12), rgba(181,123,255,0.14) 58%, rgba(255,255,255,0.05));
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 8px 18px rgba(0,0,0,0.16);
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.logo-picker-title-meta {
  color: rgba(255,255,255,0.56);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.logo-picker-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.logo-picker-refresh {
  -webkit-appearance: none;
  appearance: none;
  background: linear-gradient(135deg, rgba(255,255,255,0.12), rgba(255,255,255,0.05));
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  color: #fff;
  font-family: 'Gabarito', sans-serif;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.55rem 0.95rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.logo-picker-refresh:hover {
  background: linear-gradient(135deg, rgba(0,255,240,0.16), rgba(153,69,255,0.14));
  border-color: rgba(0,255,240,0.24);
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.14);
}
.logo-picker-close-btn {
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
  color: rgba(255,255,255,0.74);
  font-size: 20px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  line-height: 1;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
  flex-shrink: 0;
  padding: 0;
}
.logo-picker-close-btn:hover {
  color: #fff;
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.16);
  transform: translateY(-1px);
  box-shadow: none;
}

/* Search input inside the picker modal */
.logo-picker-search {
  position: relative;
  margin-bottom: 1.5rem;
}
.logo-picker-search input {
  width: 100%;
  padding: 0.75rem 0.9rem;
  font-size: 0.88rem;
  background: rgba(255,255,255,0.06);
  color: #e7eff5;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  box-sizing: border-box;
  font-family: 'Gabarito', sans-serif;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.logo-picker-search input:focus {
  outline: none;
  border-color: rgba(0,255,240,0.4);
  box-shadow: 0 0 0 3px rgba(0,255,240,0.08);
}
.logo-picker-search .autocomplete-suggestions {
  z-index: 300;
  left: 0;
  width: 100%;
}

/* Grid of logos — column of source sections */
.clearlogo-strip {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 4px 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 255, 255, 0.3) rgba(0, 0, 0, 0.1);
}
.clearlogo-strip::-webkit-scrollbar { height: 5px; }
.clearlogo-strip::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.15); border-radius: 3px; }
.clearlogo-strip::-webkit-scrollbar-thumb { background: rgba(0, 255, 255, 0.3); border-radius: 3px; }

.clearlogo-empty,
.clearlogo-loading {
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.85rem;
  text-align: center;
  padding: 12px;
  width: 100%;
  font-family: 'Gabarito', sans-serif;
}
.clearlogo-loading { color: #00fff0; }

/* No Fanart key hint — appended after the logo cards */
.clearlogo-fanart-hint {
  flex: 0 0 auto;
  align-self: center;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.32);
  font-family: 'Gabarito', sans-serif;
  white-space: nowrap;
  padding: 0 8px;
  border-left: 1px solid rgba(255,255,255,0.08);
  margin-left: 4px;
}

.clearlogo-item {
  position: relative;
  flex: 0 0 auto;
  width: 140px;
  height: 70px;
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.025));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.15s, box-shadow 0.15s;
  scroll-snap-align: start;
  box-sizing: border-box;
}
.clearlogo-item img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.8));
  pointer-events: none;
}
.clearlogo-item:hover {
  border-color: rgba(0,255,240,0.16);
  background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.035));
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.14);
}
.clearlogo-item.selected {
  border-color: rgba(0,255,240,0.24);
  background: linear-gradient(180deg, rgba(255,255,255,0.09), rgba(255,255,255,0.04));
  box-shadow: 0 12px 24px rgba(0,0,0,0.16), inset 0 0 0 1px rgba(0,255,240,0.12);
}

.logo-source-tag {
  position: absolute;
  bottom: 3px;
  right: 5px;
  font-size: 8px;
  color: rgba(255, 255, 255, 0.3);
  font-family: 'Gabarito', sans-serif;
  font-weight: 700;
  letter-spacing: 0.3px;
  pointer-events: none;
}

/* ── Poster Picker Modal ─────────────────────────────────── */

#poster-picker-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 14, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 199;
}

#poster-picker-modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 200;
  width: min(920px, 94vw);
  max-height: 88vh;
  overflow-y: auto;
  background:
    radial-gradient(circle at top, rgba(0, 255, 240, 0.08), transparent 40%),
    linear-gradient(180deg, rgba(18, 22, 42, 0.96), rgba(10, 12, 28, 0.98));
  border-radius: 22px;
  padding: 1.4rem 1.6rem 1.8rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 0 1px rgba(255, 255, 255, 0.02);
  box-sizing: border-box;
  position: fixed;
  isolation: isolate;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.18) transparent;
}
#poster-picker-modal::before {
  content: '';
  display: block;
  width: 58px;
  height: 4px;
  margin: 0 auto 0.95rem;
  border-radius: 999px;
  background: linear-gradient(90deg, #00fff0, #b57bff);
  box-shadow: 0 0 18px rgba(0,255,240,0.24);
}
#poster-picker-modal::-webkit-scrollbar { width: 4px; }
#poster-picker-modal::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.18); border-radius: 999px; }

/* Language filter tabs */
.poster-lang-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 1rem;
  padding: 0;
}
.poster-lang-tabs:empty {
  display: none;
}
.poster-lang-tab {
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.52);
  font-family: 'Gabarito', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.42rem 0.78rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}
.poster-lang-tab:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.9);
  transform: translateY(-1px);
  box-shadow: none;
}
.poster-lang-tab.active {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.18);
  color: #f4fbff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 8px 16px rgba(0,0,0,0.12);
}

/* Poster grid */
.poster-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
}
.poster-picker-item {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.08);
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.025));
}
.poster-picker-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}
.poster-picker-item:hover {
  border-color: rgba(0,255,240,0.16);
  background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.035));
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.14);
}

/* Season picker — two labelled sections */
.poster-picker-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  grid-column: 1 / -1; /* span all columns when inside the poster-picker-grid */
}
.poster-picker-section + .poster-picker-section {
  padding-top: 16px;
}
.poster-picker-section-label {
  display: inline-flex;
  align-self: flex-start;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.58);
  font-family: 'Gabarito', sans-serif;
  padding: 0 0 0.2rem;
}

/* Collection picker — full-width movie title divider */
.collection-movie-divider {
  grid-column: 1 / -1;
  display: inline-flex;
  align-self: flex-start;
  font-family: 'Gabarito', sans-serif;
  font-size: 0.76rem;
  font-weight: 800;
  color: rgba(255,255,255,0.68);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0 0 0.15rem;
  margin: 0;
  margin-top: 16px;
  margin-bottom: 2px;
}
.poster-picker-grid > .collection-movie-divider:first-child {
  margin-top: 0;
}

/* ── Canvas Tools — card-based sub-group system ──────────── */
.ct-primary-btn {
  width: 100% !important;
  margin-left: 0 !important;
  margin-bottom: 0 !important;
  min-height: 34px;
  font-size: 0.68rem !important;
  padding: 0.46rem 0.62rem !important;
  justify-content: center !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
}

/* Frosted card for each tool group */
.ct-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 5px;
}
.ct-group:last-child { margin-bottom: 0; }

/* Card header row: icon+title left, optional toggle right */
.ct-group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.ct-group-title {
  font-family: 'Gabarito', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  color: rgba(0, 255, 240, 0.85);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Selected logo name hint */
.ct-hint {
  font-family: 'Gabarito', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  color: #00fff0;
  text-align: center;
  margin: 6px 0 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Expanded controls panel */
.ct-controls {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 0;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Slider block: label+value row above, -·slider·+ row below */
.ct-slider-block {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.ct-slider-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.ct-slider-row {
  display: flex;
  align-items: center;
  gap: 4px;
}
.ct-slider-row .designer-slider {
  flex: 1;
  min-width: 0;
}

/* Step −/+ buttons */
.sidebar-range-btn {
  flex-shrink: 0;
  background: linear-gradient(135deg, rgba(20,20,30,0.9) 60%, rgba(46,14,58,0.9) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  width: 22px;
  height: 22px;
  font-size: 15px;
  line-height: 1;
  color: #00fff0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.12s;
  outline: none;
  padding: 0;
}
.sidebar-range-btn:hover {
  background: linear-gradient(135deg, rgba(48,43,99,0.95) 40%, rgba(0,191,165,0.3) 100%);
  border-color: #00bfa5;
  color: #fff;
  transform: scale(1.08);
}
.sidebar-range-btn:active {
  background: linear-gradient(135deg, rgba(24,24,40,1) 60%, rgba(48,43,99,1) 100%);
  border-color: #00bfa5;
  color: #00bfa5;
  transform: scale(0.94);
}

/* Legacy 3-col grid row (Color/Scale rows in Network Logo card) */
.ct-row {
  display: grid;
  grid-template-columns: 66px 1fr 36px;
  align-items: center;
  gap: 7px;
}
.ct-row-label {
  font-family: 'Gabarito', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.65);
  white-space: nowrap;
}
.ct-row-val {
  font-family: 'Gabarito', sans-serif;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.5);
  text-align: right;
  white-space: nowrap;
}

/* Toggle rows: label left, switch right */
.ct-toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2px 0;
}
.ct-toggle-label {
  font-family: 'Gabarito', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.62);
}
.ct-guidelines-row {
  margin-top: 0;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Side-by-side button row (e.g. Browse + Upload) */
.ct-btn-row {
  display: flex;
  gap: 5px;
}
.ct-btn-row .ct-primary-btn {
  flex: 1;
}
.ct-btn-row .action-icon {
  width: 14px;
  height: 14px;
  min-width: 14px;
  min-height: 14px;
  margin-right: 5px;
  filter: none;
}

/* Fit mode labeled row */
.ct-fit-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ct-fit-row .ct-row-label {
  flex-shrink: 0;
  width: 24px;
}
.ct-fit-row select {
  flex: 1;
  margin: 0;
  padding: 0.38rem 0.55rem;
  font-size: 0.82rem;
}

/* Sub-section heading within a group (e.g. Banner / Gradient / Network) */
.ct-sub-label {
  font-family: 'Gabarito', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

/* Sub-section header row — label left, optional toggle right */
.ct-sub-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Hairline divider between sub-sections within a group */
.ct-inner-sep {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin: 2px 0;
}

/* Inner expandable panel: flex column with gap, no separator border */
.ct-inner-panel {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Ghost reset button */
.ct-reset-btn {
  margin-top: 4px;
  width: 100%;
  padding: 0.68rem 0.92rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.09), rgba(255,255,255,0.035));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.76);
  font-family: 'Gabarito', sans-serif;
  font-size: 0.73rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s, transform 0.15s;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 10px 22px rgba(0,0,0,0.12);
}
.ct-reset-btn:hover {
  background: linear-gradient(135deg, rgba(255,127,146,0.18), rgba(216,61,96,0.16));
  border-color: rgba(255, 135, 158, 0.34);
  color: #fff;
  transform: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 10px 22px rgba(0,0,0,0.12);
}

.ct-reset-btn:disabled {
  cursor: not-allowed;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  border-color: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.35);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.ct-reset-btn:disabled:hover {
  transform: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  border-color: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.35);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.ct-reset-btn--compact {
  margin-top: 8px;
  padding: 0.54rem 0.8rem;
  font-size: 0.68rem;
}

.ct-inline-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 68px;
  padding: 0.22rem 0.5rem;
  border-radius: 999px;
  font-family: 'Gabarito', sans-serif;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.ct-inline-status.is-original {
  background: linear-gradient(180deg, rgba(120, 255, 211, 0.16), rgba(76, 214, 170, 0.1));
  border-color: rgba(97, 241, 192, 0.3);
  color: #9dffe1;
}

.ct-inline-status.is-custom {
  background: linear-gradient(180deg, rgba(255, 199, 107, 0.18), rgba(255, 145, 77, 0.12));
  border-color: rgba(255, 185, 88, 0.3);
  color: #ffd98d;
}

/* Pickr color bar spanning the two right grid cols */
.ct-pickr {
  width: 100%;
  margin: 0;
  height: 13px;
}
.sidebar .pickr {
  margin-top: 6px;
}
.sidebar .pickr .pcr-button {
  width: 100% !important;
  height: 13px !important;
  border-radius: 5px !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

/* Select inside a ct-group */
.ct-group select {
  width: 100%;
  margin: 0;
  padding: 0.48rem 0.6rem;
  font-size: 0.85rem;
  font-family: 'Gabarito', sans-serif;
  background: #333;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  border-radius: 6px;
  box-sizing: border-box;
  outline: none;
  cursor: pointer;
  font-weight: 400;
  transition: border-color 0.15s;
}
.ct-group select:focus {
  border-color: rgba(0, 255, 255, 0.35);
}
.ct-group select option {
  background: #333;
  color: white;
}

/* Network logo search inside a card */
.ct-group .network-logo-search-container {
  margin-bottom: 8px;
}
.ct-group #network-logo-search {
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.07);
  padding: 8px 10px;
  font-size: 0.85rem;
  font-family: 'Gabarito', sans-serif;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 0;
  transition: border-color 0.15s;
}
.ct-group #network-logo-search:focus {
  outline: none;
  border-color: rgba(0, 255, 255, 0.35);
}

/* Canvas drop highlight */
.canvas-container.drop-active {
  outline: 3px dashed rgba(0, 255, 255, 0.5);
  outline-offset: -3px;
  border-radius: 4px;
}

/* Designer slider — matches #logo-scale-slider exactly */
.designer-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 5px;
  border-radius: 3px;
  background: linear-gradient(to right, #00bfa5, #8e24aa);
  margin: 0;
  padding: 0;
  outline: none;
  transition: background 0.3s;
}
.designer-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: white;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  border: none;
}
.designer-slider::-moz-range-thumb {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: white;
  border: none;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}
.designer-slider::-webkit-slider-runnable-track {
  height: 5px;
  border-radius: 3px;
  background: linear-gradient(to right, #00bfa5, #8e24aa);
}

/* Fanart.tv key — header widget */
.header-fanart-widget {
  position: relative;
}
.header-fanart-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 5px 12px 5px 10px;
  color: rgba(255, 255, 255, 0.5);
  font-family: 'Gabarito', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
}
.header-fanart-btn svg {
  flex-shrink: 0;
  opacity: 0.6;
}
.header-fanart-btn:hover,
.header-fanart-btn.is-open {
  background: rgba(0, 255, 255, 0.07);
  border-color: rgba(0, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.85);
  transform: none;
  box-shadow: none;
}
.header-fanart-btn.has-key {
  border-color: rgba(0, 255, 255, 0.35);
  color: rgba(0, 255, 255, 0.75);
}
.header-fanart-btn .fanart-chevron {
  font-size: 0.55rem;
  opacity: 0.45;
  margin-left: 2px;
}

.header-fanart-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 150;
  width: 310px;
  background: #111827;
  border: 1px solid rgba(0, 255, 255, 0.18);
  border-radius: 12px;
  padding: 16px 16px 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 255, 255, 0.06);
  box-sizing: border-box;
}
.header-fanart-label {
  font-family: 'Gabarito', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.7);
  margin: 0 0 10px;
}
.header-fanart-optional {
  display: block;
  font-size: 0.72rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.3);
  margin-top: 2px;
}
.header-fanart-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}
.header-fanart-row input {
  flex: 1;
  min-width: 0;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  color: white;
  font-family: 'Gabarito', sans-serif;
  font-size: 0.82rem;
  padding: 6px 10px;
  outline: none;
  transition: border-color 0.15s;
}
.header-fanart-row input:focus {
  border-color: rgba(0, 255, 255, 0.45);
}
.header-fanart-save {
  flex-shrink: 0;
  background: rgba(0, 255, 255, 0.12);
  border: 1px solid rgba(0, 255, 255, 0.3);
  border-radius: 7px;
  color: #00fff0;
  font-family: 'Gabarito', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 14px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.header-fanart-save:hover {
  background: rgba(0, 255, 255, 0.22);
  border-color: #00fff0;
  transform: none;
  box-shadow: none;
}
.header-fanart-link {
  display: block;
  font-family: 'Gabarito', sans-serif;
  font-size: 0.72rem;
  color: rgba(0, 255, 255, 0.45);
  text-decoration: none;
  text-align: right;
  margin-top: 2px;
}
.header-fanart-link:hover { color: rgba(0, 255, 255, 0.8); }

/* Logo picker source sections */
.clearlogo-source-section {
  width: 100%;
}
.clearlogo-source-section + .clearlogo-source-section {
  padding-top: 16px;
}
.clearlogo-source-label {
  display: inline-flex;
  align-self: flex-start;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.58);
  font-family: 'Gabarito', sans-serif;
  padding: 0 0 0.2rem;
}
.clearlogo-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 10px;
  padding: 2px 0;
}
.designer-optional {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.38);
  font-weight: 400;
}

/* ==========================================
   TOAST NOTIFICATION
   ========================================== */
.toast-notification {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background:
    radial-gradient(circle at top, rgba(0, 255, 240, 0.14), transparent 42%),
    linear-gradient(180deg, rgba(16, 20, 38, 0.985), rgba(7, 10, 22, 0.995));
  color: #e8fffd;
  padding: 0.88rem 1.25rem;
  border-radius: 16px;
  font-family: 'Gabarito', sans-serif;
  font-size: 0.94rem;
  font-weight: 700;
  white-space: normal;
  pointer-events: none;
  opacity: 0;
  z-index: 99999;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow:
    0 22px 42px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(255,255,255,0.04),
    0 0 22px rgba(0, 255, 240, 0.08),
    inset 0 1px 0 rgba(255,255,255,0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  min-width: min(320px, calc(100vw - 32px));
  max-width: min(520px, calc(100vw - 32px));
  line-height: 1.45;
  letter-spacing: 0.012em;
  text-align: center;
  text-shadow: 0 0 10px rgba(0, 255, 240, 0.06);
}
.toast-notification.toast-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ═══════════════════════════════════════════════════════════
   QUICK EDIT BAR
   ═══════════════════════════════════════════════════════════ */

/* Canvas column — flex column that stacks toggle pill → edit bar → canvas */
.po-canvas-col {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  /* width driven by the canvas-container (550px) inside it */
}

/* Workspace wrapper: transparent layout container — children become direct flex items
   of main-content and center independently. */
.po-workspace {
  display: contents;
}

/* Unit that holds the toggle pill + edit bar — max-content so width = content only,
   never influenced by anything above or below */
.po-eb-unit {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: max-content;
}

/* Row that places canvas and metadata panel side-by-side */
.po-canvas-meta-row {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  align-items: flex-start;
  flex-wrap: wrap;
  justify-content: flex-start;
  margin-top: 18px;  /* gap between edit bar and canvas/metadata */
}

/* Toggle pill sits directly above the edit bar */
.po-eb-toggle-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(0, 255, 240, 0.07);
  border: 1px solid rgba(0, 255, 240, 0.2);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  color: rgba(0, 255, 240, 0.75);
  font-size: 11px;
  font-family: 'Gabarito', sans-serif;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 12px;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
  width: 100%;
  box-sizing: border-box;
}
.po-eb-toggle-pill:hover {
  background: rgba(0, 255, 240, 0.12);
  color: #00fff0;
}
/* When collapsed: restore full rounded corners */
.po-eb-toggle-pill[aria-expanded="false"] {
  border-bottom: 1px solid rgba(0, 255, 240, 0.2);
  border-radius: 8px;
  margin-bottom: 8px;
}

.po-eb-chevron {
  transition: transform 0.25s ease;
}
.po-eb-toggle-pill[aria-expanded="false"] .po-eb-chevron {
  transform: rotate(180deg);
}

.po-edit-bar {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(0, 255, 240, 0.18);
  border-top: none;
  border-radius: 0 0 10px 10px;
  backdrop-filter: blur(8px);
  box-sizing: border-box;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  max-height: 150px;
  opacity: 1;
  transition: max-height 0.3s ease, opacity 0.25s ease, padding 0.25s ease;
}
.po-edit-bar.po-eb-collapsed {
  max-height: 0;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
  overflow: hidden;
  pointer-events: none;
}

/* Each explicit row inside the edit bar */
.po-eb-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  width: 100%;
  flex-wrap: nowrap;
}

/* Row 2 (Title Logo + Season Label) — subtle top separator; wraps if season label is too wide */
.po-eb-row-2 {
  padding-top: 6px;
  margin-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  flex-wrap: nowrap;
}

.po-eb-group {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: nowrap;
  flex-shrink: 0;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  padding: 4px 9px;
}

.po-eb-group-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(0, 255, 240, 0.8);
  margin-right: 3px;
  padding-right: 6px;
  border-right: 1px solid rgba(0, 255, 240, 0.18);
  white-space: nowrap;
}

.po-eb-label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
  white-space: nowrap;
}

.po-eb-sep {
  width: 1px;
  height: 100%;
  background: transparent;
  margin: 0 2px;
  flex-shrink: 0;
}

.po-eb-divider {
  width: 1px;
  height: 20px;
  background: rgba(255, 255, 255, 0.1);
  margin: 0 2px;
}

/* Buttons */
.po-eb-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(180deg, rgba(255,255,255,0.11), rgba(255,255,255,0.045));
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  color: #fff;
  font-size: 11px;
  font-family: 'Gabarito', sans-serif;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.55rem 0.8rem;
  cursor: pointer;
  transition: none;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 10px 22px rgba(0,0,0,0.14);
}
.po-eb-btn:hover {
  background: linear-gradient(180deg, rgba(255,255,255,0.15), rgba(255,255,255,0.06));
  border-color: rgba(255,255,255,0.18);
}
.po-eb-btn svg { flex-shrink: 0; }

.po-eb-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(255,255,255,0.11), rgba(255,255,255,0.045));
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  box-sizing: border-box;
  color: rgba(255, 255, 255, 0.5);
  font-size: 10px;
  font-family: 'Gabarito', sans-serif;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.42rem 0.62rem;
  cursor: pointer;
  transition: none;
  white-space: nowrap;
  min-width: 30px;
  min-height: 30px;
  line-height: 1;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 10px 22px rgba(0,0,0,0.14);
}
.po-eb-toggle-btn[aria-pressed="true"] {
  background: linear-gradient(90deg, #00bfa5 0%, #8e24aa 100%);
  border-color: rgba(181, 123, 255, 0.34);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 10px 22px rgba(0,0,0,0.14);
}
.po-eb-toggle-btn:hover {
  border-color: rgba(255,255,255,0.18);
  color: #fff;
}

.po-eb-action-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 11px;
  font-family: 'Gabarito', sans-serif;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.58rem 0.82rem;
  cursor: pointer;
  white-space: nowrap;
  transition: none;
}
.po-eb-action-btn:hover { opacity: 1; transform: none; }
.po-eb-dl {
  background: linear-gradient(135deg, #5a94ff, #356dff);
  border-color: rgba(126, 171, 255, 0.34);
  color: #fff;
}
.po-eb-reset {
  background: linear-gradient(135deg, #ff7f92, #f14f72 55%, #d83d60 100%);
  border-color: rgba(255,135,158,0.34);
  color: #fff;
}
.po-eb-emby {
  background: linear-gradient(135deg, #44d48e, #24b86f);
  border-color: rgba(113, 224, 161, 0.32);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 12px 26px rgba(36, 184, 111, 0.24);
}
.po-eb-emby:hover { opacity: 1 !important; box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 12px 26px rgba(36, 184, 111, 0.24); }

/* Select */
.po-eb-select {
  background: #333;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: white;
  font-size: 0.85rem;
  font-family: 'Gabarito', sans-serif;
  font-weight: 400;
  padding: 0.48rem 2rem 0.48rem 0.6rem;
  cursor: pointer;
  outline: none;
  max-width: 110px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23FFFFFF%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: right 0.7rem top 50%;
  background-size: 0.65rem auto;
}
.po-eb-select option { background: #333; color: white; }
.po-eb-select:focus { border-color: rgba(0, 255, 240, 0.4); }

/* Text input */
.po-eb-text {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 6px;
  color: #fff;
  font-size: 12px;
  font-family: 'Gabarito', sans-serif;
  padding: 5px 8px;
  width: 90px;
  outline: none;
}
.po-eb-text:focus { border-color: rgba(0, 255, 240, 0.4); }
.po-eb-text::placeholder { color: rgba(255,255,255,0.3); }

/* Slider + range buttons */
.po-eb-range-btn {
  background: linear-gradient(180deg, rgba(255,255,255,0.11), rgba(255,255,255,0.045));
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: none;
  flex-shrink: 0;
  padding: 0;
}
.po-eb-range-btn:hover { background: linear-gradient(180deg, rgba(255,255,255,0.15), rgba(255,255,255,0.06)); }

.po-eb-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 65px;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(to right, #00bfa5, #8e24aa);
  outline: none;
  cursor: pointer;
  flex-shrink: 0;
}
.po-eb-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.po-eb-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  border: none;
  cursor: pointer;
}

.po-eb-val {
  font-size: 11px;
  color: #00fff0;
  min-width: 36px;
  text-align: right;
  white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════
   SEASON SUITE — panel below canvas / metadata
   ═══════════════════════════════════════════════════════════ */

.season-suite-panel {
  width: max-content;
  min-width: 480px;
  max-width: min(90vw, 1600px);
  margin-top: 18px;
  padding: 14px 16px 16px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  box-shadow: 0 4px 28px rgba(0, 0, 0, 0.35);
  box-sizing: border-box;
}

.season-suite-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.season-suite-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.75);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.season-suite-count {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.35);
  font-weight: 400;
}

.season-download-all-btn {
  margin-left: auto;
  padding: 4px 13px;
  font-size: 0.68rem;
  font-weight: 700;
  background: linear-gradient(135deg, rgba(255,255,255,0.09), rgba(255,255,255,0.04));
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.15s, box-shadow 0.15s;
  font-family: inherit;
}

.season-download-all-btn:hover {
  background: linear-gradient(135deg, rgba(0, 191, 165, 0.18), rgba(142, 36, 170, 0.14));
  border-color: rgba(0, 255, 240, 0.32);
  color: #00fff0;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
}

.season-download-all-btn:disabled {
  opacity: 0.38;
  cursor: default;
  pointer-events: none;
}

.season-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Outer wrapper: the actual grid item */
.season-card-outer {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 108px;
  flex-shrink: 0;
}

.season-card {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  background: rgba(255, 255, 255, 0.06);
  transition: border-color 0.18s ease, transform 0.15s ease, box-shadow 0.18s ease;
}

.season-card:hover {
  border-color: rgba(0, 255, 240, 0.55);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 10px rgba(0, 255, 240, 0.08);
}

.season-card.active {
  border-color: #00fff0;
  box-shadow: 0 0 18px rgba(0, 255, 240, 0.4), 0 4px 16px rgba(0, 0, 0, 0.4);
}

.season-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.season-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.3);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.season-card-label {
  font-size: 0.68rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
  padding: 0 2px;
}

.season-card-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.6);
  border-radius: 9px;
}

/* ── Season Label sidebar card controls ──────────────────── */

.ct-text-input {
  width: 100%;
  box-sizing: border-box;
  background: #333;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  color: #fff;
  padding: 0.48rem 0.6rem;
  font-size: 0.85rem;
  font-family: 'Gabarito', sans-serif;
  font-weight: 400;
  transition: border-color 0.15s;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.ct-text-input:focus {
  outline: none;
  border-color: rgba(0, 255, 240, 0.45);
}

select.ct-text-input {
  -webkit-appearance: auto;
  -moz-appearance: auto;
  appearance: auto;
  background-image: none;
  padding-right: 0.6rem;
  cursor: pointer;
}

select.ct-text-input option {
  background: #333;
  color: white;
}

select.ct-text-input.is-custom-font,
.mobile-input-group select.is-custom-font {
  border-color: rgba(0, 255, 240, 0.52);
  box-shadow: 0 0 0 3px rgba(0, 255, 240, 0.1);
  background: linear-gradient(180deg, rgba(0,255,240,0.08), rgba(255,255,255,0.04));
}

select.ct-text-input.is-missing-custom-font,
.mobile-input-group select.is-missing-custom-font {
  border-color: rgba(255, 180, 92, 0.55);
  box-shadow: 0 0 0 3px rgba(255, 180, 92, 0.09);
}

.ct-font-upload-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.ct-font-upload-status {
  font-size: 0.76rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.35;
}

.ct-remove-font-btn {
  align-items: center;
  justify-content: center;
  color: #ffd0d0;
  border-color: rgba(255, 120, 120, 0.24);
  text-align: center;
}

.ct-remove-font-btn:hover {
  border-color: rgba(255, 120, 120, 0.4);
  background: rgba(255, 120, 120, 0.12);
}

.designer-text-logo-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 6px;
}

.ct-text-input--multiline {
  min-height: 86px;
  resize: vertical;
  line-height: 1.35;
}

.ct-note {
  margin: 0;
  font-size: 0.76rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.58);
}

.mobile-font-upload-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.mobile-font-upload-status {
  font-size: 0.76rem;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.58);
}

.mobile-config-btn--danger {
  align-items: center;
  justify-content: center;
  border-color: rgba(255, 120, 120, 0.28);
  color: #ffd0d0;
  text-align: center;
}

.mobile-config-btn--danger:hover {
  background: rgba(255, 120, 120, 0.12);
  border-color: rgba(255, 120, 120, 0.4);
}

/* Full-width clickable color swatch bar (mirrors Network Logo Pickr bar) */
.season-label-color-bar {
  width: 100%;
  height: 13px;
  border-radius: 5px;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.15);
  margin-top: 4px;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}
.season-label-color-bar:hover {
  border-color: rgba(0, 255, 240, 0.45);
  box-shadow: 0 0 6px rgba(0, 255, 240, 0.2);
}

/* Season card browse icon overlay */
.season-card-browse {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.72);
  border: 1px solid rgba(0, 255, 240, 0.45);
  border-radius: 8px;
  color: #00fff0;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.18s ease, background 0.15s;
  pointer-events: none;
  z-index: 2;
}
.season-card-browse svg {
  width: 13px;
  height: 13px;
}
.season-card:hover .season-card-browse {
  opacity: 1;
  pointer-events: all;
}
.season-card-browse:hover {
  background: rgba(0, 255, 240, 0.18);
}
.season-card-emby-badge {
  position: absolute;
  bottom: 6px;
  left: 6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(52, 181, 75, 0.92);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.55);
  pointer-events: none;
  z-index: 3;
}

/* ════════════════════════════════════════════════════
   Config dropdown (header)
════════════════════════════════════════════════════ */
.config-dropdown {
  position: relative;
  display: inline-block;
}

.config-dropdown-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: #12162a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  min-width: 220px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(0, 0, 0, 0.3);
  z-index: 5000;
  padding: 6px 0;
  overflow: hidden;
  animation: dropdownFadeIn 0.15s ease-out;
}

@keyframes dropdownFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.config-dropdown-menu.show {
  display: block;
}

/* ── Action rows ── */
.config-menu-item {
  width: 100%;
  box-sizing: border-box;
  min-height: 36px;
  padding: 9px 14px;
  background: transparent;
  border: none;
  border-radius: 0;
  color: rgba(255, 255, 255, 0.82);
  font-family: "Gabarito", sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  transition: background 0.1s, color 0.1s;
  margin: 0;
  opacity: 1;
}

.config-menu-item:hover {
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.97);
}

.menu-icon {
  width: 14px;
  height: 14px;
  filter: brightness(0) invert(1);
  opacity: 0.6;
  flex-shrink: 0;
  transition: opacity 0.1s;
}

.config-menu-item:hover .menu-icon {
  opacity: 0.88;
}

.menu-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 5px 0;
}

/* ── Fanart section ── */
.config-fanart-section {
  margin: 0;
  padding: 0;
}

/* Connected / key-saved state */
.config-fanart-connected {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 9px 14px;
  background: transparent;
  border: none;
  box-sizing: border-box;
}

.config-fanart-connected-label {
  flex: 1;
  font-family: 'Gabarito', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
}

.config-fanart-change-btn {
  height: 24px;
  padding: 0 9px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 5px;
  font-family: 'Gabarito', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.48);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.config-fanart-change-btn:hover {
  border-color: rgba(255, 255, 255, 0.28);
  color: rgba(255, 255, 255, 0.82);
}

/* Expanded / API key entry state */
.config-fanart-expanded {
  display: grid;
  gap: 0;
  padding: 14px 14px 18px;
}

.config-fanart-label {
  font-family: 'Gabarito', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 10px 0;
}

.config-fanart-hint { display: none; }

.config-fanart-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.config-fanart-input {
  flex: 1;
  min-width: 0;
  height: 30px;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  color: rgba(255, 255, 255, 0.9);
  font-family: 'Gabarito', sans-serif;
  font-size: 0.78rem;
  padding: 0 9px;
  outline: none;
  transition: border-color 0.15s;
  display: block;
}

.config-fanart-input:focus {
  border-color: rgba(0, 255, 255, 0.38);
}

.config-fanart-actions { display: none; }

.config-fanart-save {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  color: rgba(255, 255, 255, 0.78);
  font-family: 'Gabarito', sans-serif;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s;
}

.config-fanart-save:hover {
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(255, 255, 255, 0.2);
}

.config-fanart-link { display: none; }

/* ════════════════════════════════════════════════════
   Config buttons (legacy sidebar — kept for reference)
════════════════════════════════════════════════════ */
.config-group { margin-top: 10px; }

.config-btn-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 6px;
}

.config-btn {
  background: transparent;
  color: #00fff0;
  border: 1px solid #00fff0;
  border-radius: 6px;
  padding: 6px 4px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  text-align: center;
  white-space: nowrap;
}
.config-btn:hover {
  background: rgba(0, 255, 240, 0.15);
}
.config-btn:active {
  background: rgba(0, 255, 240, 0.28);
}

/* ── Config load modal ─────────────────────────── */
.config-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 14, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1.5rem;
}

.config-modal-box {
  background:
    radial-gradient(circle at top, rgba(0, 255, 240, 0.08), transparent 40%),
    linear-gradient(180deg, rgba(18, 22, 42, 0.96), rgba(10, 12, 28, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  width: min(500px, 100%);
  max-height: min(86vh, 920px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 0 1px rgba(255, 255, 255, 0.02);
  position: relative;
}

.config-modal-box::before {
  content: '';
  display: block;
  width: 58px;
  height: 4px;
  margin: 1rem auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #00fff0, #b57bff);
  box-shadow: 0 0 18px rgba(0,255,240,0.24);
}

/* Wider/taller variant used by load / season presets list modals */
.cfgm-box {
  width: min(720px, 100%);
  max-height: 90vh;
}

.config-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.35rem 0.95rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  color: #f4fbff;
  font-size: 1rem;
  font-weight: 800;
}

.config-modal-close {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.74);
  width: 34px;
  height: 34px;
  border-radius: 999px;
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.config-modal-close:hover {
  color: #fff;
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.16);
  transform: translateY(-1px);
}

.config-modal-body {
  overflow-y: auto;
  padding: 0.4rem 0.35rem 0.55rem;
  flex: 1;
}

.config-empty {
  color: rgba(255,255,255,0.5);
  font-size: 0.86rem;
  text-align: center;
  padding: 1.5rem;
}

/* ── New config modal row system (cfgm-*) ─────────────────── */
.cfgm-toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 0.85rem 1.2rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.cfgm-search {
  flex: 1;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  color: #e7eff5;
  font-size: 0.88rem;
  outline: none;
}
.cfgm-search:focus { border-color: rgba(0,255,240,0.4); box-shadow: 0 0 0 3px rgba(0,255,240,0.08); }
.cfgm-sort {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 0.7rem 0.85rem;
  color: #dfe6ee;
  font-size: 0.82rem;
  cursor: pointer;
  outline: none;
  flex-shrink: 0;
}
.cfgm-sort:focus { border-color: rgba(0,255,240,0.4); box-shadow: 0 0 0 3px rgba(0,255,240,0.08); }
.cfgm-sort option { background: #14192f; }

.cfgm-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0.85rem 1rem;
  margin: 0.4rem 0.55rem;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.025));
  transition: background 0.12s, border-color 0.12s, transform 0.12s;
}
.cfgm-row:last-child { border-bottom: 1px solid rgba(255,255,255,0.08); }
.cfgm-row:hover {
  background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.035));
  border-color: rgba(0,255,240,0.16);
  transform: translateY(-1px);
}

.cfgm-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}
.cfgm-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: #f4fbff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cfgm-type-movie      { border-left: none; }
.cfgm-type-tv         { border-left: none; }
.cfgm-type-collection { border-left: none; }
.cfgm-type-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
  position: relative;
  top: -1px;
}
.cfgm-type-text {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.7;
  margin-right: 2px;
}
.cfgm-date-sep {
  margin-right: 5px;
  opacity: 0.35;
}
.cfgm-date {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.46);
  margin-top: 0.2rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cfgm-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 0.42rem;
  min-width: 0;
  flex-wrap: wrap;
}

.cfgm-font-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.18rem 0.46rem;
  border-radius: 999px;
  background: rgba(0, 255, 240, 0.1);
  border: 1px solid rgba(0, 255, 240, 0.18);
  color: #9efbf3;
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.cfgm-font-list,
.cfgm-font-muted {
  min-width: 0;
  font-size: 0.74rem;
  line-height: 1.35;
}

.cfgm-font-list {
  color: rgba(255,255,255,0.7);
}

.cfgm-font-muted {
  color: rgba(255,255,255,0.42);
}

.cfgm-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

/* Icon-only rename / delete buttons */
.cfgm-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  opacity: 0.8;
}
.cfgm-row:hover .cfgm-btn { opacity: 1; }
.cfgm-btn svg { width: 13px; height: 13px; pointer-events: none; }

.cfgm-rename { color: rgba(255,255,255,0.72); }
.cfgm-rename:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.15); color: #fff; }

.cfgm-delete { color: #ff6b6b; }
.cfgm-delete:hover { background: rgba(255,107,107,0.12); border-color: rgba(255,107,107,0.4); }

/* Primary load / apply button */
.cfgm-load {
  background: linear-gradient(135deg, rgba(255,255,255,0.12), rgba(255,255,255,0.05));
  color: #fff;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  padding: 0.55rem 0.95rem;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}
.cfgm-load:hover {
  background: linear-gradient(135deg, rgba(0,255,240,0.16), rgba(153,69,255,0.14));
  border-color: rgba(0,255,240,0.24);
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.14);
}

.cfgm-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0.9rem 1.2rem 1.1rem;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.cfgm-page-btn {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  color: #eef7fb;
  padding: 0.58rem 0.88rem;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
}

.cfgm-page-btn:hover:not(:disabled) {
  border-color: rgba(0,255,240,0.24);
  background: rgba(0,255,240,0.08);
}

.cfgm-page-btn:disabled {
  opacity: 0.42;
  cursor: default;
}

.cfgm-page-status {
  color: rgba(255,255,255,0.62);
  font-size: 0.76rem;
  font-weight: 600;
}

/* Count badge next to modal title */
.cfg-modal-count {
  color: rgba(255,255,255,0.48);
  font-size: 0.8rem;
  font-weight: 600;
}

/* Small modal variant (save / import choice) */
.config-modal-box--sm { width: min(360px, 90vw); }

/* Save config form */
.config-save-form {
  padding: 0.95rem 1.2rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.config-save-input {
  width: 100%;
  box-sizing: border-box;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 12px;
  padding: 0.82rem 0.95rem;
  color: #e7eff5;
  font-size: 0.88rem;
  outline: none;
}
.config-save-input:focus { border-color: rgba(0,255,240,0.5); box-shadow: 0 0 0 3px rgba(0,255,240,0.08); }
.config-save-actions { display: flex; gap: 8px; justify-content: flex-end; }

.config-modal-confirm-btn {
  background: linear-gradient(135deg, rgba(0,255,240,0.16), rgba(153,69,255,0.14));
  color: #fff;
  border: 1px solid rgba(0,255,240,0.24);
  border-radius: 999px;
  padding: 0.7rem 1rem;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.config-modal-confirm-btn:hover {
  background: linear-gradient(135deg, rgba(0,255,240,0.22), rgba(153,69,255,0.18));
  border-color: rgba(0,255,240,0.32);
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.14);
}

.config-modal-cancel-btn {
  background: linear-gradient(135deg, rgba(255,255,255,0.09), rgba(255,255,255,0.03));
  color: rgba(255,255,255,0.86);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  padding: 0.7rem 1rem;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.config-modal-cancel-btn:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.14);
}

/* Import choice body */
.import-choice-body { padding: 0.95rem 1.2rem 1.2rem; }
.import-choice-body p { color: rgba(255,255,255,0.76); font-size: 0.88rem; margin: 0 0 0.75rem; line-height: 1.6; }
.import-choice-body strong { color: #bffdf7; }
.import-choice-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 1rem;
}
.import-choice-actions .config-modal-confirm-btn,
.import-choice-actions .config-modal-cancel-btn {
  width: 100%;
  text-align: center;
  padding: 8px;
}

/* Season label preset row — compact single-line buttons */
.season-style-btns {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.season-style-btns .action-button.ct-primary-btn {
  font-size: 0.6rem !important;
  padding: 0.28rem 0.38rem !important;
  min-height: 0 !important;
  white-space: nowrap;
  overflow: hidden;
  gap: 4px !important;
}
.season-style-btns .action-icon {
  width: 11px !important;
  height: 11px !important;
  min-width: 11px !important;
  min-height: 11px !important;
  margin-right: 0 !important;
  filter: none !important;
}

/* ══════════════════════════════════════════════════════
   What's New button & badge
══════════════════════════════════════════════════════ */
.whats-new-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0.68rem 0.96rem !important;
  background: linear-gradient(180deg, rgba(255,255,255,0.11), rgba(255,255,255,0.045)) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 10px 22px rgba(0,0,0,0.14) !important;
}

.whats-new-btn:hover {
  background: linear-gradient(180deg, rgba(255,255,255,0.15), rgba(255,255,255,0.06)) !important;
  border-color: rgba(255,255,255,0.18) !important;
  transform: none !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 10px 22px rgba(0,0,0,0.14) !important;
}

.whats-new-badge {
  font-size: 0.62rem;
  font-weight: 700;
  padding: 0.26rem 0.5rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #5a94ff, #356dff);
  color: white;
  letter-spacing: 0.08em;
  animation: none;
  line-height: 1;
  flex-shrink: 0;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.8; transform: scale(0.95); }
}

/* ══════════════════════════════════════════════════════
   Changelog Modal
══════════════════════════════════════════════════════ */
.changelog-overlay {
  display: none;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(4, 6, 14, 0.8) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 999999 !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 1.5rem;
}

.changelog-modal {
  background:
    radial-gradient(circle at top, rgba(0, 255, 240, 0.08), transparent 40%),
    linear-gradient(180deg, rgba(18, 22, 42, 0.96), rgba(10, 12, 28, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  padding: 1.9rem 1.85rem 1.4rem;
  max-width: 760px;
  width: min(760px, 100%);
  max-height: min(86vh, 920px);
  display: flex;
  flex-direction: column;
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 0 1px rgba(255, 255, 255, 0.02);
  position: relative;
  z-index: 1000000;
  animation: modalSlideIn 0.3s ease;
}

.changelog-modal::before {
  content: '';
  display: block;
  width: 58px;
  height: 4px;
  margin: 0 auto 1rem;
  border-radius: 999px;
  background: linear-gradient(90deg, #00fff0, #b57bff);
  box-shadow: 0 0 18px rgba(0,255,240,0.24);
}

@keyframes modalSlideIn {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.changelog-modal h3 {
  margin: 0 0 1.15rem 0;
  font-size: 2rem;
  line-height: 1.05;
  font-weight: 800;
  background: linear-gradient(90deg, #ffffff 0%, #bffdf7 36%, #d3c3ff 78%, #ffffff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.changelog-content {
  flex: 1;
  overflow-y: auto;
  margin-bottom: 1.35rem;
  padding-right: 10px;
}

.changelog-content::-webkit-scrollbar { width: 6px; }
.changelog-content::-webkit-scrollbar-track { background: rgba(255,255,255,0.05); border-radius: 999px; }
.changelog-content::-webkit-scrollbar-thumb { background: linear-gradient(180deg, rgba(0,212,200,0.45), rgba(153,69,255,0.55)); border-radius: 999px; }
.changelog-content::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, rgba(0,212,200,0.6), rgba(153,69,255,0.7)); }

.changelog-release {
  margin-bottom: 1.2rem;
  padding: 1.05rem 1.1rem 0.35rem;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.025));
  border: 1px solid rgba(255,255,255,0.07);
}
.changelog-release:last-child { margin-bottom: 0; }

.changelog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.9rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
}
.changelog-header:hover { border-bottom-color: rgba(255, 255, 255, 0.16); }

.changelog-header-left {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.changelog-header h4 {
  margin: 0;
  font-size: 1.06rem;
  font-weight: 800;
  color: #f4fbff;
}

.changelog-version-label {
  display: inline-flex;
  align-items: center;
  padding: 0;
  border-radius: 0;
  letter-spacing: 0.01em;
}

.changelog-version-label.is-major {
  position: relative;
  padding: 0.42rem 0.82rem 0.4rem;
  border-radius: 999px;
  border: 1px solid rgba(126, 222, 255, 0.42);
  background:
    linear-gradient(135deg, rgba(0, 225, 255, 0.3), rgba(89, 135, 255, 0.34) 44%, rgba(183, 94, 255, 0.3)),
    linear-gradient(180deg, rgba(255,255,255,0.16), rgba(255,255,255,0.04));
  box-shadow: 0 14px 30px rgba(8, 16, 38, 0.42), 0 0 0 1px rgba(255,255,255,0.05), 0 0 26px rgba(72, 172, 255, 0.2), inset 0 1px 0 rgba(255,255,255,0.2);
  color: #ffffff;
  text-shadow: 0 1px 10px rgba(76, 182, 255, 0.2);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.changelog-version-label.is-major::before {
  content: 'Major Release';
  display: inline-flex;
  align-items: center;
  margin-right: 0.55rem;
  padding-right: 0.55rem;
  border-right: 1px solid rgba(255,255,255,0.22);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  color: rgba(214, 247, 255, 0.98);
}

.changelog-date {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.changelog-toggle {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  border-radius: 999px;
}
.changelog-toggle:hover { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.95); }
.changelog-toggle svg { transition: transform 0.2s ease; }
.changelog-toggle.collapsed svg { transform: rotate(-90deg); }

.changelog-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.changelog-groups {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.changelog-group {
  padding: 0.8rem 0 0.2rem;
  border-radius: 0;
  background: transparent;
  border: none;
}

.changelog-group + .changelog-group {
  border-top: 1px solid rgba(255,255,255,0.06);
  margin-top: 0.1rem;
  padding-top: 0.9rem;
}

.changelog-group-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding-bottom: 0.35rem;
  margin-bottom: 0.05rem;
  border-bottom: none;
}

.changelog-group-badge {
  display: inline-flex;
  align-items: center;
  gap: 0;
  min-height: auto;
  padding: 0;
  border-radius: 0;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: none;
  box-shadow: none;
}

.changelog-group-badge::before {
  content: none;
}

.changelog-badge-feature {
  background: transparent;
  color: #9fc3ff;
  text-shadow: 0 0 18px rgba(117,167,255,0.16);
}

.changelog-badge-feature::before {
  background: linear-gradient(135deg, #75a7ff, #4b82ff);
}

.changelog-badge-improvement {
  background: transparent;
  color: #cebaff;
  text-shadow: 0 0 18px rgba(184,161,255,0.14);
}

.changelog-badge-improvement::before {
  background: linear-gradient(135deg, #b8a1ff, #8c72ff);
}

.changelog-badge-fix {
  background: transparent;
  color: #ffbeb7;
  text-shadow: 0 0 18px rgba(255,147,140,0.12);
}

.changelog-badge-fix::before {
  background: linear-gradient(135deg, #ff938c, #f36a61);
}

.changelog-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 0.68rem 0;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.93rem;
  line-height: 1.62;
}

.changelog-item-marker {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 0.56rem;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.05);
}

.changelog-item-text {
  display: block;
  width: 100%;
  color: rgba(255,255,255,0.84);
  font-weight: 500;
}

.changelog-item-featured {
  position: relative;
}

.changelog-item-featured .changelog-item-text {
  color: #9fd7ff;
  font-weight: 600;
}

.changelog-item-featured .changelog-item-marker {
  box-shadow: 0 0 0 3px rgba(117,167,255,0.06);
}

.changelog-feature .changelog-item-marker     { background: linear-gradient(135deg, #75a7ff, #4b82ff); }
.changelog-improvement .changelog-item-marker { background: linear-gradient(135deg, #b8a1ff, #8c72ff); }
.changelog-fix .changelog-item-marker         { background: linear-gradient(135deg, #ff938c, #f36a61); }

.changelog-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.changelog-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  user-select: none;
}
.changelog-checkbox input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; accent-color: #8e24aa; }
.changelog-checkbox:hover { color: rgba(255,255,255,0.9); }

.changelog-footer .custom-btn {
  background: linear-gradient(135deg, rgba(255,255,255,0.12), rgba(255,255,255,0.05));
  border-color: rgba(255,255,255,0.12);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.changelog-footer .custom-btn:hover {
  background: linear-gradient(135deg, rgba(0,212,200,0.16), rgba(153,69,255,0.14));
  border-color: rgba(0,212,200,0.24);
  box-shadow: 0 10px 24px rgba(0,0,0,0.18);
}

@media (max-width: 768px) {
  .changelog-modal { padding: 1.4rem 1.15rem 1.1rem; max-height: 90vh; }
  .changelog-modal h3 { font-size: 1.65rem; }
  .changelog-footer { flex-direction: column; align-items: stretch; }
  .changelog-footer .custom-btn { width: 100%; }
}

/* ==========================================
   GUIDED TOUR
   ========================================== */
#tour-root {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  pointer-events: none;
}

.tour-panel {
  position: fixed;
  background: rgba(0, 0, 0, 0.72);
  pointer-events: all;
}

#tour-ring {
  position: fixed;
  z-index: 10001;
  border: 2px solid #00bfa5;
  border-radius: 10px;
  box-shadow: 0 0 0 4px rgba(0, 191, 165, 0.18), 0 0 24px rgba(0, 191, 165, 0.3);
  pointer-events: none;
  animation: tourPulse 2s ease-in-out infinite;
}

@keyframes tourPulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(0, 191, 165, 0.18), 0 0 24px rgba(0, 191, 165, 0.3); }
  50%       { box-shadow: 0 0 0 7px rgba(0, 191, 165, 0.1),  0 0 36px rgba(0, 191, 165, 0.45); }
}

#tour-arrow {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10001;
  overflow: visible;
  display: none;
}

#tour-arrow-line {
  stroke: rgba(121,160,255,0.72);
  filter: drop-shadow(0 0 10px rgba(121,160,255,0.18));
  animation: tourArrowFlow 1.4s linear infinite;
}

@keyframes tourArrowFlow {
  to { stroke-dashoffset: -18; }
}

#tour-card {
  position: fixed;
  z-index: 10002;
  width: 660px;
  height: 455px;
  max-width: calc(100vw - 28px);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.025), transparent 18%),
    radial-gradient(circle at top, rgba(79, 125, 255, 0.08), transparent 42%),
    linear-gradient(180deg, rgba(18, 22, 42, 0.96), rgba(10, 12, 28, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 22px;
  padding: 1.55rem 1.75rem 1.35rem;
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.48),
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 0 0 1px rgba(255,255,255,0.02);
  pointer-events: all;
  display: flex;
  flex-direction: column;
  gap: 0;
  box-sizing: border-box;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

#tour-card::before { display: none; }

.tour-card-center {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
}

/* Spotlight steps: card pinned bottom-centre, never moves */
.tour-card-fixed {
  position: fixed !important;
  top: auto !important;
  transform: none !important;
}

.tour-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

#tour-counter {
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(121, 160, 255, 0.9);
}

#tour-skip {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.38);
  font-size: 0.72rem;
  font-family: 'Gabarito', sans-serif;
  cursor: pointer;
  padding: 0;
  transition: color 0.18s;
}
#tour-skip:hover { color: rgba(255, 255, 255, 0.7); }

#tour-card-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #f4fbff;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin: 0 0 0.95rem;
}

#tour-card-body {
  margin: 0 0 1.05rem;
  font-size: 1rem;
  color: rgba(255,255,255,0.8);
  line-height: 1.66;
  font-family: 'Gabarito', sans-serif;
  flex: 0 0 auto;
}

#tour-card-tips {
  margin: 0;
  padding: 1rem 1.1rem 1.05rem;
  list-style: none;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  gap: 0.68rem;
  flex: 1 1 auto;
  min-height: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.018));
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.075);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.035);
}

#tour-card-tips li {
  font-size: 0.88rem;
  font-family: 'Gabarito', sans-serif;
  color: rgba(255,255,255,0.62);
  line-height: 1.52;
  padding-left: 1.08rem;
  position: relative;
  display: flex;
  align-items: center;
}

#tour-card-tips li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.42em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(121, 160, 255, 0.92);
  opacity: 0.85;
}

.tour-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 0.95rem;
  margin-top: 0.95rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

#tour-dots {
  display: flex;
  gap: 7px;
  align-items: center;
}

.tour-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,0.24), rgba(255,255,255,0.12));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
  opacity: 0.55;
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease, opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.tour-dot.active {
  width: 22px;
  background: linear-gradient(135deg, #75a7ff, #4b82ff);
  opacity: 1;
  transform: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 0 0 1px rgba(126,171,255,0.2), 0 6px 16px rgba(53,109,255,0.22);
}

#tour-prev {
  background: linear-gradient(180deg, rgba(255,255,255,0.11), rgba(255,255,255,0.045));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.82);
  font-family: 'Gabarito', sans-serif;
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.68rem 0.96rem;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 10px 22px rgba(0,0,0,0.14);
}
#tour-prev:hover {
  background: linear-gradient(180deg, rgba(255,255,255,0.15), rgba(255,255,255,0.06));
  border-color: rgba(255,255,255,0.18);
  color: #fff;
}

#tour-next {
  background: linear-gradient(135deg, #5a94ff, #356dff);
  border: 1px solid rgba(126, 171, 255, 0.34);
  border-radius: 12px;
  color: #fff;
  font-family: 'Gabarito', sans-serif;
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.68rem 0.96rem;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, box-shadow 0.18s;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 12px 26px rgba(53, 109, 255, 0.24);
}
#tour-next:hover {
  background: linear-gradient(135deg, #75a7ff, #4b82ff);
  border-color: rgba(155, 191, 255, 0.42);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 12px 26px rgba(53, 109, 255, 0.24);
}

#tour-next.tour-next-finish {
  background: linear-gradient(135deg, #6b9eff, #4d7cff 55%, #3865f3 100%);
  border-color: rgba(148, 188, 255, 0.4);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 12px 26px rgba(53, 109, 255, 0.24);
}
#tour-next.tour-next-finish:hover {
  background: linear-gradient(135deg, #82b0ff, #5d8cff 55%, #4672ff 100%);
  border-color: rgba(171, 205, 255, 0.48);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 12px 26px rgba(53, 109, 255, 0.24);
}

/* Tour launch button — hide on mobile like whats-new-btn */
@media screen and (max-width: 900px) {
  .tour-launch-btn { display: none !important; }
}
