:root {
  --fg: #f4f7f5;
  --muted: rgb(244 247 245 / .72);
  --accent: #b9f5cd;
  --tint: rgb(10 22 16 / .3);
  --radius: 24px;
}
* { box-sizing: border-box; }
html { background: #0a120d; }
body { margin: 0; color: var(--fg); font: 16px/1.5 system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1;
  background: linear-gradient(rgb(0 0 0 / .1), rgb(0 0 0 / .45)), url(forest.jpg) center / cover;
}
main { max-width: 880px; margin: 0 auto; padding: 48px 16px 64px; }
main.home { max-width: 560px; min-height: 100vh; display: flex; flex-direction: column; justify-content: center; gap: 16px; }
h1 { margin: 0; font-size: 1.75rem; line-height: 1.2; letter-spacing: -.01em; }
h2 { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 16px 0 0; text-shadow: 0 1px 3px rgb(0 0 0 / .6); }
p { margin: 4px 0 0; color: var(--muted); }
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
ul { padding: 0; margin: 0; list-style: none; }

/* Glass surface. glass.js swaps the blur for real refraction where the browser supports it. */
.glass {
  background: linear-gradient(135deg, rgb(255 255 255 / .18), rgb(255 255 255 / .03) 45%, rgb(255 255 255 / .09)), var(--tint);
  -webkit-backdrop-filter: blur(16px) saturate(1.6);
  backdrop-filter: blur(16px) saturate(1.6);
  border-radius: var(--radius);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / .5),
    inset 1px 0 0 rgb(255 255 255 / .2),
    inset 0 -1px 0 rgb(255 255 255 / .12),
    inset -1px 0 0 rgb(255 255 255 / .08),
    inset 0 0 28px rgb(255 255 255 / .07),
    0 16px 40px rgb(0 0 0 / .35);
  text-shadow: 0 1px 2px rgb(0 0 0 / .35);
  transition: transform .2s ease, box-shadow .2s ease;
}
a.glass:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / .7),
    inset 1px 0 0 rgb(255 255 255 / .3),
    inset 0 -1px 0 rgb(255 255 255 / .18),
    inset -1px 0 0 rgb(255 255 255 / .12),
    inset 0 0 32px rgb(255 255 255 / .12),
    0 20px 48px rgb(0 0 0 / .4);
}
@media (prefers-reduced-transparency: reduce) {
  .glass { background: rgb(16 30 22 / .94); -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  .glass { transition: none; }
  a.glass:hover { transform: none; }
}

header.glass { display: flex; align-items: center; gap: 20px; padding: 24px; border-radius: 32px; }
header img { width: 80px; height: 80px; border-radius: 50%; box-shadow: 0 0 0 1px rgb(255 255 255 / .35), 0 6px 16px rgb(0 0 0 / .35); }

.links { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.links a { display: block; padding: 14px 20px; border-radius: 999px; text-align: center; font-weight: 600; }

.now-playing { display: flex; align-items: center; gap: 14px; padding: 12px; }
.now-playing[hidden], .now-playing img[hidden] { display: none; }
.now-playing img { width: 56px; height: 56px; border-radius: 12px; box-shadow: 0 4px 12px rgb(0 0 0 / .35); }
.now-playing > span { display: flex; flex-direction: column; min-width: 0; }
.now-playing strong, .now-playing .artist { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.now-playing small { color: var(--accent); font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; }
.now-playing .artist { color: var(--muted); font-size: .9rem; }

.back { display: inline-block; padding: 8px 16px; border-radius: 999px; font-size: .9rem; }
.page-title { font-size: 2.5rem; margin: 32px 0 24px; text-shadow: 0 2px 12px rgb(0 0 0 / .5); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.card { display: block; height: 100%; padding: 20px; }
.card strong { display: block; font-size: 1.05rem; }
.card p { font-size: .9rem; }
.tag { display: inline-block; margin-top: 12px; padding: 2px 10px; border-radius: 999px; font-size: .75rem; color: var(--accent); background: rgb(185 245 205 / .12); box-shadow: inset 0 0 0 1px rgb(185 245 205 / .25); }

.shelf { padding: 20px; border-radius: 28px; }
.shelf h2 { margin: 0 0 14px; }
.shelf ul { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.shelf li { min-width: 0; line-height: 1.3; }
.shelf .poster { display: block; width: 100%; aspect-ratio: 2 / 3; object-fit: cover; margin-bottom: 8px; border-radius: 12px; background: rgb(255 255 255 / .08); box-shadow: 0 6px 16px rgb(0 0 0 / .35); }
.shelf strong, .shelf li span { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.shelf strong { font-size: .9rem; }
.shelf li span { color: var(--muted); font-size: .8rem; }
