/* Tooltip styling (mirrored from Card Lab) */
.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: 600;
  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));
}

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

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

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

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

.sidebar label,
.sidebar .toggle-label {
  font-size: 0.95rem;
  font-weight: 200;
  color: #ffffff;
  letter-spacing: 0.4px;
  filter: brightness(1.2);
}

.sidebar input,
.sidebar select {
  width: 100%;
  max-width: 100%;
  padding: 0.5rem;
  font-size: 0.9rem;
  background: rgba(25, 25, 35, 0.7);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  box-sizing: border-box;
}

.slider-inline {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin: 0.4rem 0;
}

.ps-slider-row {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
}

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

.slider-inline label {
  white-space: nowrap;
  flex: 0 0 auto;
  min-width: 80px;
}

.slider-inline input[type="range"],
.sidebar input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px !important;
  background: linear-gradient(to right, #00bfa5, #8e24aa);
  border-radius: 3px;
  outline: none;
  margin: 0.4rem 0;
  flex: 1;
  border: none;
  padding: 0;
}

.slider-inline input[type="range"]::-webkit-slider-thumb,
.sidebar input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  background: white;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  margin-top: -7px;
}

.slider-inline input[type="range"]::-moz-range-thumb,
.sidebar input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: white;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

#logo-scale,
#blur-amount {
  -webkit-appearance: none !important;
  appearance: none !important;
  width: 100%;
  height: 4px !important;
  background: linear-gradient(to right, #00bfa5, #8e24aa);
  border-radius: 3px;
  outline: none;
  margin: 0.4rem 0;
  padding: 0;
  border: none;
}

#logo-scale::-webkit-slider-thumb,
#blur-amount::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  background: white;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  margin-top: -1px;
}

#logo-scale::-moz-range-thumb,
#blur-amount::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: white;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.slider-inline input[type="range"]::-moz-range-track,
.sidebar input[type="range"]::-moz-range-track,
#logo-scale::-moz-range-track,
#blur-amount::-moz-range-track {
  height: 4px !important;
  background: linear-gradient(to right, #00bfa5, #8e24aa);
  border: none;
}

.sidebar button:not(.ps-range-btn):not(.icon-button) {
  padding: 0.68rem 0.96rem;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: linear-gradient(180deg, rgba(255,255,255,0.11), rgba(255,255,255,0.045));
  color: white;
  font-weight: 800;
  font-size: 0.73rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  margin-top: 0.5rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 10px 22px rgba(0,0,0,0.14);
  transition: 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;
  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;
}

.drop-zone {
  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.55rem 0.96rem;
  height: auto;
  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: 700;
  color: white;
  font-family: "Gabarito", sans-serif;
  margin: 0 0 8px 0;
  width: 100%;
  position: relative;
  font-size: 0.38rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  line-height: 1;
  box-sizing: border-box;
  white-space: nowrap;
}

.drop-zone::before {
  content: "";
  display: inline-block;
  width: 22px;
  height: 22px;
  min-width: 22px;
  min-height: 22px;
  margin-right: 9px;
  background-image: url('../assets/icons/showcase-lab/upload.svg');
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  filter: invert(1);
  opacity: 0.95;
  vertical-align: middle;
  position: relative;
  top: 0;
}

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

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

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

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

#export-wrapper {
  --bg-start: #111111;
  --bg-end: #111111;
  background: linear-gradient(135deg, var(--bg-start), var(--bg-end));
  background-clip: padding-box;
  padding: 2rem;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 500px;
  width: auto;
  max-width: 100%;
  box-sizing: border-box;
  gap: 1rem;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 0 30px rgba(0, 0, 0, 0.6) !important;
  position: relative;
  z-index: 1;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  outline: none !important;
  overflow: hidden !important;
}

#export-bg-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
  overflow: hidden;
  border-radius: 12px;
  margin: 0;
  padding: 0;
  background: linear-gradient(135deg, #111111, #111111);
}

#export-background-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

#export-wrapper > *:not(#export-bg-container) {
  position: relative;
  z-index: 1;
}

#logo-preview {
  max-height: 100px;
  display: none;
}

#backdrop-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
  overflow: hidden;
  border-radius: 12px;
  margin: 0;
  padding: 0;
}

#backdrop-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.section-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: #f0f0f0;
  text-shadow: 0 0 2px rgba(255, 255, 255, 0.2);
  margin: 0.5rem 0 0.5rem 0;
}

