/* Dynamic Background & Filter Engine */
:root {
  --bg-blur: 0px;
  --bg-overlay-opacity: 0.05;
  --bg-brightness: 1.05;
  --bg-scale: 1.05;
}

#app-bg-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

#app-bg-image {
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(var(--bg-blur)) brightness(var(--bg-brightness));
  transform: scale(var(--bg-scale));
  transition: filter 0.2s ease, transform 0.3s ease;
  will-change: filter, transform;
}

#app-bg-overlay {
  display: none; /* Moved into .app-mobile-container::before so outside 2% margins show pure wallpaper */
}

/* Preset gallery thumbnails */
.bg-preset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(105px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.bg-preset-card {
  height: 70px;
  border-radius: 11px;
  background-size: cover;
  background-position: center;
  border: 2px solid transparent;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.bg-preset-card:active {
  transform: scale(0.95);
}

.bg-preset-card.active {
  border-color: var(--brand-yellow, #fff13e);
  box-shadow: 0 0 0 2px rgba(255, 241, 62, 0.45);
}

.bg-preset-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 4px 5px;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(4px);
  font-size: 12px; /* Scaled 1 size up */
  font-weight: 600;
  color: #f8fafc;
  text-align: center;
}

/* Drag and Drop Zone */
.drop-zone {
  border: 2px dashed var(--border-subtle);
  border-radius: 13px;
  padding: 22px 14px;
  text-align: center;
  background: rgba(125, 125, 125, 0.06);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.drop-zone:hover,
.drop-zone.dragover {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.08);
}

.drop-zone-icon {
  width: 34px;
  height: 34px;
  margin: 0 auto 9px;
  stroke: var(--text-secondary);
}

.drop-zone-text {
  font-size: 14.5px; /* Scaled 1 size up */
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.drop-zone-subtext {
  font-size: 12px; /* Scaled 1 size up */
  color: var(--text-muted);
}

/* Slider Controls */
.control-slider-group {
  margin-top: 15px;
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.control-slider-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.control-slider-header {
  display: flex;
  justify-content: space-between;
  font-size: 13.5px; /* Scaled 1 size up */
  color: var(--text-secondary);
}

.control-slider-header span:last-child {
  color: var(--text-primary);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: rgba(125, 125, 125, 0.22);
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.15);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  transition: transform 0.1s ease;
}

input[type="range"]::-webkit-slider-thumb:active {
  transform: scale(1.2);
}
