:root{
  --bg: #070812;
  --card: rgba(255,255,255,.05);
  --stroke: rgba(255,255,255,.10);
  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.70);
  --pad: 18px;
}

*{ box-sizing:border-box; }
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg); /* solid base color */
  color: var(--text);
}
/* fixed gradient mesh that stays while scrolling */
body::before{
  content:"";
  position: fixed;
  inset: 0;
  z-index: -1;              /* behind everything */
  pointer-events: none;

  background:
    radial-gradient(1200px 800px at 50% -10%,
      rgba(120,120,255,.20),
      rgba(120,120,255,0) 60%),

    radial-gradient(1100px 780px at 90% 10%,
      rgba(190,90,255,.14),
      rgba(190,90,255,0) 60%),

    radial-gradient(1400px 900px at 10% 90%,
      rgba(80,160,255,.10),
      rgba(80,160,255,0) 65%);

  /* optional subtle blend so it feels soft */
  filter: blur(20px) saturate(1.1);
}


.navWrap{
  position: sticky;
  top: 10px;
  z-index: 50;
  display:flex;
  justify-content:center;
  padding: 10px 12px;
}

.navPill{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap: 14px;
  padding: 10px 12px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.16);
  background: linear-gradient(135deg, rgba(80,140,255,.85), rgba(170,90,255,.85));
  box-shadow: 0 12px 30px rgba(0,0,0,.35);
  backdrop-filter: blur(10px);
  min-width: min(680px, calc(100vw - 24px));
}

.navLeft, .navRight{ display:flex; gap:10px; align-items:center; }

.navBtn{
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.08);
  color: var(--text);
  padding: 8px 10px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  letter-spacing: .2px;
}

.navBtnGhost{
  background: rgba(0,0,0,.15);
}

.navBtnActive{
  background: rgba(255,255,255,.18);
}

.main{
  padding: var(--pad);
  max-width: 1100px;
  margin: 0 auto;
}

.drop{
  border: 1px dashed rgba(255,255,255,.20);
  background: rgba(255,255,255,.03);
  border-radius: 18px;
  padding: 16px;
  margin-top: 10px;
  margin-bottom: 16px;
}

.drop.drag{ background: rgba(255,255,255,.07); }

.dropTitle{ font-weight: 700; }
.dropSub{ color: var(--muted); font-size: 13px; margin-top: 4px; }

.dropActions{
  display:flex;
  gap: 12px;
  align-items:center;
  margin-top: 12px;
  flex-wrap: wrap;
}

.primaryBtn{
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.16);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 700;
}
.primaryBtn:disabled{
  opacity: .45;
  cursor: not-allowed;
}

.hint{ color: var(--muted); font-size: 13px; }

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

.card{
  border: 1px solid var(--stroke);
  background: var(--card);
  border-radius: 18px;
  padding: 12px;
  overflow: hidden;
}

.card img{
  width:100%;
  height: 170px;
  object-fit: cover;
  border-radius: 14px;
  display:block;
}

.card audio{
  width:100%;
  margin-top: 8px;
}

.meta{
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  word-break: break-word;
  white-space: pre-wrap;
}

.modal{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 18px;
  z-index: 100;
}

.modalCard{
  width: min(420px, 100%);
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(10,10,18,.92);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
  backdrop-filter: blur(14px);
}

.modalTitle{ font-weight: 800; margin-bottom: 12px; }

.modalRow{ display:flex; flex-direction:column; gap:6px; margin-bottom: 10px; }
.modalRow label{ color: var(--muted); font-size: 12px; }
.modalRow input{
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: var(--text);
  border-radius: 12px;
  padding: 10px 12px;
  outline: none;
}

.modalActions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  margin-top: 12px;
}
.dragOverlay{
  position: fixed;
  inset: 0;
  z-index: 60; /* above page, below modal (modal is 100) */
  pointer-events: none;
  opacity: 0;
  transition: opacity 160ms ease;
}

.dragOverlay.show{
  opacity: 1;
}
.dragOverlay.show::after{
  content:"";
  position:absolute;
  inset:0;
  background: radial-gradient(1200px 800px at 50% 30%, rgba(0,0,0,0.12), rgba(0,0,0,0.38));
}

.dragGlow{
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1200px 1200px at var(--gx1, 30%) var(--gy1, 25%),
      rgba(90, 200, 255, 0.55),
      rgba(90, 200, 255, 0.00) 62%),
    radial-gradient(1200px 1200px at var(--gx2, 70%) var(--gy2, 35%),
      rgba(55, 120, 255, 0.42),
      rgba(55, 120, 255, 0.00) 64%),
    radial-gradient(1200px 1200px at var(--gx3, 55%) var(--gy3, 78%),
      rgba(150, 85, 255, 0.34),
      rgba(150, 85, 255, 0.00) 64%),

    radial-gradient(260px 220px at var(--mx, 50%) var(--my, 50%),
      rgba(120, 210, 255, 0.18),
      rgba(120, 210, 255, 0.00) 70%);
  filter: saturate(1.2);
}



@keyframes glowFloat{
  from { transform: translate3d(0,0,0) scale(1); }
  to   { transform: translate3d(0,-10px,0) scale(1.02); }
}

.dragHint{
  position: absolute;
  left: 50%;
  top: 18px;
  transform: translateX(-50%);
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(0,0,0,.24);
  backdrop-filter: blur(12px);
  color: rgba(255,255,255,.92);
  font-weight: 700;
  letter-spacing: .2px;
  box-shadow: 0 12px 30px rgba(0,0,0,.35);
}
/* When dragging files over the page, tint EVERYTHING blue */
body.dragMode::before{
  content:"";
  position: fixed;
  inset: 0;
  z-index: 40;             /* below overlay (60), above main content */
  pointer-events: none;
  background: rgba(40, 130, 255, 0.22); /* blue wash */
  backdrop-filter: blur(0px);
}

/* Optional: soften/dim content so the drag state feels obvious */
body.dragMode .main{
  filter: blur(0.3px) saturate(1.1);
  opacity: 0.92;
}
body.dragMode .navWrap{
  opacity: 0.98;
}

.dragGlow{ z-index: 1; }
.dragHint{ z-index: 2; }
.dragOverlay.show::after{ z-index: 0; }
.dragOverlay{ position: fixed; }
