/* Background Remover — pixel-match layout */

.bgr-page {
  width: 100%;
  padding: 32px 0 56px;
}

/* ── Hero (centered) ── */
.bgr-hero {
  text-align: center;
  margin-bottom: 40px;
}

.bgr-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 20px;
  padding: 6px 16px;
  border-radius: 999px;
  background: var(--theme-dim);
  border: 1px solid #bfdbfe;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--theme);
}

.bgr-badge svg {
  width: 14px;
  height: 14px;
}

.bgr-badge__sep {
  color: #93c5fd;
}

.bgr-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(1.85rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text);
}

.bgr-hero h1 span {
  color: var(--theme);
}

.bgr-hero__lead {
  margin: 0 auto;
  max-width: 58ch;
  font-size: 0.98rem;
  line-height: 1.65;
  color: var(--text-soft);
}

/* ── Tool card ── */
.bgr-tool {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-bottom: 32px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

@media (min-width: 900px) {
  .bgr-tool {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 28px;
  }
}

.bgr-upload {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  padding: 32px 24px;
  border: 2px dashed #93c5fd;
  border-radius: 14px;
  background: var(--theme-dim);
  text-align: center;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.bgr-upload.is-dragover {
  border-color: var(--theme);
  background: #dbeafe;
}

.bgr-upload input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.bgr-upload__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}

.bgr-upload__icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--theme);
}

.bgr-upload__icon svg {
  width: 48px;
  height: 48px;
}

.bgr-upload h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.bgr-upload__or {
  margin: 0 0 12px;
  font-size: 0.85rem;
  color: var(--muted);
}

.bgr-choose-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 10px 22px;
  border-radius: 10px;
  background: var(--theme);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  pointer-events: none;
  transition: background 0.2s ease;
}

.bgr-upload__hint {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
}

/* Preview panel */
.bgr-preview {
  display: flex;
  flex-direction: column;
  min-height: 320px;
}

.bgr-preview__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.bgr-preview__head h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.bgr-preview__format {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-soft);
}

.bgr-preview__format select {
  padding: 6px 28px 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 8px center;
  font: inherit;
  font-size: 0.82rem;
  color: var(--text);
  appearance: none;
  cursor: pointer;
}

.bgr-preview__window {
  flex: 1;
  min-height: 220px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background-color: #fff;
  background-image:
    linear-gradient(45deg, #e2e8f0 25%, transparent 25%),
    linear-gradient(-45deg, #e2e8f0 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e2e8f0 75%),
    linear-gradient(-45deg, transparent 75%, #e2e8f0 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 16px;
  position: relative;
}

.bgr-preview__processing {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.88);
  z-index: 2;
}

.bgr-preview__processing[hidden] {
  display: none !important;
}

.bgr-preview__processing p {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--theme);
}

.bgr-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #dbeafe;
  border-top-color: var(--theme);
  border-radius: 50%;
  animation: bgr-spin 0.7s linear infinite;
}

@keyframes bgr-spin {
  to { transform: rotate(360deg); }
}

.bgr-preview__window img {
  max-width: 100%;
  max-height: 220px;
  object-fit: contain;
}

.bgr-preview__empty {
  font-size: 0.85rem;
  color: var(--muted);
}

.bgr-download-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  border-radius: 12px;
  background: var(--theme);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.bgr-download-btn:hover:not(:disabled) {
  background: var(--theme-deep);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.bgr-download-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.bgr-download-btn svg {
  width: 18px;
  height: 18px;
}

/* ── Queue ── */
.bgr-queue {
  margin-bottom: 56px;
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.bgr-queue[hidden] {
  display: none !important;
}

.bgr-queue__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.bgr-queue__actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.bgr-download-all-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--theme);
  transition: color 0.2s ease;
}

.bgr-download-all-btn:hover {
  color: var(--theme-deep);
}

.bgr-download-all-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.bgr-download-all-btn svg {
  width: 14px;
  height: 14px;
}

.bgr-download-all-btn[hidden] {
  display: none !important;
}

.bgr-queue__head h4 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.bgr-clear-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 500;
  color: #ef4444;
  transition: color 0.2s ease;
}

.bgr-clear-btn:hover {
  color: #b91c1c;
}

.bgr-clear-btn svg {
  width: 14px;
  height: 14px;
}

