/* Increment/Decrement Buttons for Sidebar Sliders */
.sidebar .sidebar-range-btn {
  background: linear-gradient(135deg, #232323 70%, #2e0e3a 100%);
  border: 1.5px solid #222;
  border-radius: 6px;
  width: 22px;
  height: 22px;
  font-size: 15px;
  color: #00fff0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 2px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.13);
  transition: background 0.18s, border 0.18s, color 0.13s, transform 0.13s, box-shadow 0.13s;
  outline: none;
}

.sidebar .sidebar-range-btn:active {
  background: linear-gradient(135deg, #181828 70%, #302b63 100%);
  border-color: #00bfa5;
  color: #00bfa5;
  transform: scale(0.95);
  box-shadow: 0 0px 2px rgba(0,255,255,0.10);
}

.sidebar .sidebar-range-btn:focus {
  outline: 2px solid #00fff0;
  outline-offset: 1px;
}
/* Sidebar range button hover effect */
.sidebar .sidebar-range-btn:hover {
  background: linear-gradient(135deg, #302b63 60%, #00bfa5 100%);
  color: #fff;
  border-color: #00bfa5;
  transform: scale(1.08);
  box-shadow: 0 4px 12px rgba(0,255,255,0.13);
}
/* Style custom font options in dropdowns with a teal color */
select option[value^="custom-"] {
  color: #00bfa5 !important;
}
.modular-frame-nav-row #modular-frame-prev-btn::before {
  content: '←';
  font-size: 18px;
  font-weight: bold;
  margin-right: 8px;
}

.modular-frame-nav-row #modular-frame-next-btn::after {
  content: '→';
  font-size: 18px;
  font-weight: bold;
  margin-left: 8px;
}
.modular-frame-nav-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  margin-top: 0.2rem;
  width: 100%;
}
.modular-frame-nav-row button {
  background: linear-gradient(180deg, rgba(255,255,255,0.11), rgba(255,255,255,0.045));
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 0.68rem 0.96rem;
  font-weight: 800;
  font-family: "Gabarito", sans-serif;
  cursor: pointer;
  transition: none;
  font-size: 0.74rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  min-width: 112px;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 10px 22px rgba(0,0,0,0.14);
}
.modular-frame-nav-row button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.025));
}
.modular-frame-nav-row #modular-frame-return-btn {
  min-width: 220px;
  justify-self: center;
}
.modular-frame-nav-row #modular-frame-prev-btn,
.modular-frame-nav-row #modular-frame-next-btn {
  min-width: 128px;
}
/* Spoiler Blur Option */
.spoiler-blur {
  filter: blur(16px) !important;
  transition: filter 0.3s;
}
/* Spoiler Blur Option */
#spoiler-toggle:checked ~ .main #titlecard-canvas,
#spoiler-toggle:checked ~ .main #grid-canvas,
.spoiler-blur {
  filter: blur(16px) !important;
  transition: filter 0.3s;
}
body {
  margin: 0;
  font-family: "Gabarito", sans-serif;
  --cardlab-accent: #8e24aa;
  --cardlab-accent-strong: #c45ae0;
  --cardlab-accent-highlight: #e08cff;
  --cardlab-accent-soft: rgba(142, 36, 170, 0.16);
  --cardlab-accent-faint: rgba(142, 36, 170, 0.08);
  --cardlab-accent-border: rgba(142, 36, 170, 0.24);
  --cardlab-panel-bg: linear-gradient(180deg, rgba(38, 25, 58, 0.86), rgba(18, 14, 32, 0.92));
  --cardlab-panel-hover: linear-gradient(180deg, rgba(46, 31, 69, 0.92), rgba(25, 20, 41, 0.94));
  --cardlab-stage-bg: linear-gradient(180deg, rgba(20, 14, 31, 0.98), rgba(11, 8, 20, 0.99));
  --cardlab-stage-shell: linear-gradient(180deg, rgba(28, 18, 42, 0.98), rgba(14, 10, 24, 0.98));
  background-color: #060511;
  background-image:
    radial-gradient(ellipse 74% 54% at 12% 0%, rgba(142, 36, 170, 0.2) 0%, transparent 57%),
    radial-gradient(ellipse 54% 36% at 96% 22%, rgba(196, 90, 224, 0.11) 0%, transparent 50%),
    radial-gradient(ellipse 94% 70% at 50% 100%, rgba(52, 24, 86, 0.4) 0%, transparent 62%),
    linear-gradient(180deg, #090511 0%, #0c0917 24%, #130a1f 58%, #0a0612 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;
}

header {
  padding: 0.625rem 2rem 0.625rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background:
    linear-gradient(180deg, rgba(50, 30, 70, 0.16), transparent 68%),
    linear-gradient(180deg, rgba(34, 22, 50, 0.97), rgba(18, 12, 30, 0.96));
  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(--cardlab-accent-border);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.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(--cardlab-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;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  isolation: isolate;
}

.header-left a::before {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 20px;
  background: radial-gradient(circle at 50% 50%, rgba(142, 36, 170, 0.26), rgba(196, 90, 224, 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 28px rgba(0, 0, 0, 0.28);
}

.header-left img {
  width: auto;
  height: 36px;
  margin-top: 0 !important;
  filter: drop-shadow(0 0 10px rgba(142, 36, 170, 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%, #f2d1ff 40%, #c45ae0 75%, #8e24aa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 16px rgba(196, 90, 224, 0.3));
}

.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(142, 36, 170, 0.16), rgba(196, 90, 224, 0.14));
  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(142, 36, 170, 0.7), rgba(196, 90, 224, 0.7));
  opacity: 0;
  transform: scaleX(0.4);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.nav-link:hover {
  color: white;
  border-color: var(--cardlab-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), 0 0 0 1px rgba(142, 36, 170, 0.08);
}

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

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

.header-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.layout {
  display: flex;
  flex: 1;
  min-height: 0;
  min-height: calc(100vh - 70px);
  align-items: stretch;
}

.sidebar {
  width: 280px;
  min-width: 280px;
  position: sticky;
  align-self: flex-start;
  top: 70px;
  isolation: isolate;
  background:
    linear-gradient(180deg, rgba(48, 30, 68, 0.14), transparent 18%),
    linear-gradient(180deg, rgba(27, 18, 42, 0.98), rgba(12, 9, 22, 0.99)),
    linear-gradient(90deg, var(--cardlab-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(--cardlab-accent-border);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  box-sizing: border-box;
  overflow-y: auto;
  height: calc(100vh - 70px);
  min-height: calc(100vh - 70px);
  max-height: calc(100vh - 70px);
  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(142, 36, 170, 0.18), transparent 28%);
  z-index: -1;
}

.sidebar::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(180deg, rgba(196, 90, 224, 0.34), rgba(196, 90, 224, 0.06) 32%, rgba(142, 36, 170, 0.18) 70%, rgba(196, 90, 224, 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 h3 {
  font-size: 1.1rem;
  margin: 0.8rem 0 0.5rem;
  color: white;
  font-weight: 600;
}

.sidebar label {
  font-size: 0.95rem;
  font-weight: 300;
  color: #ffffff;
  margin-top: 0.7rem;
  margin-bottom: 0.5rem;
  display: block;
  letter-spacing: 0.3px;
}

.sidebar input[type="text"],
.sidebar input[type="number"],
.sidebar select {
  width: 100%;
  padding: 0.6rem;
  font-size: 0.9rem;
  background: #333;
  color: white;
  border: none;
  border-radius: 6px;
  box-sizing: border-box;
  margin-bottom: 0.7rem;
}

.text-options {
  background: rgba(10, 10, 18, 0.7);
  color: #fff;
  padding: 20px 15px;
  font-family: "Gabarito", sans-serif;
}

.text-options h4 {
  margin: 0 0 15px;
  color: #00bfa5;
  font-size: 1.1rem;
  font-weight: 600;
}

.text-effects h4 {
  margin: 0 0 15px;
  color: #00bfa5;
  font-size: 1.1rem;
  font-weight: 600;
}

.text-options
  > div:not(.text-options-grid):not(.effect-section):not(.title-info-gap):not(
    .custom-font-upload-container
  ) {
  margin-bottom: 16px;
}

.section-separator {
  height: 1px;
  background-color: rgba(255, 255, 255, 0.1);
  margin: 20px 0;
}

.value-display {
  color: #00bfa5;
  font-size: 12px;
  margin-left: 10px;
}

.text-options
  > div:not(.text-options-grid):not(.effect-section):not(.title-info-gap):not(
    .section-separator
  ) {
  margin-bottom: 15px;
}

.text-options .option-label {
  margin-bottom: 5px;
  display: block;
}

.text-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 12px 0 8px;
}

.text-options select {
  background: rgba(25, 25, 35, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 5px;
  color: white;
  padding: 8px;
  width: 100%;
  height: 36px;
  font-size: 0.9rem;
  margin: 4px 0 8px;
  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;
}

/* Custom font button now uses action-button styles */
.custom-font-upload-container {
  /* Override any old styles that might conflict with action-button */
  text-align: center;
  padding: 0.5rem 0.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

.browse-button {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  padding: 4px 10px;
  margin-right: 6px;
  font-size: 0.85rem;
}

.color-picker-container {
  margin: 4px 0;
}

.color-box {
  width: 100%;
  height: 24px;
  background: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  box-sizing: border-box;
  margin-bottom: 8px;
}

.color-picker-input {
  width: 100%;
  height: 24px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.effect-section {
  margin: 16px 0;
}

.effect-section .effect-title {
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 10px;
}

.effect-controls {
  display: grid;
  grid-template-columns: 40px 5px 1fr auto;
  align-items: center;
  gap: 8px;
}

.effect-color {
  width: 40px;
  height: 40px;
  background: black;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  flex-shrink: 0;
  grid-column: 1;
}

.slider-bar {
  width: 5px;
  height: 40px;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.1),
    rgba(255, 255, 255, 0.05)
  );
  border-radius: 2px;
  grid-column: 2;
}

.effect-controls input[type="range"] {
  -webkit-appearance: none;
  height: 5px;
  border-radius: 3px;
  background: linear-gradient(to right, #00bfa5, #8e24aa);
  width: 100%;
  margin: 0;
  padding: 0;
  grid-column: 3;
}

.effect-controls input[type="range"]::-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);
}

.effect-controls input[type="range"]::-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);
}

.slider-value {
  font-size: 0.9rem;
  color: #00bfa5;
  min-width: 30px;
  text-align: right;
}

.title-info-gap {
  margin: 20px 0 10px;
}

.title-info-gap .gap-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.title-info-gap .gap-label .label-text {
  font-weight: 500;
  font-size: 0.95rem;
}

.title-info-gap .gap-value {
  font-size: 0.9rem;
  opacity: 0.9;
}

.title-info-gap input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  margin-top: 6px;
  height: 5px;
  border-radius: 3px;
  background: linear-gradient(to right, #00bfa5, #8e24aa);
}

.title-info-gap input[type="range"]::-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);
}

.title-info-gap input[type="range"]::-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);
}

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