.grid-section {
  display: flex;
  justify-content: center;
  width: 100%;
}

.row {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 14px;
  flex-wrap: nowrap;
}

.season-header {
  font-size: 1.1rem;
  font-weight: bold;
  margin-top: 0.25rem;
  margin-bottom: 0.4rem;
  align-self: flex-start;
  width: 100%;
  text-align: left;
  padding-left: 10px;
  color: white;
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.4);
}

.poster-wrapper,
.titlecard-wrapper,
.album-art-wrapper {
  width: 200px;
  position: relative;
}

.poster,
.titlecard,
.album-art {
  width: 100%;
  border-radius: 6px;
  object-fit: cover;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
}

.album-art {
  height: 200px;
}

.delete-btn {
  background: red;
  color: white;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  position: absolute;
  top: 4px;
  right: 4px;
  font-size: 1.2rem;
  cursor: pointer;
}

.credit-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  font-size: 0.9rem;
  text-shadow: 0 0 4px black;
  margin-top: 1rem;
}

.credit-line img {
  height: 22px;
}

.created-by,
.powered-by {
  display: flex;
  align-items: center;
  gap: 8px;
}

#creator-icon {
  height: 35px;
  width: auto;
  object-fit: contain;
  border-radius: 12px;
  display: none;
}

.creator-icon-container {
  width: 35px;
  height: 35px;
  flex-shrink: 0;
}

.creator-text {
  display: flex;
  align-items: center;
  white-space: nowrap;
}

#credit-text {
  margin-left: 0;
}

.powered-by img {
  height: 17px;
  width: auto;
  max-width: 100%;
  margin-bottom: -0.1rem;
  object-fit: contain;
}

.set-id-line {
  font-size: 0.9rem;
  text-shadow: 0 0 4px black;
}

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

.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;
  bottom: 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-label {
  font-size: 0.85rem;
  color: #ccc;
}

.toggle-pair-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.25rem;
}

.section-separator {
  width: 100%;
  border-top: 1px solid rgba(0, 255, 255, 0.1);
  margin: 0.4rem 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;
}

.api-section {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(0, 255, 255, 0.15);
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 0.2rem;
  box-shadow: 0 0 12px rgba(0, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.api-fields label {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
  margin-bottom: 0.45rem;
  display: block;
}

.api-fields input {
  background: linear-gradient(180deg, rgba(24, 30, 44, 0.9), rgba(15, 20, 32, 0.92));
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 0.78rem 0.88rem;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.api-fields input::placeholder {
  color: rgba(255, 255, 255, 0.36);
}

.api-fields input:focus {
  outline: none;
  border-color: rgba(0, 191, 165, 0.24);
  box-shadow: 0 0 0 2px rgba(0, 191, 165, 0.14), inset 0 1px 0 rgba(255,255,255,0.05);
  background: linear-gradient(180deg, rgba(27, 34, 49, 0.94), rgba(17, 23, 37, 0.94));
}

#connect-api-btn {
  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);
  width: 100%;
  border-radius: 12px;
  padding: 0.7rem 0.96rem;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.035em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, filter 0.18s ease;
  margin-top: 0.2rem;
  margin-bottom: 0.3rem;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 10px 22px rgba(0,0,0,0.14);
  line-height: 1.1;
}

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

#api-status {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.58rem 0.7rem;
  border-radius: 10px;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
  margin-top: 0.35rem;
  margin-bottom: 0;
  border: 1px solid transparent;
}

#api-status .api-status-label,
#api-status .api-status-detail {
  display: block;
}

#api-status .api-status-label {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}

#api-status .api-status-detail {
  margin-top: 0.16rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.25;
  text-transform: none;
  overflow-wrap: anywhere;
}

.status-connected {
  background: linear-gradient(180deg, rgba(17, 64, 58, 0.9), rgba(10, 44, 39, 0.92));
  color: #a8fff1;
  border-color: rgba(60, 229, 198, 0.18);
  text-align: left;
}

.status-disconnected {
  background: linear-gradient(180deg, rgba(59, 21, 33, 0.88), rgba(42, 15, 24, 0.9));
  color: #ff9aae;
  border-color: rgba(255, 124, 153, 0.16);
}

.set-selector {
  max-height: 240px;
  overflow-y: auto;
  background: linear-gradient(180deg, rgba(15, 20, 32, 0.9), rgba(10, 14, 24, 0.94));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.7rem;
  margin-top: 0.6rem;
  display: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03), 0 12px 24px rgba(0, 0, 0, 0.14);
}

