.background-remover-page{
  max-width:1280px;
  margin:0 auto;
  padding:34px 18px 46px;
  color:var(--text);
}
.background-remover-page *{
  box-sizing:border-box;
}
.background-remover-page h1{
  margin:0 0 12px;
  text-align:center;
  font-size:clamp(32px,5vw,52px);
  line-height:1.05;
  text-shadow:0 0 24px rgba(120,90,255,.22);
}
.bgr-intro{
  max-width:820px;
  margin:0 auto 24px;
  text-align:center;
  color:#c9c9d6;
  font-size:clamp(15px,2vw,18px);
  line-height:1.6;
}
.bgr-upload{
  max-width:760px;
  margin:0 auto 20px;
  border:2px dashed rgba(255,255,255,.16);
  border-radius:18px;
  background:linear-gradient(135deg,rgba(120,90,255,.10),rgba(40,220,255,.05));
  transition:.2s;
}
.bgr-upload:hover,
.bgr-upload.bgr-dragover{
  border-color:var(--link);
  box-shadow:0 0 30px rgba(120,90,255,.2);
}
.bgr-upload-label{
  min-height:84px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  gap:8px;
  cursor:pointer;
  font-weight:700;
  color:#ececff;
}
.bgr-upload-label i{
  font-size:26px;
}
#bgrImageInput{
  display:none;
}
.bgr-layout{
  display:grid;
  grid-template-columns:minmax(0,1fr) 320px;
  gap:18px;
  align-items:start;
}
.bgr-preview{
  display:flex;
  flex-direction:column;
  gap:18px;
}
.bgr-panel,
.bgr-section{
  background:var(--content);
  border:1px solid rgba(255,255,255,.08);
  border-radius:18px;
  padding:16px;
  box-shadow:0 16px 38px rgba(0,0,0,.18);
}
.bgr-panel-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:12px;
}
.bgr-panel-head h2{
  margin:0;
  font-size:18px;
  color:var(--link);
}
.bgr-canvas-wrap{
  display:flex;
  justify-content:center;
  align-items:center;
  min-height:340px;
  overflow:hidden;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.08);
  background:#181820;
}
.bgr-canvas-wrap canvas{
  display:block;
  max-width:100%;
  max-height:700px;
}
.bgr-checker{
  background-color:#1b1b22;
  background-image:
    linear-gradient(45deg,rgba(255,255,255,.07) 25%,transparent 25%),
    linear-gradient(-45deg,rgba(255,255,255,.07) 25%,transparent 25%),
    linear-gradient(45deg,transparent 75%,rgba(255,255,255,.07) 75%),
    linear-gradient(-45deg,transparent 75%,rgba(255,255,255,.07) 75%);
  background-size:24px 24px;
  background-position:0 0,0 12px,12px -12px,-12px 0;
}
.bgr-sidebar{
  position:sticky;
  top:14px;
  display:flex;
  flex-direction:column;
  gap:14px;
}
.bgr-sidebar h2{
  margin:0;
  color:var(--link);
  font-size:20px;
}
.bgr-sidebar label{
  display:flex;
  flex-direction:column;
  gap:6px;
  font-size:13px;
  font-weight:700;
  color:#d0d0dc;
}
.bgr-sidebar select,
.bgr-sidebar input[type=color]{
  width:100%;
  height:42px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(0,0,0,.22);
  color:var(--text);
  padding:0 10px;
}
.bgr-sidebar input[type=color]{
  padding:4px;
}
.bgr-actions{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:6px;
}
.bgr-actions button{
  height:46px;
  border:none;
  border-radius:12px;
  cursor:pointer;
  font-weight:700;
  font-size:14px;
  transition:.15s;
}
.bgr-actions button:hover{
  transform:translateY(-1px);
  filter:brightness(1.05);
}