.sidebar-action-row .icon-button {
  height: 46px;
  flex: 1;
}

.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);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 10px 22px rgba(0,0,0,0.14);
  transform: none;
}

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

.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;
}

.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;
}

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

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

.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 12px 26px rgba(216,61,96,0.24);
  transition: none;
}

.icon-button.red:hover {
  background: linear-gradient(135deg, #ff98aa, #f66a8b 55%, #e24f73 100%);
  box-shadow: 0 12px 26px rgba(216,61,96,0.24);
  transform: none;
}

.action-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.action-row .icon-button {
  flex: 1;
  margin-top: 0;
}

.section-separator {
  width: 100%;
  border-top: 1px solid rgba(0, 255, 255, 0.1);
  margin: 1rem 0;
  padding: 0;
  position: relative;
}

.section-separator::after {
  content: "";
  position: absolute;
  left: 0;
  top: -1px;
  width: 100%;
  height: 1px;
  background: linear-gradient(
    to right,
    rgba(0, 255, 255, 0.3),
    rgba(255, 255, 255, 0.05),
    rgba(0, 255, 255, 0.3)
  );
  opacity: 0.5;
}

.main {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  gap: 1rem;
  padding: 1rem 1.15rem 1.35rem;
  background:
    radial-gradient(circle at top left, rgba(196, 90, 224, 0.14), transparent 30%),
    radial-gradient(circle at bottom right, var(--cardlab-accent-faint), transparent 34%),
    var(--cardlab-stage-bg);
  min-height: 0;
  position: relative;
  isolation: isolate;
}

.main > canvas,
.main > .modular-frame {
  align-self: center;
}

.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, rgba(196, 90, 224, 0.06), rgba(142, 36, 170, 0.03));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
  pointer-events: none;
  z-index: 0;
}