.set-item {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 0.65rem;
  margin-bottom: 0.5rem;
  cursor: pointer;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
  color: white;
}

.set-item:hover {
  background-color: rgba(0, 255, 255, 0.15);
  box-shadow: 0 0 6px rgba(0, 255, 255, 0.2);
}

.set-item .set-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: #ffffff;
  margin-bottom: 0.2rem;
  text-shadow: 0 0 4px rgba(0, 255, 255, 0.2);
}

.set-item .set-details {
  font-size: 0.78rem;
  color: #bbbbbb;
  line-height: 1.3;
  letter-spacing: 0.3px;
}

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

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

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

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

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

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

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

.creator-row input {
  flex: 1;
}

.icon-upload-btn {
  background: linear-gradient(180deg, rgba(255,255,255,0.11), rgba(255,255,255,0.045));
  border: 1px solid rgba(255,255,255,0.12);
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: none;
  border-radius: 10px;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 10px 22px rgba(0,0,0,0.14);
}

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

.icon-upload-btn img.icon {
  width: 15px;
  height: 15px;
  filter: invert(100%) brightness(1.5);
  opacity: 0.8;
}

.compact-row-selects {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.inline-select {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.inline-select label {
  flex: 1;
  font-size: 0.9rem;
  font-weight: 400;
  color: #ffffff;
  text-shadow: 0 0 2px rgba(0, 255, 255, 0.2);
  white-space: nowrap;
}

.inline-select select {
  flex: 0 0 72px;
  padding: 0.35rem 0.5rem;
  font-size: 0.95rem;
  font-weight: 400;
  border-radius: 6px;
  background: #111;
  max-width: 70px;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
  box-shadow: none;
}

.gradient-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
}

.gradient-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: white;
  text-shadow: 0 0 3px rgba(0, 255, 255, 0.2);
}

.gradient-row {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.gradient-row input[type="color"] {
  -webkit-appearance: none;
  appearance: none;
  border: none;
  width: 100%;
  height: 12px;
  border-radius: 0px;
  padding: 0;
  cursor: pointer;
  background-color: transparent;
  outline: none;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12),
    0 0 6px rgba(0, 255, 255, 0.15);
  transition: all 0.2s ease;
}

.gradient-row input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
  border-radius: 999px;
}

.gradient-row input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 999px;
}

.gradient-col {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
  width: 100%;
}

.mini-label {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.8);
  margin-left: 2px;
  margin-bottom: 0.25rem;
}

.pickr-bar-container {
  height: 30px !important;
  width: 100%;
}

.pickr .pcr-button {
  width: 100% !important;
  height: 18px !important;
  border-radius: 4px !important;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12),
    0 0 6px rgba(0, 255, 255, 0.15);
}

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

/* ==========================================
   BASE STYLES
   ========================================== */
:root {
  --showcase-accent: #00bfa5;
  --showcase-accent-strong: #23d8be;
  --showcase-accent-soft: rgba(0, 191, 165, 0.18);
  --showcase-accent-faint: rgba(0, 191, 165, 0.08);
  --showcase-accent-border: rgba(0, 191, 165, 0.24);
  --showcase-panel-bg: linear-gradient(180deg, rgba(22, 36, 50, 0.92), rgba(16, 22, 38, 0.82));
  --showcase-panel-hover: linear-gradient(180deg, rgba(28, 44, 60, 0.94), rgba(19, 25, 42, 0.86));
}

body {
  margin: 0;
  font-family: 'Gabarito', sans-serif;
  background-color: #060511;
  background-image:
    radial-gradient(ellipse 78% 58% at 10% 0%, rgba(0, 191, 165, 0.16) 0%, transparent 58%),
    radial-gradient(ellipse 54% 36% at 96% 18%, rgba(0, 191, 165, 0.08) 0%, transparent 48%),
    radial-gradient(ellipse 95% 72% at 50% 100%, rgba(9, 55, 70, 0.34) 0%, transparent 60%),
    linear-gradient(180deg, #071019 0%, #08111a 28%, #09131f 62%, #081018 100%);
  background-attachment: fixed;
  color: white;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
}

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

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

/* ==========================================
   SIDEBAR STYLING
   ========================================== */
.sidebar {
  width: 280px;
  min-width: 280px;
  position: sticky;
  align-self: flex-start;
  top: 68px;
  height: calc(100vh - 68px);
  min-height: calc(100vh - 68px);
  max-height: calc(100vh - 68px);
  isolation: isolate;
  background:
    linear-gradient(180deg, rgba(0, 191, 165, 0.1), transparent 18%),
    radial-gradient(circle at 0% 0%, rgba(60, 229, 198, 0.12), transparent 30%),
    linear-gradient(180deg, rgba(20, 39, 47, 0.97), rgba(11, 24, 31, 0.985)),
    linear-gradient(90deg, var(--showcase-accent-soft), transparent 26%);
  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(--showcase-accent-border);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  box-sizing: border-box;
  align-items: center;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.3) rgba(0, 0, 0, 0.1);
}