.bgr-queue__list {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.bgr-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.bgr-row:last-child {
  border-bottom: 0;
}

.bgr-row__thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--line);
  flex-shrink: 0;
}

.bgr-row__info {
  flex: 1;
  min-width: 0;
}

.bgr-row__name {
  margin: 0 0 2px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bgr-row__meta {
  margin: 0;
  font-size: 0.75rem;
  color: var(--muted);
}

.bgr-row__status {
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
}

.bgr-row__status--ready {
  background: #dcfce7;
  color: #15803d;
}

.bgr-row__status--processing {
  background: #dbeafe;
  color: var(--theme-deep);
}

.bgr-row__status--error {
  background: #fee2e2;
  color: #b91c1c;
}

.bgr-row__download-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--theme);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  transition: background 0.2s ease;
}

.bgr-row__download-btn:hover {
  background: var(--theme-deep);
}

.bgr-row__download-btn svg {
  width: 14px;
  height: 14px;
}

.bgr-row__progress {
  flex-shrink: 0;
  width: 80px;
  height: 4px;
  border-radius: 99px;
  background: #e2e8f0;
  overflow: hidden;
}

.bgr-row__progress-bar {
  height: 100%;
  width: 35%;
  border-radius: inherit;
  background: var(--theme);
  animation: bgr-indeterminate 1.1s ease-in-out infinite;
}

@keyframes bgr-indeterminate {
  0% { margin-left: 0; width: 20%; }
  50% { margin-left: 40%; width: 35%; }
  100% { margin-left: 80%; width: 20%; }
}

.bgr-upload.is-processing {
  border-color: var(--theme);
  background: #dbeafe;
}

.bgr-upload.is-processing .bgr-upload__hint::after {
  content: " — Processing…";
  color: var(--theme);
  font-weight: 600;
}

.bgr-row__preview-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-soft);
  transition: border-color 0.2s ease, color 0.2s ease;
}

.bgr-row__preview-btn:hover {
  border-color: var(--theme);
  color: var(--theme);
}

.bgr-row__preview-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.bgr-row__preview-btn svg {
  width: 14px;
  height: 14px;
}

.bgr-row__delete {
  flex-shrink: 0;
  padding: 8px;
  border-radius: 8px;
  color: #ef4444;
  transition: background 0.2s ease;
}

.bgr-row__delete:hover {
  background: #fee2e2;
}

.bgr-row__delete svg {
  width: 16px;
  height: 16px;
}

/* ── How it works ── */
.bgr-how {
  margin-bottom: 56px;
  text-align: center;
}

.bgr-how h2 {
  margin: 0 0 36px;
  font-size: clamp(1.35rem, 2.8vw, 1.65rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.bgr-steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

@media (min-width: 768px) {
  .bgr-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }
}

.bgr-step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 12px;
}

@media (min-width: 768px) {
  .bgr-step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 44px;
    left: calc(50% + 40px);
    width: calc(100% - 80px);
    border-top: 2px dashed #93c5fd;
  }
}

.bgr-step__num {
  position: absolute;
  top: 56px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--theme);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
}

.bgr-step__icon {
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  border-radius: 50%;
  border: 2px solid #bfdbfe;
  background: var(--theme-dim);
  color: var(--theme);
}

.bgr-step__icon svg {
  width: 28px;
  height: 28px;
}

.bgr-step h3 {
  margin: 0 0 8px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
}

.bgr-step p {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--muted);
}

/* ── Feature row ── */
.bgr-features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin-bottom: 56px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

@media (min-width: 640px) {
  .bgr-features {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.bgr-feature {
  padding: 24px 20px;
  text-align: center;
  border-bottom: 1px solid var(--line);
}

@media (min-width: 640px) {
  .bgr-feature {
    border-bottom: 0;
    border-right: 1px solid var(--line);
  }
  .bgr-feature:last-child {
    border-right: 0;
  }
}

.bgr-feature__icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  border-radius: 10px;
  background: var(--theme-dim);
  color: var(--theme);
}

.bgr-feature__icon svg {
  width: 22px;
  height: 22px;
}

.bgr-feature h3 {
  margin: 0 0 6px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
}

.bgr-feature p {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--muted);
}

/* ── Two-column info ── */
.bgr-columns {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-bottom: 56px;
}

@media (min-width: 900px) {
  .bgr-columns {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 40px;
  }
}