#titlecard-canvas {
  position: relative;
  z-index: 1;
  border-radius: 22px;
  background: var(--cardlab-stage-shell);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 28px 60px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 0 1px rgba(142, 36, 170, 0.1);
  width: 1280px;      /* Display size */
  height: 720px;     /* Display size, keep 16:9 ratio */
  max-width: 100%;
  max-height: calc(100vh - 130px);
}

/* Modular frame that appears below the canvas */
.modular-frame {
  display: none;
  width: 100%;
  max-width: 1280px;
  margin-top: 0;
  background:
    radial-gradient(circle at top, rgba(196, 90, 224, 0.12), transparent 46%),
    linear-gradient(180deg, rgba(24, 17, 38, 0.96), rgba(12, 9, 22, 0.98));
  backdrop-filter: blur(12px);
  border-radius: 22px;
  padding: 1rem;
  box-shadow:
    0 22px 48px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 0 1px rgba(142, 36, 170, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: height 0.3s ease;
  position: relative;
  z-index: 1;
}

.modular-frame-content {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.modular-frame-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0 0.2rem 0.75rem;
}

.modular-frame-header h4 {
  margin: 0;
  color: #f8fbff;
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.alt-images-count {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.78rem;
  font-weight: 600;
}

.alt-images-row {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  max-height: 320px;
  overflow-y: auto;
  padding: 0.95rem 1rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at top, rgba(196, 90, 224, 0.09), transparent 42%),
    linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.015));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

/* Custom scrollbar for the images row */
.alt-images-row::-webkit-scrollbar {
  width: 6px;
}

.alt-images-row::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}

.alt-images-row::-webkit-scrollbar-thumb {
  background: rgba(0, 191, 165, 0.4);
  border-radius: 3px;
}

.alt-images-row::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 191, 165, 0.6);
}

/* Image badge to show the number */
.image-badge {
  position: absolute;
  top: 3px;
  left: 3px;
  background: rgba(0, 191, 165, 0.8);
  color: white;
  font-size: 10px;
  font-weight: bold;
  width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

/* Resolution badge to show image dimensions */
.resolution-badge {
  position: absolute;
  bottom: 3px;
  right: 3px;
  background: rgba(142, 36, 170, 0.9);
  color: white;
  font-size: 9px;
  font-weight: 600;
  padding: 2px 4px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  font-family: 'Gabarito', sans-serif;
  white-space: nowrap;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.modular-frame .alt-image-item {
  width: 164px;
  height: 92px;
  margin: 0;
  position: relative;
  transition: all 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015));
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.2);
}

.modular-frame .alt-image-item.selected {
  border-color: rgba(0, 191, 165, 0.78);
  box-shadow: 0 0 0 1px rgba(0, 191, 165, 0.22), 0 18px 34px rgba(0, 191, 165, 0.18);
}

.modular-frame .alt-image-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modular-frame .alt-image-item:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.28);
}

.modular-frame #modular-frame-return-btn {
  display: flex;
  background: linear-gradient(135deg, rgba(0,191,165,0.16), rgba(142,36,170,0.18));
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.12);
  width: auto;
  margin: 0 auto;
  padding: 0.78rem 1.15rem;
  font-weight: 700;
  align-items: center;
  gap: 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.22s ease;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 12px 24px rgba(0,0,0,0.16);
}

.modular-frame #modular-frame-return-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);
  transform: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 10px 22px rgba(0,0,0,0.14);
}

.modular-frame #modular-frame-return-btn::before {
  font-size: 18px;
  font-weight: bold;
}

.grid-canvas {
  display: none;
  margin: 0 auto;
  border-radius: 22px;
  background: var(--cardlab-stage-shell);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 28px 60px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 0 1px rgba(142, 36, 170, 0.08);
  max-width: 100%;
  max-height: none;
  height: auto;
  cursor: pointer;
  position: relative;
  z-index: 1;
}

.episode-cards-container {
  display: none;
}

.collapsible {
  margin-bottom: 0.8rem;
  width: 100%;
}

.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;
  min-height: 48px;
}

.collapsible-header::before {
  content: none;
}

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

.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;
}

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

.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.3s ease;
  margin-top: -1px;
}

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

/* Tooltip styling */
.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;
  transform: translateY(4px) scale(0.98);
  transition: opacity 0.22s ease, visibility 0.22s ease, transform 0.22s ease;
  z-index: 99999;
  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;
}

.tooltip[style*="opacity: 1"] {
  transform: translateY(0) scale(1);
}

/* Arrow for tooltip positioned above the button (points down) */
.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));
}

/* Arrow for tooltip positioned below the button (points up) */
.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;
  background: linear-gradient(180deg, rgba(28, 54, 84, 0.7), rgba(16, 35, 57, 0.82));
  color: #b8f3ff;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  margin-left: 0;
  cursor: pointer;
  border: 1px solid rgba(111, 183, 255, 0.22);
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
  flex-shrink: 0;
}

.info-button:hover {
  background: linear-gradient(180deg, rgba(36, 67, 103, 0.78), rgba(20, 42, 67, 0.9));
  border-color: rgba(128, 194, 255, 0.3);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 0 10px rgba(81, 177, 255, 0.08);
}

.collapsible-content {
  padding: 1rem 0.95rem 0.95rem;
  display: none;
  background: linear-gradient(180deg, rgba(9, 12, 24, 0.82), rgba(5, 8, 18, 0.9));
  border-radius: 14px;
  margin-top: 0.36rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}

.collapsible.active .collapsible-content {
  display: block;
}