.sidebar::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.035), transparent 14%),
    radial-gradient(circle at -10% 0%, rgba(0, 191, 165, 0.16), transparent 30%),
    linear-gradient(180deg, rgba(60, 229, 198, 0.05), transparent 24%);
  z-index: -1;
}

.sidebar::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(180deg, rgba(60, 229, 198, 0.36), rgba(0, 191, 165, 0.05) 32%, rgba(0, 191, 165, 0.18) 70%, rgba(0, 191, 165, 0.04));
  pointer-events: none;
}

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

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

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

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

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

.header-left img {
  width: auto;
  height: 36px;
  margin-top: 0;
  filter: drop-shadow(0 0 10px rgba(0,191,165,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%, #ccfff5 40%, #3ce5c6 75%, #00bfa5 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 16px rgba(0, 191, 165, 0.3));
}

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

.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(0,191,165,0.16), rgba(0,191,165,0.06));
  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(0,191,165,0.72), rgba(0,191,165,0.22));
  opacity: 0;
  transform: scaleX(0.4);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

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

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

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

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

.custom-modal {
  position: relative;
  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-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(255,255,255,0.1), rgba(255,255,255,0.04));
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.custom-modal-close:hover {
  transform: translateY(-1px);
  border-color: rgba(0,255,240,0.18);
  background: linear-gradient(180deg, rgba(255,255,255,0.14), rgba(255,255,255,0.06));
}

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

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

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

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

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

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

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

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

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

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

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

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

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

/* Fixed Save Config Modal */
#save-confirm-overlay .custom-modal,
#load-confirm-overlay .custom-modal {
  width: min(560px, 92vw);
  max-width: 90%;
  padding: 1.7rem 1.5rem 1.35rem;
}

.save-config-shell {
  position: relative;
  width: min(760px, 94vw);
  max-width: 94vw;
  max-height: min(88vh, 920px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  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: 22px;
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 0 1px rgba(255,255,255,0.02);
}

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

.save-config-shell-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1.35rem 0.95rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.save-config-shell-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
  min-width: 0;
}

#saveConfirmTitle {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #f4fbff;
}

.save-config-shell-subtitle {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.5;
  color: rgba(255,255,255,0.64);
}

.save-config-shell .custom-modal-close {
  position: static;
  flex-shrink: 0;
}

.save-config-shell-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.15rem 0.7rem;
}

.save-config-main {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.save-config-main[hidden],
.save-config-success[hidden] {
  display: none !important;
}

.save-config-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.save-config-toolbar-copy {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.72);
  line-height: 1.55;
  font-weight: 600;
}

.save-selection-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.mini-btn {
  background: linear-gradient(180deg, rgba(255,255,255,0.09), rgba(255,255,255,0.04));
  color: rgba(255,255,255,0.82);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  padding: 0.6rem 0.95rem;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
  min-width: 118px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 10px 22px rgba(0,0,0,0.14);
}

.mini-btn:hover {
  background: linear-gradient(180deg, rgba(255,255,255,0.13), rgba(255,255,255,0.07));
  border-color: rgba(255,255,255,0.22);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 14px 28px rgba(0,0,0,0.18);
}

.save-config-sections {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

.save-config-section {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.save-config-section h4 {
  margin: 0;
  padding-left: 12px;
  border-left: 3px solid rgba(255,255,255,0.22);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.9);
}

.save-config-section[data-theme="primary"] h4 {
  color: #b8fff8;
  border-left-color: rgba(0,255,240,0.42);
}

.save-config-section[data-theme="secondary"] h4 {
  color: #e4c8ff;
  border-left-color: rgba(181,123,255,0.42);
}

.save-config-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.02));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.save-config-section[data-theme="primary"] .save-config-grid {
  background: linear-gradient(180deg, rgba(0,255,240,0.06), rgba(255,255,255,0.02));
  border-color: rgba(0,255,240,0.1);
}