.bgr-columns h2 {
  margin: 0 0 20px;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
}

.bgr-checklist {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bgr-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text-soft);
}

.bgr-checklist__icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--theme);
  color: #fff;
}

.bgr-checklist__icon svg {
  width: 12px;
  height: 12px;
}

.bgr-usecases {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bgr-usecase {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-soft);
  transition: border-color 0.2s ease;
}

.bgr-usecase:hover {
  border-color: #cbd5e1;
}

.bgr-usecase__icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid #bfdbfe;
  background: var(--theme-dim);
  color: var(--theme);
}

.bgr-usecase__icon svg {
  width: 18px;
  height: 18px;
}

/* ── FAQ & About ── */
.bgr-info {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-bottom: 56px;
}

@media (min-width: 900px) {
  .bgr-info {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 28px;
  }
}

.bgr-faq,
.bgr-about {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.bgr-faq h2,
.bgr-about h2 {
  margin: 0 0 20px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.bgr-faq__item {
  border-bottom: 1px solid var(--line);
}

.bgr-faq__item:last-child {
  border-bottom: 0;
}

.bgr-faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  list-style: none;
}

.bgr-faq__item summary::-webkit-details-marker {
  display: none;
}

.bgr-faq__chevron {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: var(--muted);
  transition: transform 0.2s ease;
}

.bgr-faq__item[open] .bgr-faq__chevron {
  transform: rotate(180deg);
}

.bgr-faq__item p {
  margin: 0 0 16px;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-soft);
}

.bgr-about p {
  margin: 0 0 14px;
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--text-soft);
}

.bgr-tags {
  margin-top: 20px;
  padding: 16px 18px;
  border-radius: 10px;
  background: var(--theme-dim);
}

.bgr-tags h3 {
  margin: 0 0 10px;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--theme);
}

.bgr-tags__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bgr-tags__list span {
  padding: 4px 10px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid #bfdbfe;
  font-size: 0.75rem;
  color: var(--text-soft);
}

/* ── Formats & Tips ── */
.bgr-formats-tips {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-bottom: 56px;
}

@media (min-width: 900px) {
  .bgr-formats-tips {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 40px;
  }
}

.bgr-formats h2,
.bgr-tips h2 {
  margin: 0 0 20px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.bgr-format-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.bgr-format-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  text-align: center;
}

.bgr-format-item__icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid #bfdbfe;
  background: var(--theme-dim);
  color: var(--theme);
  font-size: 0.72rem;
  font-weight: 700;
}

.bgr-format-item span {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-soft);
}

.bgr-format-grid .bgr-format-item:nth-child(4),
.bgr-format-grid .bgr-format-item:nth-child(5) {
  grid-column: span 1;
}

@media (min-width: 480px) {
  .bgr-format-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.bgr-tips-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.bgr-tips-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.bgr-tips-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--text-soft);
}

.bgr-tips-list__check {
  flex-shrink: 0;
  color: var(--theme);
  margin-top: 2px;
}

.bgr-pro-tip {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 10px;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 1px solid #bfdbfe;
}

.bgr-pro-tip p {
  margin: 0;
  flex: 1;
  font-size: 0.84rem;
  line-height: 1.55;
  color: var(--text-soft);
}

.bgr-pro-tip strong {
  color: var(--theme);
}

.bgr-pro-tip__icon {
  flex-shrink: 0;
  color: var(--theme);
}

.bgr-pro-tip__icon svg {
  width: 24px;
  height: 24px;
}

/* ── Trust bar ── */
.bgr-trust {
  margin-bottom: 32px;
  padding: 28px 24px;
  border-radius: 16px;
  background: linear-gradient(135deg, #eff6ff 0%, #f0f9ff 100%);
  border: 1px solid #dbeafe;
  text-align: center;
}

.bgr-trust > p {
  margin: 0 0 24px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
}

.bgr-trust__items {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 640px) {
  .bgr-trust__items {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
  }
}

.bgr-trust__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.bgr-trust__item-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  border-radius: 50%;
  background: var(--theme);
  color: #fff;
}

.bgr-trust__item-icon svg {
  width: 18px;
  height: 18px;
}

.bgr-trust__item h3 {
  margin: 0 0 4px;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text);
}

.bgr-trust__item p {
  margin: 0;
  font-size: 0.75rem;
  color: var(--muted);
}

.bgr-seo-keywords {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