.collapsible.active .collapsible-header {
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(18, 26, 46, 0.98), rgba(12, 17, 31, 0.98));
  border-color: rgba(142, 36, 170, 0.26);
  box-shadow: inset 0 -2px 0 rgba(142, 36, 170, 0.82), inset 0 1px 0 rgba(255,255,255,0.04), 0 10px 22px rgba(0, 0, 0, 0.18);
}

.collapsible.active .toggle-icon {
  background: transparent;
  border-color: transparent;
}

.control-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  align-items: center;
}

.control-row label {
  margin-top: 0;
  margin-right: 0.5rem;
  min-width: 80px;
}

.control-row input[type="color"] {
  width: 30px;
  height: 30px;
  margin-bottom: 0;
}

.control-row input[type="range"] {
  flex: 1;
}

@media screen and (max-width: 900px) {
  .layout {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    max-height: none;
    padding: 1rem;
  }

  .main {
    padding: 1rem;
  }

  #titlecard-canvas {
    width: 100%;
  }
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 24px;
}

.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: 0.3s;
  border-radius: 24px;
}

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

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

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

.toggle-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.toggle-label {
  font-size: 0.95rem;
  color: #00bfa5;
}

.search-container {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.55rem;
  margin-bottom: 1rem;
  align-items: stretch;
}

.main-search input {
  flex: 1;
  margin-bottom: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.025));
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: white;
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  min-height: 46px;
  box-sizing: border-box;
  margin-left: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 10px 22px rgba(0,0,0,0.12);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.main-search input:focus {
  outline: none;
  border-color: rgba(0, 255, 240, 0.34);
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 0 0 1px rgba(0,255,240,0.08), 0 10px 22px rgba(0,0,0,0.14);
}

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

.search-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;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 10px 22px rgba(0,0,0,0.14);
}

.search-results {
  max-height: 320px;
  overflow-y: auto;
  margin-bottom: 1rem;
  padding: 0.4rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.015));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.3) rgba(0, 0, 0, 0.1);
  transition: opacity 0.3s ease, max-height 0.3s ease;
}

.search-results::-webkit-scrollbar {
  width: 6px;
}

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

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

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

.search-result {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 0.85rem;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
  margin-bottom: 0.4rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.025));
  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);
}

.search-result:hover {
  background: linear-gradient(180deg, rgba(255,255,255,0.1), rgba(255,255,255,0.04));
  border-color: rgba(255,255,255,0.14);
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 12px 22px rgba(0, 0, 0, 0.22);
}

.show-poster {
  width: 44px;
  height: 66px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.24);
}

.show-info {
  min-width: 0;
}

.show-info h4 {
  font-size: 0.96rem;
  margin: 0;
  color: white;
  line-height: 1.2;
}

.show-info .year {
  display: inline-block;
  margin-top: 0.3rem;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.72);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.season-selector {
  margin: 0 0 0.5rem 0;
  padding: 0;
  position: relative;
  min-height: 0;
  transition: min-height 0.3s ease;
}

.season-selector select {
  width: 100%;
  margin-bottom: 0; 
  margin-top: 0;  
  background: #333;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: white;
  padding: 0.5rem;
  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;
  transition: all 0.3s ease;
}

/* Loading and empty state messages */
.season-selector .loading,
.season-selector .no-results,
.search-results .no-results {
  padding: 1rem;
  text-align: center;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  animation: fadeIn 0.3s ease;
}

.season-selector .loading {
  background: rgba(0, 191, 165, 0.1);
  border-color: rgba(0, 191, 165, 0.2);
  color: #00bfa5;
  position: relative;
}

.season-selector .loading::before {
  content: '';
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  border: 2px solid rgba(0, 191, 165, 0.3);
  border-top-color: #00bfa5;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: translateY(-50%) rotate(360deg); }
}

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

#returnToGridBtn {
  display: none;
  background: linear-gradient(135deg, #00bfa5, #8e24aa);
  color: white;
  border: none;
  width: 100%;
  border-radius: 6px;
  padding: 0.6rem 1rem;
  cursor: pointer;
  font-family: "Gabarito", sans-serif;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 191, 165, 0.3);
  margin-top: 0.8rem;
  font-weight: 500;
}

#returnToGridBtn:hover {
  background: linear-gradient(135deg, #1de9b6, #a600ff);
  box-shadow: 0 6px 16px rgba(0, 191, 165, 0.4);
  transform: translateY(-2px);
}

#batch-download-btn {
  width: 100%;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #5a94ff, #356dff);
  background-color: #356dff;
  color: white;
  border: 1px solid rgba(126, 171, 255, 0.34);
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 10px 22px rgba(0, 0, 0, 0.14);
  transition: none;
  font-weight: 800;
  font-size: 0.73rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-family: "Gabarito", sans-serif;
  line-height: 1;
  appearance: none;
  -webkit-appearance: none;
}

#batch-download-btn: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;
}

#batch-download-btn::before {
  content: none;
}

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

.alt-images-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  justify-content: center;
}

.alt-image-item {
  width: 75px;
  height: 42px;
  border-radius: 4px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.alt-image-item.selected {
  border-color: #00bfa5;
  box-shadow: 0 0 8px rgba(0, 191, 165, 0.7);
}

.alt-image-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
}

.alt-image-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.info-text {
  color: #ccc;
  font-size: 0.85rem;
  text-align: center;
  padding: 10px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  margin: 10px 0;
}

.toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  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;
  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);
  z-index: 10000;
  font-weight: 700;
  opacity: 0;
  transition: opacity 0.28s ease, transform 0.28s ease;
  text-align: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  min-width: min(320px, calc(100vw - 32px));
  max-width: min(520px, calc(100vw - 32px));
  line-height: 1.45;
  letter-spacing: 0.012em;
  text-shadow: 0 0 10px rgba(0, 255, 240, 0.06);
  pointer-events: none;
}

#resetBtn {
  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;
  font-weight: 600;
  margin-bottom: 0.5rem;
  position: relative;
  overflow: hidden;
}

#resetBtn:hover {
  background: linear-gradient(135deg, #ff98aa, #f66a8b 55%, #e24f73 100%);
  box-shadow: 0 12px 26px rgba(216,61,96,0.24);
  transform: none;
}

