#backToTopBtn {
    display: none; /* Hidden by default */
    position: fixed;
    bottom: 40px;
    right: 40px;
    z-index: 99;
    font-size: 24px;
    border: none;
    outline: none;
    background-color: #b57cff;
    color: white;
    cursor: pointer;
    padding: 12px 16px;
    border-radius: 50%;
    transition: background-color 0.2s, transform 0.2s;
}

/* -------------------------
   Quick add to collection
--------------------------*/

.quickadd-bar{display:flex; gap:10px; align-items:center;}
.quickadd-bar input{
  flex:1;
  background:#101010;
  color:#fff;
  border:1px solid #2a2a2a;
  border-radius:10px;
  padding:10px 12px;
}

.quickadd-grid{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.quickadd-card{
  border:1px solid #2a2a2a;
  border-radius:14px;
  overflow:hidden;
  background:#141414;
}

.quickadd-card button{
  width:100%;
  border:none;
  background:transparent;
  color:#eaeaea;
  padding:0;
  text-align:left;
  cursor:pointer;
}

.quickadd-card img{width:100%; height:220px; object-fit:cover; display:block;}
.quickadd-card .title{padding:10px 10px 12px; font-weight:700; font-size:13px;}
.quickadd-card .title .muted{display:block; margin-top:4px; font-weight:500; font-size:12px;}

#backToTopBtn:hover {
    background-color: #9a4cd1;
    transform: scale(1.1);
}

body {
    overflow-x: hidden; /* Prevent horizontal scroll */
}

:root{
  --bg: #0b0b0b;
  --panel: #151515;
  --panel-2:#171717;
  --text:#e5e5e5;
  --muted:#a3a3a3;
  --border:#262626;
  --accent:#b57cff;
  --accent-2:#9a4cd1;
  --danger:#ef4444;
  --radius:16px;
}

body{
  background: var(--bg);
  color: var(--text);
}

a{ color: var(--text); }
a:hover{ color: #ffffff; }

.muted{ color: var(--muted) !important; }

.page-shell{
  width:100%;
  max-width:1200px;
  margin:0 auto;
  padding:28px 12px;
}

.pmu-card{
  background: var(--panel);
  border:1px solid var(--border);
  border-radius: var(--radius);
  padding:16px;
}

.pmu-input, input[type="text"], input[type="email"], input[type="password"], input[type="url"], select, textarea{
  background:#0f0f0f !important;
  border:1px solid var(--border) !important;
  color: var(--text) !important;
  border-radius: 12px !important;
  padding:10px 12px !important;
  outline:none !important;
}

.pmu-input:focus, input:focus, select:focus, textarea:focus{
  border-color: #3a3a3a !important;
  box-shadow: 0 0 0 4px rgba(181,124,255,0.12) !important;
}

.pmu-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  border-radius:12px;
  padding:10px 14px;
  border:1px solid var(--border);
  background:#101010;
  color: var(--text);
  text-decoration:none;
  cursor:pointer;
}

.pmu-btn:hover{
  background:#171717;
  border-color:#3a3a3a;
  color:#fff;
}

.pmu-btn.primary{
  background: var(--accent);
  border-color: var(--accent);
  color:#0b0b0b;
  font-weight:700;
}

.pmu-btn.primary:hover{
  background: var(--accent-2);
  border-color: var(--accent-2);
}

.pmu-btn.danger{
  background: transparent;
  border-color: rgba(239,68,68,0.45);
  color: #fecaca;
}

.pmu-btn.danger:hover{
  background: rgba(239,68,68,0.12);
  border-color: rgba(239,68,68,0.7);
  color: #fff;
}


/* Legacy class aliases (kept for templates not yet migrated) */
.back-btn{ 
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  border-radius:12px; padding:10px 14px; border:1px solid var(--border);
  background: var(--accent); color:#0b0b0b; font-weight:800; text-decoration:none;
}
.back-btn:hover{ background: var(--accent-2); border-color: var(--accent-2); color:#0b0b0b; }

/* Collections modal */
.collections-modal{background:#171717; border:1px solid #2a2a2a;}
.collections-modal .modal-header{border-bottom:1px solid #2a2a2a;}
.collections-modal .modal-footer{border-top:1px solid #2a2a2a;}
.collections-create{display:flex; gap:10px; margin-bottom: 12px;}
.collections-create input{flex:1; padding:10px 12px; border-radius: 12px; border:1px solid #2a2a2a; background:#111; color:#fff;}
.collections-list{display:flex; flex-direction:column; gap: 8px;}
.collections-item{display:flex; align-items:center; justify-content:space-between; gap:10px; padding:10px 12px; border-radius:12px; border:1px solid #2a2a2a; background:#1d1d1d;}
.collections-item .actions{display:flex; gap:8px;}
.collections-item button{border:none; background:transparent; color:#b7b7b7;}
.collections-item button:hover{color:#fff;}
.collections-item button.danger:hover{color:#ff6b6b;}