.save-config-section[data-theme="secondary"] .save-config-grid {
  background: linear-gradient(180deg, rgba(181,123,255,0.065), rgba(255,255,255,0.02));
  border-color: rgba(181,123,255,0.12);
}

.save-config-option {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 0.96rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.03);
  background: transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.save-config-option:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.save-config-option input[type="checkbox"] {
  margin: 0;
  width: 16px;
  height: 16px;
  accent-color: rgba(255,255,255,0.9);
  cursor: pointer;
  transform: translateY(2px);
}

.save-config-section[data-theme="primary"] .save-config-option input[type="checkbox"] {
  accent-color: #5df4ea;
}

.save-config-section[data-theme="secondary"] .save-config-option input[type="checkbox"] {
  accent-color: #c89bff;
}

.save-config-option-copy {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  min-width: 0;
}

.save-config-option-title {
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.25;
  color: rgba(255,255,255,0.96);
}

.save-config-option-meta {
  font-size: 0.81rem;
  font-weight: 600;
  line-height: 1.5;
  color: rgba(255,255,255,0.74);
}

.save-config-section[data-theme="primary"] .save-config-option:has(input[type="checkbox"]:checked) {
  background: linear-gradient(180deg, rgba(0,255,240,0.12), rgba(0,255,240,0.05));
  border-color: rgba(0,255,240,0.22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 0 0 1px rgba(0,255,240,0.04);
}

.save-config-section[data-theme="secondary"] .save-config-option:has(input[type="checkbox"]:checked) {
  background: linear-gradient(180deg, rgba(181,123,255,0.14), rgba(181,123,255,0.05));
  border-color: rgba(181,123,255,0.24);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 0 0 1px rgba(181,123,255,0.05);
}

.save-config-option:has(input[type="checkbox"]:checked) .save-config-option-title {
  color: #fff;
}

.save-config-option:has(input[type="checkbox"]:checked) .save-config-option-meta {
  color: rgba(255,255,255,0.78);
}

.save-config-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 260px;
  text-align: center;
  padding: 1.2rem 1.25rem 1.8rem;
}

.save-success-title {
  display: block;
  font-size: 1.06rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 0.4rem;
}

.save-success-copy {
  display: block;
  color: #9ef3ea;
  font-size: 0.86rem;
  line-height: 1.45;
}

.save-config-footer {
  justify-content: flex-end;
  gap: 0.7rem;
  padding: 0.95rem 1.35rem 1.15rem;
  margin-top: auto;
  border-top: 1px solid rgba(255,255,255,0.08);
}

#saveConfirmOk {
  min-width: 168px;
  margin-top: 0;
}

#saveConfirmCancel {
  min-width: 132px;
  margin-top: 0;
}

#saveConfirmOk.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);
  box-shadow: 0 12px 26px rgba(0, 255, 240, 0.14), inset 0 1px 0 rgba(255,255,255,0.08);
}

#saveConfirmOk.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);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(0, 255, 240, 0.18), inset 0 1px 0 rgba(255,255,255,0.1);
}

#saveConfirmCancel:hover {
  background: linear-gradient(180deg, rgba(255,255,255,0.13), rgba(255,255,255,0.07));
  border-color: rgba(255,255,255,0.22);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 14px 28px rgba(0,0,0,0.18);
}

@media (max-width: 640px) {
  #save-confirm-overlay .custom-modal,
  #load-confirm-overlay .custom-modal {
    width: min(100%, 96vw);
    padding: 1.45rem 1rem 1.05rem;
  }

  .save-config-shell {
    max-width: 96vw;
  }

  .save-config-shell-header {
    padding: 0.8rem 1rem 0.85rem;
  }

  .save-config-shell-body {
    padding: 0.85rem 0.85rem 0.2rem;
  }

  .save-config-toolbar {
    align-items: stretch;
  }

  .save-selection-actions {
    justify-content: stretch;
  }

  .mini-btn {
    flex: 1 1 0;
  }

  .save-config-grid {
    grid-template-columns: 1fr;
  }

  #saveConfirmCancel,
  #saveConfirmOk {
    width: 100%;
    min-width: 0;
  }

  .save-config-footer {
    padding: 0.85rem 1rem 1rem;
    justify-content: stretch;
  }
}