.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);
}

.action-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 0.96rem;
  min-height: 40px;
  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;
  font-family: "Gabarito", sans-serif;
  margin-left: 0.5rem;
}

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

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

.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);
  }
}

.action-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;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 10px 22px rgba(0, 0, 0, 0.14);
}

/* Config Dropdown */
.config-dropdown {
  position: relative;
  display: inline-block;
}

.config-dropdown-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  background: rgba(22, 24, 48, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  min-width: 200px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 255, 240, 0.1);
  backdrop-filter: blur(12px);
  z-index: 1000;
  padding: 8px 0;
  animation: dropdownFadeIn 0.2s ease-out;
}

/* Add invisible bridge to prevent menu from closing */
.config-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -4px;
  left: 0;
  right: 0;
  height: 4px;
}

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

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

.config-menu-item {
  width: 100%;
  padding: 10px 16px;
  background: transparent;
  border: none;
  color: white;
  font-family: "Gabarito", sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s ease;
  text-align: left;
}

.config-menu-item:hover {
  background: linear-gradient(
    135deg,
    rgba(0, 255, 240, 0.15),
    rgba(166, 0, 255, 0.15)
  );
}

.menu-icon {
  width: 16px;
  height: 16px;
  filter: brightness(0) invert(1);
}

.menu-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 6px 12px;
}

/* Download dropdown styling */
.download-dropdown {
  position: relative;
  display: inline-block;
  flex: 1;
}

.download-dropdown-menu {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  right: 0;
  background: rgba(22, 24, 48, 0.98);
  border: 1px solid rgba(0, 255, 240, 0.3);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 255, 240, 0.15);
  backdrop-filter: blur(12px);
  z-index: 1000;
  padding: 6px 0;
  animation: dropdownSlideUp 0.2s ease-out;
}

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

.download-dropdown:hover .download-dropdown-menu,
.download-dropdown-menu:hover {
  display: block;
}

.download-menu-item {
  width: 100%;
  padding: 10px 14px;
  background: transparent;
  border: none;
  color: white;
  font-family: "Gabarito", sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s ease;
  text-align: left;
}

.download-menu-item:hover {
  background: linear-gradient(135deg, rgba(0, 255, 240, 0.2), rgba(106, 17, 203, 0.2));
}

.download-menu-item .menu-icon {
  width: 16px;
  height: 16px;
  filter: brightness(0) invert(1);
}

.action-icon {
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  margin-right: 10px;
  filter: brightness(0) invert(1); /* Better for SVG icons */
  display: inline-block;
  vertical-align: middle;
  color: white; /* For SVG currentColor */
  stroke: white; /* For SVG stroke */
}

.custom-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 14, 0.72);
  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 p {
  margin-bottom: 1.4rem;
  font-size: 0.96rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.78);
}

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

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

.custom-btn {
  min-width: 132px;
  padding: 0.78rem 1.08rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  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: none;
}

.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: inset 0 1px 0 rgba(255,255,255,0.06), 0 10px 22px rgba(0,0,0,0.14);
  transform: none;
}

.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 12px 26px rgba(240, 61, 99, 0.24);
  transform: none;
}

.custom-btn:active {
  transform: none;
}

.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: inset 0 1px 0 rgba(255,255,255,0.06), 0 10px 22px rgba(0,0,0,0.14);
  transform: none;
}

.custom-placement-modal {
  width: min(560px, 96vw);
  max-width: 100%;
  border-radius: 22px;
  padding: 1.2rem 1.25rem 1.15rem;
  animation: modalFadeIn 0.3s ease-out forwards;
}

.custom-placement-modal::before {
  display: none;
}

.custom-placement-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.42rem;
  margin-bottom: 0.65rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.custom-placement-accent {
  width: 70px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #00fff0, #b57bff);
  box-shadow: 0 0 18px rgba(0, 255, 240, 0.24);
}

.custom-placement-title {
  margin: 0;
  font-size: 1.28rem;
  font-weight: 800;
  line-height: 1.12;
  background: linear-gradient(90deg, #f8fbff 0%, #b8fff8 44%, #d7b7ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.custom-placement-meta {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.84rem;
  font-weight: 600;
}

.custom-placement-meta-dot {
  margin: 0 0.4rem;
  color: #00fff0;
}

.custom-placement-callout {
  margin: 0 auto 0.75rem;
  padding: 0;
  width: min(100%, 360px);
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.custom-placement-callout-text {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.56);
  text-align: center;
}

.custom-placement-callout-text strong {
  color: rgba(255, 255, 255, 0.78);
  font-weight: 700;
}

.custom-placement-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 1.1rem;
  align-items: center;
  margin-top: 0.75rem;
}

.custom-placement-col {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.custom-placement-group {
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
  width: 100%;
}

.custom-placement-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.custom-placement-label {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(184, 255, 248, 0.85);
}

.custom-placement-select {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03)),
    rgba(8, 12, 28, 0.96);
  color: #fff;
  font-size: 0.85rem;
  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.75rem center;
  background-size: 10px auto;
  padding-right: 2rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.custom-placement-select:focus {
  outline: none;
  border-color: rgba(0, 255, 240, 0.28);
  box-shadow: 0 0 0 3px rgba(0, 255, 240, 0.12);
}

.custom-placement-preview {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  margin: 0.5rem 0 0.25rem;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4);
  position: relative;
  background: rgba(8, 12, 28, 0.92);
}

.custom-placement-preview-canvas {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 12px;
}

.custom-placement-range-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
}

.custom-placement-range-row input[type="range"] {
  flex: 1;
  min-width: 0;
}

.custom-placement-range-value {
  font-size: 0.8rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.75);
  text-align: right;
  min-width: 2.2rem;
}

