/* SLIB public page */
* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }

:root {
  --accent: #ffffff;
  --text: #ffffff;
  --font: 'Instrument Sans', sans-serif;
  --btn-radius: 14px;
  --btn-fill: 0.25;
  --btn-blur: 10px;
}

html, body { height: 100%; }

body {
  font-family: var(--font);
  color: var(--text);
  background: #0b0b0f;
  overflow-x: hidden;
}

/* ---------- background layers ---------- */
#bg {
  position: fixed; inset: -40px;       /* bleed so blur has no hard edges */
  z-index: -3;
  background-size: cover;
  background-position: center;
}
#bg video {
  width: 100%; height: 100%;
  object-fit: cover;
}
#bg-overlay {
  position: fixed; inset: 0;
  z-index: -2;
  background: #000;
  opacity: 0.45;
  pointer-events: none;
}
#grain {
  position: fixed; inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.07;
  display: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
}
body.grain #grain { display: block; }

/* ---------- enter splash ---------- */
#enter {
  position: fixed; inset: 0;
  z-index: 50;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  cursor: pointer;
  transition: opacity 0.6s ease;
}
#enter.leaving { opacity: 0; pointer-events: none; }
#enter-text {
  font-size: 15px;
  letter-spacing: 0.45em;
  text-transform: lowercase;
  animation: enterPulse 2.4s ease-in-out infinite;
}
@keyframes enterPulse { 0%, 100% { opacity: 0.45; } 50% { opacity: 1; } }

/* ---------- layout ---------- */
#page {
  min-height: 100dvh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 14px;
  padding: 48px 20px 64px;
  animation: pageIn 0.7s ease both;
}
@keyframes pageIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

#card {
  display: flex; flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%; max-width: 560px;
  text-align: center;
}
body.glass #card {
  background: rgba(255, 255, 255, calc(var(--btn-fill) * 0.35));
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 28px;
  padding: 32px 28px;
  backdrop-filter: blur(var(--btn-blur));
  -webkit-backdrop-filter: blur(var(--btn-blur));
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
}

#avatar {
  width: 220px; height: 220px;
  max-width: 62vw; max-height: 62vw;
  object-fit: cover;
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.45);
}
#avatar.rounded { border-radius: 22px; }
#avatar.circle  { border-radius: 50%; }
#avatar.square  { border-radius: 0; }

#name {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
#tagline {
  font-size: 15px;
  opacity: 0.75;
  max-width: 46ch;
  overflow-wrap: anywhere;
}

/* icon-only row */
#icon-row {
  display: flex; flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
}
#icon-row a {
  display: flex; align-items: center; justify-content: center;
  width: 42px; height: 42px;
  border-radius: 12px;
  color: var(--text);
  transition: transform 0.18s ease, background 0.18s ease;
}
#icon-row a:hover { transform: translateY(-3px); background: rgba(255, 255, 255, 0.1); }
#icon-row .slib-icon, #icon-row .slib-icon svg, #icon-row img.slib-icon {
  width: 24px; height: 24px; display: block;
}

/* ---------- buttons ---------- */
#buttons {
  display: flex; flex-direction: column;
  gap: 12px;
  width: 100%; max-width: 560px;
  margin-top: 6px;
}
.btn {
  position: relative;
  display: flex; align-items: center;
  min-height: 56px;
  padding: 14px 56px;
  border-radius: var(--btn-radius);
  background: rgba(20, 10, 12, var(--btn-fill));
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(var(--btn-blur));
  -webkit-backdrop-filter: blur(var(--btn-blur));
  color: var(--text);
  text-decoration: none;
  font-size: 15.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
  justify-content: center;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
  animation: pageIn 0.6s ease both;
}
.btn:hover {
  transform: scale(1.02);
  border-color: rgba(255, 255, 255, 0.4);
}
.btn:active { transform: scale(0.99); }
.btn .slib-icon {
  position: absolute; left: 18px;
  width: 22px; height: 22px;
  display: flex; align-items: center;
}
.btn .slib-icon svg, .btn img.slib-icon { width: 22px; height: 22px; }
.btn span.label { overflow-wrap: anywhere; }

/* ---------- player ---------- */
#player {
  display: flex; align-items: center;
  gap: 10px;
  width: 100%; max-width: 560px;
  min-height: 68px;
  margin-top: 6px;
  padding: 12px 16px;
  border-radius: calc(var(--btn-radius) + 8px);
  background: rgba(20, 10, 12, var(--btn-fill));
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(var(--btn-blur));
  -webkit-backdrop-filter: blur(var(--btn-blur));
  animation: pageIn 0.6s ease both;
}
.p-btn {
  flex: none;
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border: none; border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}
.p-btn:hover { background: rgba(255, 255, 255, 0.22); transform: scale(1.06); }
.p-btn svg { width: 18px; height: 18px; }
.p-small { width: 34px; height: 34px; background: transparent; }
.p-small svg { width: 15px; height: 15px; }
.p-mid { flex: 1; min-width: 0; }
#p-title {
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 5px;
}
.p-row { display: flex; align-items: center; gap: 8px; }
.p-row span {
  font-size: 11px;
  opacity: 0.65;
  font-variant-numeric: tabular-nums;
  flex: none;
}
#p-seek {
  flex: 1;
  height: 14px;
  display: flex; align-items: center;
  cursor: pointer;
}
#p-seek::before { content: ''; }
#p-seek { position: relative; }
#p-fill {
  position: relative;
  height: 3px;
  width: 0%;
  background: var(--accent);
  border-radius: 2px;
}
#p-seek::after {
  content: '';
  position: absolute; left: 0; right: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  z-index: -1;
}

#copy-toast {
  position: fixed;
  bottom: 30px; left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: rgba(15, 15, 18, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text);
  font-size: 13px;
  letter-spacing: 0.04em;
  padding: 10px 20px;
  border-radius: 999px;
  z-index: 60;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}
#copy-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

#footer {
  font-size: 12px;
  opacity: 0.55;
  margin-top: 10px;
  text-align: center;
}

@media (max-width: 480px) {
  #avatar { width: 170px; height: 170px; }
  #name { font-size: 22px; }
  .btn { min-height: 52px; }
}