.loading-modal {
  padding: 1.9rem 1.75rem 1.45rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

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

.loading-spinner {
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-top-color: #b57bff;
  border-right-color: #00fff0;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  animation: showcaseLoaderSpin 1s linear infinite;
  display: none;
  margin: 10px auto 0;
  box-shadow: 0 0 10px rgba(0, 255, 240, 0.14);
}

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

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

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

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

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

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

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

.action-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  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);
  padding: 0.68rem 0.96rem;
  border-radius: 12px;
  color: white;
  cursor: pointer;
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 10px 22px rgba(0,0,0,0.14);
  font-family: "Gabarito", sans-serif;
  margin-left: 0.5rem;
  height: auto;
}

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

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

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

.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;
  box-sizing: border-box;
}

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

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

/* Collapsible sections */
.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: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;
}

.collapsible-header .info-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-left: 0.15rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: linear-gradient(180deg, rgba(255,255,255,0.09), rgba(255,255,255,0.035));
  color: rgba(255,255,255,0.72);
  font-size: 0.66rem;
  font-weight: 800;
  line-height: 1;
  flex-shrink: 0;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.collapsible-header .info-button:hover {
  background: linear-gradient(180deg, rgba(255,255,255,0.14), rgba(255,255,255,0.06));
  border-color: rgba(0,255,240,0.22);
  color: #fff;
  transform: translateY(-1px);
}

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

.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(0, 191, 165, 0.26);
  box-shadow: inset 0 -2px 0 rgba(0, 191, 165, 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;
}

/* Collapsible section content styling */
.sidebar .collapsible .drop-zone {
  margin: 0.75rem 0;
  padding: 0.7rem;
  text-align: center;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.035em;
  white-space: nowrap;
}

.sidebar .collapsible .drop-zone::before {
  margin-right: 0;
}

.sidebar .collapsible .slider-inline {
  margin: 0.8rem 0;
}

.sidebar .collapsible .inline-select {
  margin: 0.8rem 0;
  align-items: center;
}

.sidebar .collapsible .toggle-container {
  margin: 0.8rem 0;
}

.sidebar .collapsible .gradient-section {
  margin-top: 1rem;
}

.sidebar .collapsible .collapsible-content > input[type="text"] {
  margin-bottom: 0.75rem;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

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

@media (max-width: 768px) {
  .logo-container {
    position: static;
    transform: none;
  }
}

@media screen and (min-width: 901px) {
  .sidebar-toggle {
    display: none;
  }

  .mobile-canvas-actions {
    display: none !important;
  }

  .header-mobile-menu {
    display: none;
  }

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

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

@media screen and (max-width: 900px) {
  .mobile-canvas-actions {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    max-width: 550px;
    margin: 1rem auto;
    padding: 0 1rem;
  }
}

@media (max-height: 700px) {
  .sidebar {
    padding-right: 1rem;
  }
}

/* Config Save/Load Dialog Styles */
.settings-selection {
  max-height: min(56vh, 560px);
  overflow-y: auto;
  margin: 1rem 0 0;
  padding: 1rem;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015)),
    rgba(7, 11, 24, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.settings-group {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.settings-group:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.settings-group h5 {
  margin: 0 0 0.75rem;
  color: #bafcf6;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: left;
}

.checkbox-container {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 0.85rem;
  position: relative;
  margin-bottom: 0.65rem;
  cursor: pointer;
  user-select: none;
  color: white;
  padding: 0.82rem 0.95rem;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.08);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.checkbox-container:last-child {
  margin-bottom: 0;
}

.checkbox-container:hover {
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.025));
  border-color: rgba(0, 255, 240, 0.16);
  transform: translateY(-1px);
}

.checkbox-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  position: relative;
  grid-column: 1;
  height: 22px;
  width: 22px;
  min-width: 22px;
  background-color: rgba(0, 0, 0, 0.24);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 7px;
  transition: all 0.2s ease;
}

.checkbox-container:hover input ~ .checkmark {
  background-color: rgba(0, 0, 0, 0.5);
  border-color: rgba(255, 255, 255, 0.4);
}

.checkbox-container input:checked ~ .checkmark {
  background: linear-gradient(135deg, #00bfa5, #8e24aa);
  border-color: transparent;
  box-shadow: 0 8px 18px rgba(0, 191, 165, 0.22);
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
  display: block;
}

.checkbox-container .checkmark:after {
  left: 8px;
  top: 4px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.setting-label {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  min-width: 0;
}

.setting-name {
  font-weight: 700;
  color: white;
  font-size: 0.92rem;
  line-height: 1.3;
  text-align: left;
}