.custom-placement-actions {
  justify-content: center;
  gap: 0.7rem;
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.custom-placement-actions .custom-btn {
  min-width: 122px;
  padding: 0.72rem 0.95rem;
}

.custom-placement-apply {
  min-width: 188px;
}

@keyframes shimmer {
  0% { background-position: 0% 0%, 0 0; }
  100% { background-position: 200% 200%, 0 0; }
}

/* 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);
}

.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;
}

.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-date {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.46);
  margin-top: 0.2rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

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

.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);
}

.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);
}

.cfg-modal-count {
  color: rgba(255,255,255,0.48);
  font-size: 0.8rem;
  font-weight: 600;
}

/* Download options modal */
.download-options-modal {
  width: min(560px, 100%);
  max-width: 100%;
  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);
  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);
  border-radius: 22px;
  padding: 1.9rem 1.75rem 1.45rem;
  animation: modalFadeIn 0.3s ease-out forwards;
}

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

.download-options-modal::before,
.season-selection-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);
}

.download-options-modal h3 {
  color: white;
  margin: 0 0 0.75rem 0;
  font-size: 1.8rem;
  font-weight: 800;
  text-align: center;
  line-height: 1.08;
  background: linear-gradient(90deg, #f8fbff 0%, #b8fff8 44%, #d7b7ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.download-options-modal p {
  color: rgba(255, 255, 255, 0.74);
  margin-bottom: 1.35rem;
  font-size: 0.95rem;
  font-weight: 500;
  text-align: center;
  line-height: 1.6;
}

.download-options {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1.35rem;
}

.download-option-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 1rem 1.05rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  text-align: left;
  width: 100%;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 10px 24px rgba(0, 0, 0, 0.12);
  position: relative;
  overflow: hidden;
}

.download-option-btn:hover {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.04));
  border-color: rgba(0, 212, 200, 0.24);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
}

.download-option-btn .option-icon {
  width: 36px;
  height: 36px;
  filter: brightness(0) invert(1);
  opacity: 0.92;
  padding: 0.7rem;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(0, 212, 200, 0.16), rgba(153, 69, 255, 0.12));
  border: 1px solid rgba(0, 212, 200, 0.2);
  box-sizing: content-box;
}

.option-content {
  flex: 1;
}

.option-title {
  font-size: 1.02rem;
  font-weight: 800;
  color: white;
  margin-bottom: 0.2rem;
}

.option-description {
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.62);
  line-height: 1.55;
}

/* Season selection modal */
.season-selection-modal {
  width: min(620px, 100%);
  max-width: 100%;
  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);
  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);
  border-radius: 22px;
  padding: 1.9rem 1.75rem 1.45rem;
  animation: modalFadeIn 0.3s ease-out forwards;
}

.season-selection-modal h3 {
  margin: 0 0 0.75rem;
  text-align: center;
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.08;
  background: linear-gradient(90deg, #f8fbff 0%, #b8fff8 44%, #d7b7ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.season-selection-modal > p {
  margin: 0 0 1.25rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.74);
  line-height: 1.6;
}

.season-selection-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 400px;
  overflow-y: auto;
  margin-bottom: 1rem;
  padding: 0.55rem;
  background: rgba(3, 7, 19, 0.42);
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.07);
}

.season-checkbox-item {
  display: flex;
  align-items: center;
  padding: 0.9rem 1rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.season-checkbox-item:hover {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.04));
  border-color: rgba(0, 212, 200, 0.24);
  transform: translateY(-1px);
}

.season-checkbox-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-right: 12px;
  cursor: pointer;
  accent-color: #00bfa5;
}

.season-info {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.season-name {
  font-size: 1rem;
  font-weight: 700;
  color: white;
}

.season-episode-count {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
}

.season-selection-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 1.2rem;
}

.mini-btn {
  padding: 0.6rem 0.95rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: rgba(255,255,255,0.92);
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
  font-family: "Gabarito", sans-serif;
}

.mini-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 22px rgba(0,0,0,0.14);
  transform: translateY(-1px);
}

.background-cache-notification {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: min(520px, calc(100vw - 32px));
  padding: 1.35rem 1.45rem 1.2rem;
  border-radius: 22px;
  z-index: 10000;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.28s ease, transform 0.28s ease;
  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);
  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);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.background-cache-notification::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);
}

.background-cache-notification.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.background-cache-header {
  display: flex;
  align-items: center;
  gap: 0.95rem;
  margin-bottom: 1rem;
}

.background-cache-spinner {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-top-color: #b57bff;
  border-right-color: #00fff0;
  border-radius: 50%;
  animation: popupSpin 1s linear infinite;
  box-shadow: 0 0 12px rgba(181, 123, 255, 0.18);
}

.background-cache-message {
  flex: 1;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.25;
}

.background-cache-progress-container {
  width: 100%;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  margin-bottom: 0.85rem;
}

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

.background-cache-details {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.45rem;
}

.background-cache-status {
  color: #24e7d8;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.5;
}

.progress-popup {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: min(520px, calc(100vw - 32px));
  padding: 1.35rem 1.45rem 1.2rem;
  border-radius: 22px;
  z-index: 9999;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.22s ease, transform 0.22s ease;
  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);
  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);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.progress-popup::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);
}

.progress-popup.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.progress-popup--compact {
  width: min(420px, calc(100vw - 32px));
}

.progress-popup-header {
  display: flex;
  align-items: center;
  gap: 0.95rem;
  margin-bottom: 1rem;
}

.progress-popup-spinner {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-top-color: #b57bff;
  border-right-color: #00fff0;
  border-radius: 50%;
  animation: popupSpin 1s linear infinite;
  box-shadow: 0 0 12px rgba(181, 123, 255, 0.18);
}

.progress-popup-message {
  flex: 1;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.25;
}

.progress-popup-bar-track {
  width: 100%;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  margin-bottom: 0.85rem;
}

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

.progress-popup-details {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.45;
}

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

@media (max-width: 768px) {
  .background-cache-notification {
    left: 16px;
    right: 16px;
    bottom: 16px;
    width: auto;
    padding: 1.15rem 1rem 1rem;
  }

  .background-cache-message {
    font-size: 0.98rem;
  }

  .progress-popup,
  .progress-popup--compact {
    left: 16px;
    right: 16px;
    bottom: 16px;
    width: auto;
    padding: 1.15rem 1rem 1rem;
  }

  .progress-popup-message {
    font-size: 0.98rem;
  }
}