.bgr-primary{
  height:48px;
  border:none;
  border-radius:12px;
  background:linear-gradient(135deg,#7b5cff 0%,#5f7dff 45%,#29d3ff 100%);
  color:#fff;
  font-size:15px;
  font-weight:800;
  cursor:pointer;
  box-shadow:
    0 10px 24px rgba(123,92,255,.28),
    inset 0 1px 0 rgba(255,255,255,.18);
  transition:
    transform .15s ease,
    filter .15s ease,
    box-shadow .15s ease;
}

.bgr-primary:hover{
  transform:translateY(-1px);
  filter:brightness(1.05);
  box-shadow:
    0 14px 30px rgba(123,92,255,.38),
    inset 0 1px 0 rgba(255,255,255,.22);
}

.bgr-primary:active{
  transform:translateY(0) scale(.985);
}

.bgr-primary:disabled{
  opacity:.6;
  cursor:wait;
  transform:none;
  filter:none;
  box-shadow:none;
}

.bgr-primary i{
  margin-right:8px;
}



#bgrDownloadBtn{
  background:linear-gradient(135deg,#1fae67,#49d79d);
  color:#fff;
}
#bgrResetBtn{
  background:linear-gradient(135deg,#b5445b,#ff6d7b);
  color:#fff;
}
.bgr-status{
  padding:10px 12px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(0,0,0,.18);
  color:#c9c9d6;
  font-size:13px;
  line-height:1.5;
}
.bgr-section{
  margin-top:22px;
}
.bgr-section h2{
  margin:0 0 12px;
  color:var(--link);
}
.bgr-section ul{
  margin:0;
  padding-left:20px;
}
.bgr-section li{
  margin-bottom:8px;
  color:#c9c9d6;
  line-height:1.6;
}
@media (max-width:960px){

  .bgr-layout{
    grid-template-columns:1fr;
  }

  .bgr-sidebar{
    position:static;
  }

}
@media (max-width:700px){

  .background-remover-page{
    padding:28px 12px 36px;
  }

  .bgr-canvas-wrap{
    min-height:240px;
  }

  .bgr-upload-label{
    min-height:72px;
    padding:12px;
  }

}
/* Select controls */
.bgr-sidebar select{
  width:100%;
  height:42px;
  padding:0 12px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:10px;
  background:rgba(20,22,30,.95);
  color:#f2f2f7;
  font-size:14px;
  cursor:pointer;
  transition:border-color .15s,box-shadow .15s;
}
.bgr-sidebar select:hover{
  border-color:rgba(120,90,255,.5);
}
.bgr-sidebar select:focus{
  outline:none;
  border-color:#7b5cff;
  box-shadow:0 0 0 3px rgba(123,92,255,.2);
}
/* Dropdown list (supported by Chromium/Firefox) */
.bgr-sidebar option{
  background:#1b1d27;
  color:#f2f2f7;
  padding:8px;
}
/* Color picker */
.bgr-sidebar input[type="color"]{
  width:100%;
  height:42px;
  padding:4px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:10px;
  background:#1b1d27;
  cursor:pointer;
}

.bgr-extra-actions{
  display:grid;
  grid-template-columns:1fr;
  gap:10px;
}

.bgr-extra-actions button{
  height:42px;
  padding:0 14px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:12px;
  background:linear-gradient(180deg,rgba(255,255,255,.07),rgba(255,255,255,.03));
  color:#d9d9e8;
  cursor:pointer;
  font-weight:700;
  font-size:13px;
  transition:
    background .18s ease,
    border-color .18s ease,
    box-shadow .18s ease,
    transform .12s ease,
    color .18s ease;
}

.bgr-extra-actions button:hover{
  border-color:rgba(123,92,255,.45);
  background:linear-gradient(180deg,rgba(123,92,255,.12),rgba(37,213,255,.06));
  box-shadow:0 4px 14px rgba(123,92,255,.14);
  transform:translateY(-1px);
}

.bgr-extra-actions button:active{
  transform:translateY(0) scale(.98);
}

.bgr-extra-actions button.bgr-active{
  border-color:rgba(123,92,255,.7);
  background:linear-gradient(135deg,#6f52ff,#2bcfff);
  color:#fff;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.18),
    0 0 18px rgba(123,92,255,.32);
}

.bgr-extra-actions button.bgr-active:hover{
  filter:brightness(1.05);
}

.bgr-extra-actions button i{
  margin-right:7px;
  opacity:.9;
}