.pickr .pcr-button {
  width: 100% !important;
  height: 25px !important;
  border-radius: 4px !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12),
    0 0 6px rgba(0, 255, 255, 0.15);
  margin-bottom: 8px;
  margin-top: 9px;
  box-sizing: border-box;
}

.effect-color .pcr-button {
  width: 40px !important;
  height: 40px !important;
  flex-shrink: 0;
}

.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;
}

.drop-zone {
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: 6px;
padding: 0.5rem 0.8rem;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition: all 0.3s ease;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
font-weight: 500;
color: white;
font-family: "Gabarito", sans-serif;
font-size: 1rem;
margin: 8px 0 12px;
min-height: 40px;
height: auto;
text-align: center;
}

.drop-zone:hover {
background: linear-gradient(135deg, rgba(0, 255, 240, 0.2), rgba(166, 0, 255, 0.2));
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(0, 255, 255, 0.15);
}

#gradient-opacity {
  -webkit-appearance: none;
  width: 100%;
  height: 5px;
  border-radius: 3px;
  background: linear-gradient(to right, #00bfa5, #8e24aa);
  margin-bottom: 0;
}

#gradient-opacity::-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);
}

#gradient-opacity::-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);
}

#gradient-controls {
  position: relative;
}

#gradient-controls::after {
  content: attr(data-value);
  position: absolute;
  right: 8px;
  top: 38px;
  font-size: 0.9rem;
  color: #00bfa5;
}


.horizontal-position {
  margin: 20px 0 10px;
}
.horizontal-position .position-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.horizontal-position .position-label .label-text {
  font-weight: 500;
  font-size: 0.95rem;
}
.horizontal-position .position-value {
  font-size: 0.9rem;
  opacity: 0.9;
  color: #00bfa5;
}
.horizontal-position input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  margin-top: 6px;
  height: 5px;
  border-radius: 3px;
  background: linear-gradient(to right, #00bfa5, #8e24aa);
}
.horizontal-position input[type="range"]::-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);
}
.horizontal-position input[type="range"]::-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);
}

.vertical-position {
  margin: 20px 0 10px;
}
.vertical-position .position-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.vertical-position .position-label .label-text {
  font-weight: 500;
  font-size: 0.95rem;
}
.vertical-position .position-value {
  font-size: 0.9rem;
  opacity: 0.9;
  color: #00bfa5;
}
.vertical-position input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  margin-top: 6px;
  height: 5px;
  border-radius: 3px;
  background: linear-gradient(to right, #00bfa5, #8e24aa);
}
.vertical-position input[type="range"]::-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);
}
.vertical-position input[type="range"]::-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);
}

.title-info-gap,
.horizontal-position,

#line-spacing-container {
  margin: 20px 0 10px;
}

#line-spacing-container input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  margin-top: 6px;
  height: 5px;
  border-radius: 3px;
  background: linear-gradient(to right, #00bfa5, #8e24aa);
}

#line-spacing-container input[type="range"]::-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);
}

#line-spacing-container input[type="range"]::-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);
}

.title-info-gap .gap-label,
.horizontal-position .position-label,
#line-spacing-container .gap-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.title-info-gap .gap-label .label-text,
.horizontal-position .position-label .label-text,
#line-spacing-container .gap-label .label-text {
  font-weight: 500;
  font-size: 0.95rem;
}

.title-info-gap .gap-value,
.horizontal-position .position-value,
#line-spacing-container .gap-value {
  font-size: 0.9rem;
  opacity: 0.9;
  color: #00bfa5;
}

/* Text Style Row for uppercase and bold options */
.text-style-row {
  display: flex;
  gap: 8px;
  margin: 8px 0 12px;
  flex-wrap: wrap;
}

/* Segmented Control Styling - New Design */
.segmented-control {
  display: flex;
  background: rgba(25, 25, 35, 0.7);
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  width: 100%;
}

.segmented-control label {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 7px 10px;
  position: relative;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  flex: 1;
  text-align: center;
}

.segmented-control label:last-child {
  border-right: none;
}

.segmented-control label:hover {
  color: white;
  background: rgba(35, 35, 45, 0.7);
}

.segmented-control input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.segmented-control input[type="checkbox"]:checked + span {
  color: white;
  font-weight: 600;
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.4);
}

.segmented-control input[type="checkbox"]:checked + span::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(135deg, #00bfa5, #8e24aa);
}

.segmented-control input[type="checkbox"]:checked ~ .segment-background {
  opacity: 1;
}

.segment-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0, 191, 165, 0.25), rgba(142, 36, 170, 0.25));
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: -1;
  box-shadow: inset 0 0 15px rgba(0, 255, 255, 0.2);
}

.segment-group {
  margin-bottom: 14px;
}

.segment-label {
  font-size: 0.9rem;
  margin-bottom: 5px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.segment-label::after {
  content: 'Select one or multiple';
  font-size: 0.75rem;
  font-weight: normal;
  color: rgba(255, 255, 255, 0.5);
}

/* Keep original text-style-row label and checkbox styles for backward compatibility */
.text-style-row label {
  display: flex;
  align-items: center;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
  cursor: pointer;
  transition: color 0.2s ease;
  background: rgba(25, 25, 35, 0.7);
  padding: 5px 10px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.text-style-row label:hover {
  color: white;
  background: rgba(35, 35, 45, 0.7);
  border-color: rgba(0, 255, 255, 0.2);
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0, 255, 255, 0.15);
}

.text-style-row input[type="checkbox"] {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  margin-right: 6px;
  background: rgba(25, 25, 35, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
}

.text-style-row input[type="checkbox"]:checked {
  background: linear-gradient(135deg, #00bfa5, #8e24aa);
  border-color: rgba(255, 255, 255, 0.4);
}

.text-style-row input[type="checkbox"]:hover {
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 8px rgba(0, 191, 165, 0.3);
}

.text-style-row input[type="checkbox"]:checked::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 2px;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Improved toggle switch styles for season/episode numbers */
.setting-row {
  margin-bottom: 15px;
}

.setting-label-group {
  display: flex;
  justify-content: space-between;
  align-items: center; /* Center align items vertically */
  margin-bottom: 5px;
  height: 24px; /* Fixed height to ensure consistent alignment */
}

.setting-label-group label {
  margin: 0;
  padding: 0;
  font-size: 0.95rem;
  font-weight: 300;
}

/* Toggle container styling */
.setting-label-group .toggle-container {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin: 0;
  height: 100%; /* Makes the container take full height of the parent */
}

/* Small toggle switches */
.toggle-switch.small {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 16px;
  margin-left: 8px;
  vertical-align: middle;
}

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

.toggle-switch.small .toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #444;
  transition: 0.3s;
  border-radius: 16px;
}

.toggle-switch.small .toggle-slider:before {
  position: absolute;
  content: "";
  height: 10px;
  width: 10px;
  left: 3px;
  top: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

.toggle-switch.small input:checked + .toggle-slider {
  background: linear-gradient(135deg, #00bfa5, #8e24aa);
}

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

/* Hide the "Show" text in small toggles */
.toggle-label-small {
  display: none;
}

.segmented-control span {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
}

.segmented-control svg {
  stroke: rgba(255, 255, 255, 0.7);
  transition: all 0.2s ease;
  width: 20px;  /* Increased from 16px */
  height: 20px; /* Increased from 16px */
}

.segmented-control label:hover svg {
  stroke: white;
}

.segmented-control input[type="checkbox"]:checked + span svg {
  stroke: white;
  stroke-width: 2.5;
}

/* 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: 0 0 1.15rem 0;
  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(255, 132, 228, 0.4);
  background:
    linear-gradient(135deg, rgba(255, 74, 199, 0.34), rgba(196, 90, 224, 0.38) 46%, rgba(120, 78, 255, 0.3)),
    linear-gradient(180deg, rgba(255,255,255,0.16), rgba(255,255,255,0.04));
  box-shadow: 0 14px 30px rgba(25, 8, 34, 0.44), 0 0 0 1px rgba(255,255,255,0.05), 0 0 26px rgba(255, 90, 214, 0.18), inset 0 1px 0 rgba(255,255,255,0.2);
  color: #ffffff;
  text-shadow: 0 1px 10px rgba(255, 96, 220, 0.18);
  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(255, 233, 248, 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-improvement {
  background: transparent;
  color: #cebaff;
  text-shadow: 0 0 18px rgba(184,161,255,0.14);
}

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

.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: #ffb3e8;
  font-weight: 600;
}

.changelog-item-featured .changelog-item-marker {
  box-shadow: 0 0 0 3px rgba(255,124,226,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 {
  min-width: 110px;
}

.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 #ff71dc;
  border-radius: 10px;
  box-shadow: 0 0 0 4px rgba(255, 113, 220, 0.15), 0 0 24px rgba(255, 113, 220, 0.28);
  pointer-events: none;
  animation: tourPulse 2s ease-in-out infinite;
}

@keyframes tourPulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(255, 113, 220, 0.15), 0 0 24px rgba(255, 113, 220, 0.28); }
  50% { box-shadow: 0 0 0 7px rgba(255, 113, 220, 0.1), 0 0 36px rgba(255, 113, 220, 0.38); }
}

#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(255, 124, 226, 0.72);
  filter: drop-shadow(0 0 10px rgba(255, 124, 226, 0.16));
  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(255, 113, 220, 0.09), transparent 42%),
    linear-gradient(180deg, rgba(24, 16, 39, 0.96), rgba(12, 8, 24, 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;
}

.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(255, 173, 236, 0.92);
}

#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: #fdf7ff;
  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(255, 124, 226, 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, #ff7ce2, #b969ff);
  opacity: 1;
  transform: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 0 0 1px rgba(255, 151, 234, 0.22), 0 6px 16px rgba(185, 105, 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, #ff70d6, #a159ff);
  border: 1px solid rgba(255, 151, 234, 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(161, 89, 255, 0.24);
}

#tour-next:hover {
  background: linear-gradient(135deg, #ff89e2, #b969ff);
  border-color: rgba(255, 188, 244, 0.42);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 12px 26px rgba(161, 89, 255, 0.24);
}

#tour-next.tour-next-finish {
  background: linear-gradient(135deg, #ff70d6, #c15cff 55%, #7d6bff 100%);
  border-color: rgba(255, 179, 241, 0.4);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 12px 26px rgba(161, 89, 255, 0.24);
}

#tour-next.tour-next-finish:hover {
  background: linear-gradient(135deg, #ff8ce3, #cf75ff 55%, #8a7bff 100%);
  border-color: rgba(255, 204, 246, 0.48);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 12px 26px rgba(161, 89, 255, 0.24);
}

@media screen and (max-width: 900px) {
  .tour-launch-btn {
    display: none !important;
  }
}

/* =====================================================
   THUMBNAIL ZOOM / PAN CONTROLS
   ===================================================== */
.thumbnail-zoom-control {
  margin: 10px 0 6px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.thumbnail-zoom-control .position-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.thumbnail-zoom-control .position-label .label-text {
  font-weight: 500;
  font-size: 0.95rem;
}

.thumbnail-zoom-control .position-value {
  font-size: 0.9rem;
  opacity: 0.9;
  color: #00bfa5;
}

.thumbnail-zoom-control input[type="range"] {
  -webkit-appearance: none;
  flex: 1;
  width: 100%;
  margin-top: 0;
  height: 5px;
  border-radius: 3px;
  background: linear-gradient(to right, #00bfa5, #8e24aa);
}

.thumbnail-zoom-control input[type="range"]::-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);
}

.thumbnail-zoom-control input[type="range"]::-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);
}

.thumbnail-zoom-reset-row {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.thumbnail-zoom-reset-row .action-button {
  flex: 1;
  min-height: 0;
  font-size: 0.7em;
  line-height: 1.15;
  padding: 3px 6px;
  margin-left: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.6);
  box-shadow: none;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: 5px;
  justify-content: center;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.thumbnail-zoom-reset-row .action-button:hover {
  background: rgba(0, 191, 165, 0.08);
  border-color: rgba(0, 191, 165, 0.35);
  color: #00bfa5;
  transform: none;
  box-shadow: none;
}

.thumbnail-zoom-hint {
  margin: 7px 0 0;
  font-size: 0.78em;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.3;
  text-align: center;
}
