/* HARZ store: dark 2000s glass. Smoked black glass panels with a soft top-half shine, glassy black buttons,
   faint cool reflections. Layout of a mid-2000s music app: toolbar, LCD now-playing, striped list, status bar.
   Kept dark so the background visualizer glows through. */
:root {
  --bg: #000;
  --text: #e8eef2;
  --muted: #8b949b;
  --edge: rgba(255, 255, 255, .14);          /* glass edge highlight */
  --edge-dark: #000;
  --cool: rgba(170, 215, 255, .10);          /* faint cool reflection */
  --shine: linear-gradient(180deg, rgba(255,255,255,.16) 0%, rgba(255,255,255,.05) 49%, rgba(255,255,255,0) 50%);
  --glass: linear-gradient(180deg, rgba(40,44,48,.85), rgba(10,11,12,.92));
  --ui: "Segoe UI", Tahoma, Verdana, system-ui, sans-serif;
  --mono: "Lucida Console", Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { background: var(--bg); }
body { margin: 0; color: var(--text); font: 12px/1.4 var(--ui); padding: 0 0 28px; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; }
:focus-visible { outline: 1px dotted #fff; outline-offset: 2px; }
.muted { color: var(--muted); }

/* ---------- background visualizer: quick fade in, slow fade out ---------- */
#viz { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; opacity: 0;
       transition: opacity 1.2s ease-out; filter: blur(1px) saturate(1.2); }
#viz.on { opacity: .5; transition: opacity .25s ease-in; }
.toolbar, .window, .statusbar, .page, .top { position: relative; z-index: 1; }
/* Overall UI scale: everything (type, rows, buttons, LCD) grows together. The visualizer canvas is not scaled. */
.toolbar, .window, .statusbar, .drawer, .page, .top { zoom: 1.25; }
.window { max-width: 1040px; }
body { padding-bottom: 24px; }

/* Shared smoked-glass button */
.glassbtn, .tbtn, .lcd-buy, .cart-btn, .play, .price-btn, .add, .checkout, .btn, .files a, .mode-btn {
  color: #f2f6f8; border: 1px solid #000; text-shadow: 0 -1px 0 rgba(0,0,0,.7);
  background: var(--shine), linear-gradient(180deg, #3a3f44 0%, #16181a 100%);
  box-shadow: inset 0 1px 0 var(--edge), inset 0 0 0 1px rgba(255,255,255,.03), 0 1px 2px rgba(0,0,0,.8);
  transition: box-shadow .15s, background .15s;
}
.tbtn:hover, .lcd-buy:hover, .cart-btn:hover, .play:hover, .price-btn:hover, .add:hover, .checkout:hover, .btn:hover, .files a:hover {
  background: var(--shine), linear-gradient(180deg, #4b5157 0%, #1d2023 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 0 10px var(--cool), 0 1px 2px rgba(0,0,0,.8);
}
.tbtn:active, .add:active, .checkout:active { background: linear-gradient(180deg, #121416, #2c3034); box-shadow: inset 0 1px 3px rgba(0,0,0,.8); }

/* ---------- toolbar ---------- */
.toolbar {
  position: sticky; top: 0; z-index: 10;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 8px 14px;
  background: var(--shine), linear-gradient(180deg, rgba(34,37,40,.92), rgba(6,7,8,.96));
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #000; box-shadow: inset 0 1px 0 var(--edge), 0 1px 0 rgba(255,255,255,.05), 0 6px 20px rgba(0,0,0,.6);
}
.transport { display: flex; align-items: center; gap: 6px; }
.tbtn { width: 30px; height: 30px; border-radius: 50%; font-size: 11px; }
.tbtn.big { width: 38px; height: 38px; font-size: 13px; box-shadow: inset 0 1px 0 var(--edge), 0 0 12px var(--cool), 0 1px 2px rgba(0,0,0,.8); }

/* LCD now-playing display: dark glass screen */
.lcd {
  display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; align-items: center;
  max-width: 560px; width: 100%; justify-self: center; padding: 5px 10px 5px 6px; border-radius: 7px;
  background: linear-gradient(180deg, rgba(255,255,255,.06) 0%, rgba(255,255,255,0) 45%), linear-gradient(180deg, #0c0e10, #050607);
  border: 1px solid #000; box-shadow: inset 0 1px 4px rgba(0,0,0,.9), 0 1px 0 rgba(255,255,255,.08);
}
.lcd img { width: 40px; height: 40px; object-fit: cover; border: 1px solid #000; box-shadow: 0 0 0 1px rgba(255,255,255,.08); }
.lcd img:not([src]), .lcd img[src=""] { visibility: hidden; }
.lcd-text { min-width: 0; text-align: center; }
.lcd-title { font-weight: 700; color: #f4f8fa; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 0 8px rgba(190,225,255,.25); }
.lcd-sub { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lcd-row { display: grid; grid-template-columns: auto 1fr auto; gap: 6px; align-items: center; font: 10px var(--mono); color: #7f8a92; margin-top: 2px; }
.lcd .bar { height: 6px; border-radius: 3px; border: 1px solid #000; background: #15181a; cursor: pointer; position: relative; box-shadow: inset 0 1px 2px rgba(0,0,0,.8), 0 1px 0 rgba(255,255,255,.06); }
.lcd .fill { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 3px; background: var(--shine), linear-gradient(90deg, #8f9aa3, #dfe7ec); box-shadow: 0 0 6px rgba(200,230,255,.35); }
.lcd-buy { font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 4px; }

.right { display: flex; align-items: center; gap: 14px; }
.wordmark { font-family: "Michroma", var(--ui); font-size: 14px; letter-spacing: .28em; text-transform: uppercase; color: #f2f6f8; text-shadow: 0 0 10px rgba(190,225,255,.2); }
.cart-btn { font-size: 11px; padding: 4px 12px; border-radius: 12px; }
.cart-btn b { color: #fff; }
@media (max-width: 760px) {
  .toolbar { grid-template-columns: auto 1fr; }
  .lcd { grid-column: 1 / -1; order: 3; max-width: none; }
  .wordmark { display: none; }
}

/* volume slider: dark glass */
.vol { display: flex; align-items: center; margin-left: 6px; }
.vol input {
  -webkit-appearance: none; appearance: none; width: 80px; height: 6px; border-radius: 3px; cursor: pointer;
  background: linear-gradient(90deg, #c9d3da 0, #7f8a92 var(--fill, 80%), #0d0f10 var(--fill, 80%));
  border: 1px solid #000; box-shadow: inset 0 1px 2px rgba(0,0,0,.7), 0 1px 0 rgba(255,255,255,.07);
}
.vol input::-webkit-slider-thumb {
  -webkit-appearance: none; width: 13px; height: 13px; border-radius: 50%;
  background: radial-gradient(circle at 40% 30%, #ffffff 0 18%, #b7c2ca 40%, #4a5258 100%);
  border: 1px solid #000; box-shadow: 0 0 6px rgba(200,230,255,.35), 0 1px 1px rgba(0,0,0,.7);
}
.vol input::-moz-range-thumb { width: 13px; height: 13px; border-radius: 50%; background: radial-gradient(circle at 40% 30%, #fff 0 18%, #b7c2ca 40%, #4a5258 100%); border: 1px solid #000; }
@media (max-width: 760px) { .vol { display: none; } }

/* ---------- main window: striped glass track list ---------- */
.window { max-width: 980px; margin: 14px auto 0; padding: 0 14px; }
.filterbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.search {
  width: 230px; padding: 5px 10px 5px 26px; border-radius: 13px; font: 12px var(--ui); color: var(--text);
  background: #0b0d0e url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12'><circle cx='5' cy='5' r='3.6' fill='none' stroke='%238b949b' stroke-width='1.4'/><path d='M7.8 7.8 11 11' stroke='%238b949b' stroke-width='1.4'/></svg>") 9px 50% no-repeat;
  border: 1px solid #000; box-shadow: inset 0 1px 3px rgba(0,0,0,.9), 0 1px 0 rgba(255,255,255,.07);
}
.search:focus { outline: none; box-shadow: inset 0 1px 3px rgba(0,0,0,.9), 0 0 0 1px rgba(200,230,255,.25), 0 0 10px var(--cool); }
.count { color: var(--muted); font-size: 11px; }

.table { border: 1px solid #000; border-radius: 6px; overflow: hidden; box-shadow: 0 0 0 1px rgba(255,255,255,.06), 0 10px 30px rgba(0,0,0,.6); }
.thead, .row { display: grid; grid-template-columns: 30px 28px 32px minmax(0, 1fr) 56px 90px 76px; gap: 8px; align-items: center; padding: 0 8px; }
.thead { height: 22px; font-size: 11px; color: #c3cbd1; background: var(--shine), linear-gradient(180deg, #2c3034, #111315); border-bottom: 1px solid #000; }
.thead span + span { border-left: 1px solid #000; padding-left: 6px; box-shadow: inset 1px 0 0 rgba(255,255,255,.06); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.list { list-style: none; margin: 0; padding: 0; }
.row { height: 34px; background: rgba(10,11,12,.84); border-bottom: 1px solid rgba(255,255,255,.03); }
.row:nth-child(even) { background: rgba(20,22,24,.84); }
.row:hover { background: rgba(36,40,44,.9); }
.row.playing {
  background: var(--shine), linear-gradient(180deg, rgba(70,78,86,.95), rgba(28,31,34,.95));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16), inset 0 0 18px var(--cool);
}
.row .idx { color: #5f686f; text-align: right; font-variant-numeric: tabular-nums; }
.row.playing .idx { color: #dfe7ec; }
.row img { width: 28px; height: 28px; object-fit: cover; border: 1px solid #000; box-shadow: 0 0 0 1px rgba(255,255,255,.06); }
.row .t { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .t:hover { text-decoration: underline; }
.row.playing .t { color: #fff; text-shadow: 0 0 8px rgba(200,230,255,.35); }
.row .key { color: var(--muted); }
.play { width: 20px; height: 20px; border-radius: 50%; font-size: 8px; }
.row.playing .play { box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 0 8px rgba(200,230,255,.4); }
.price-btn { justify-self: end; font-weight: 700; padding: 2px 9px; border-radius: 10px; }
.empty { padding: 18px; color: var(--muted); background: rgba(10,11,12,.84); }
@media (max-width: 600px) {
  .thead, .row { grid-template-columns: 26px 28px minmax(0, 1fr) 44px 66px; }
  .thead span:nth-child(2), .row .idx, .thead span:nth-child(6), .row .key { display: none; }
}

/* ---------- beat page ---------- */
.beat { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 28px; padding-top: 10px; padding-bottom: 40px; align-items: start; }
@media (max-width: 700px) { .beat { grid-template-columns: 1fr; } }
.beat .art img { width: 100%; border: 1px solid #000; box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 12px 34px rgba(0,0,0,.7);
                 -webkit-box-reflect: below 2px linear-gradient(transparent 70%, rgba(255,255,255,.14)); }
.back { display: inline-block; font-size: 11px; color: var(--muted); margin-bottom: 8px; }
.back:hover { color: #fff; }
.beat h1 { font: 700 30px/1.1 var(--ui); margin: 0 0 4px; letter-spacing: -.01em; text-shadow: 0 0 14px rgba(200,230,255,.15); }
.sub { color: var(--muted); margin-bottom: 14px; }
.beat .tbtn.big { margin-bottom: 16px; }
.tiers { border: 1px solid #000; border-radius: 6px; overflow: hidden; box-shadow: 0 0 0 1px rgba(255,255,255,.06); }
.tier { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 9px 10px; background: rgba(10,11,12,.88); }
.tier:nth-child(even) { background: rgba(20,22,24,.88); }
.tier .name { font-weight: 700; }
.tier .terms { color: var(--muted); font-size: 11px; margin-top: 2px; }
.add, .checkout, .btn, .files a { font-size: 11px; font-weight: 700; padding: 5px 13px; border-radius: 12px; white-space: nowrap; }
.add.ghost { color: var(--muted); }
.note { color: var(--muted); font-size: 11px; margin-top: 10px; }

/* ---------- cart drawer ---------- */
.drawer {
  position: fixed; inset: 0 0 0 auto; width: min(360px, 100%); z-index: 20; display: flex; flex-direction: column;
  background: var(--shine), linear-gradient(180deg, rgba(30,33,36,.97), rgba(6,7,8,.98)); border-left: 1px solid #000;
  box-shadow: inset 1px 0 0 rgba(255,255,255,.08), -10px 0 30px rgba(0,0,0,.75); transform: translateX(100%); transition: transform .2s ease;
}
.drawer.open { transform: none; }
.drawer header { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-bottom: 1px solid #000; box-shadow: 0 1px 0 rgba(255,255,255,.06); }
.drawer .items { flex: 1; overflow: auto; }
.drawer .line { display: flex; justify-content: space-between; gap: 10px; padding: 8px 12px; border-bottom: 1px solid rgba(255,255,255,.04); }
.drawer .line:nth-child(even) { background: rgba(255,255,255,.025); }
.drawer .free { font-weight: 700; color: #fff; }
.drawer footer { padding: 12px; border-top: 1px solid #000; box-shadow: inset 0 1px 0 rgba(255,255,255,.06); }
.drawer footer p { margin: 0 0 10px; }
.checkout { width: 100%; padding: 8px; font-size: 12px; }
.x { color: var(--muted); font-size: 18px; }

/* ---------- status bar ---------- */
.statusbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; height: 24px; display: flex; justify-content: center; gap: 22px; align-items: center;
  font-size: 11px; color: #a9b2b8; background: var(--shine), linear-gradient(180deg, rgba(30,33,36,.95), rgba(6,7,8,.98));
  border-top: 1px solid #000; box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}
.statusbar a:hover { color: #fff; }
@media (max-width: 600px) { .statusbar span:first-child { display: none; } }

/* ---------- thanks page ---------- */
.top { display: flex; padding: 10px 14px; background: var(--shine), linear-gradient(180deg, rgba(34,37,40,.92), rgba(6,7,8,.96)); border-bottom: 1px solid #000; }
.page { max-width: 680px; margin: 0 auto; padding: 28px 16px 60px; }
.page h1 { font: 700 26px var(--ui); }
.files a { display: inline-block; margin: 6px 8px 0 0; }
.license { background: #fff; color: #111; border: 1px solid #999; padding: 22px; margin-top: 14px; line-height: 1.5; }

@media print { body * { visibility: hidden; } .license, .license * { visibility: visible; } .license { position: absolute; inset: 0; } }

/* ================= Light mode (2000s glass, bright) ================= */
html[data-mode="light"] {
  --bg: #e9eef2;
  --text: #1b2126;
  --muted: #5d6871;
  --edge: rgba(255, 255, 255, .95);
  --cool: rgba(120, 170, 210, .25);
  --shine: linear-gradient(180deg, rgba(255,255,255,.9) 0%, rgba(255,255,255,.35) 49%, rgba(255,255,255,0) 50%);
  color-scheme: light;
}
html[data-mode="light"], html[data-mode="light"] body { background: radial-gradient(1200px 600px at 50% -10%, #ffffff, #e9eef2 55%, #d6dde3); background-attachment: fixed; }
/* Visualizer: invert so trails read as color on white, hue-rotate keeps the original colors */
html[data-mode="light"] #viz { filter: invert(1) hue-rotate(180deg) blur(1px) saturate(1.3); }
html[data-mode="light"] #viz.on { opacity: .35; }

html[data-mode="light"] .glassbtn, html[data-mode="light"] .tbtn, html[data-mode="light"] .lcd-buy, html[data-mode="light"] .cart-btn,
html[data-mode="light"] .play, html[data-mode="light"] .price-btn, html[data-mode="light"] .add, html[data-mode="light"] .checkout,
html[data-mode="light"] .btn, html[data-mode="light"] .files a, html[data-mode="light"] .mode-btn {
  color: #1d2328; text-shadow: 0 1px 0 rgba(255,255,255,.8); border-color: #8d979f;
  background: var(--shine), linear-gradient(180deg, #ffffff 0%, #d9e0e5 100%);
  box-shadow: inset 0 1px 0 #fff, 0 1px 2px rgba(60,80,95,.35);
}
html[data-mode="light"] .tbtn:hover, html[data-mode="light"] .lcd-buy:hover, html[data-mode="light"] .cart-btn:hover,
html[data-mode="light"] .play:hover, html[data-mode="light"] .price-btn:hover, html[data-mode="light"] .add:hover,
html[data-mode="light"] .checkout:hover, html[data-mode="light"] .btn:hover, html[data-mode="light"] .files a:hover, html[data-mode="light"] .mode-btn:hover {
  background: var(--shine), linear-gradient(180deg, #ffffff 0%, #e6ecf0 100%);
  box-shadow: inset 0 1px 0 #fff, 0 0 8px var(--cool), 0 1px 2px rgba(60,80,95,.35);
}

html[data-mode="light"] .toolbar, html[data-mode="light"] .statusbar, html[data-mode="light"] .top {
  background: var(--shine), linear-gradient(180deg, rgba(250,252,253,.95), rgba(214,222,228,.95));
  border-color: #a3adb5; box-shadow: inset 0 1px 0 #fff, 0 2px 12px rgba(60,80,95,.18); color: #2a3137;
}
html[data-mode="light"] .lcd {
  background: linear-gradient(180deg, rgba(255,255,255,.7) 0%, rgba(255,255,255,0) 45%), linear-gradient(180deg, #eef1e8, #d7dccf);
  border-color: #7d8790; box-shadow: inset 0 1px 3px rgba(0,0,0,.25), 0 1px 0 #fff;
}
html[data-mode="light"] .lcd-title { color: #1b2126; text-shadow: none; }
html[data-mode="light"] .lcd-row { color: #5b646b; }
html[data-mode="light"] .lcd .bar { background: #f7f8f5; border-color: #8b949b; box-shadow: inset 0 1px 2px rgba(0,0,0,.2); }
html[data-mode="light"] .lcd .fill { background: var(--shine), linear-gradient(90deg, #6f7a83, #3d464d); box-shadow: none; }
html[data-mode="light"] .wordmark { color: #20262b; text-shadow: 0 1px 0 #fff; }
html[data-mode="light"] .cart-btn b { color: #10161a; }
html[data-mode="light"] .vol input { background: linear-gradient(90deg, #6f7a83 0, #3d464d var(--fill, 80%), #f4f6f7 var(--fill, 80%)); border-color: #7d8790; }

html[data-mode="light"] .search { background-color: #fff; color: #1b2126; border-color: #8d979f; box-shadow: inset 0 1px 2px rgba(0,0,0,.18); }
html[data-mode="light"] .table, html[data-mode="light"] .tiers { border-color: #8d979f; box-shadow: 0 6px 20px rgba(60,80,95,.18); }
html[data-mode="light"] .thead { color: #2a3137; background: var(--shine), linear-gradient(180deg, #f7f9fa, #d3dadf); border-color: #9aa4ac; }
html[data-mode="light"] .thead span + span { border-left-color: #b4bdc4; box-shadow: inset 1px 0 0 #fff; }
html[data-mode="light"] .row, html[data-mode="light"] .tier, html[data-mode="light"] .empty { background: rgba(255,255,255,.88); border-bottom-color: rgba(0,0,0,.04); }
html[data-mode="light"] .row:nth-child(even), html[data-mode="light"] .tier:nth-child(even) { background: rgba(237,242,245,.9); }
html[data-mode="light"] .row:hover { background: rgba(222,231,237,.95); }
html[data-mode="light"] .row.playing { background: var(--shine), linear-gradient(180deg, #c9d4dc, #9fadb8); box-shadow: inset 0 1px 0 #fff; }
html[data-mode="light"] .row.playing .t, html[data-mode="light"] .row.playing .idx { color: #10161a; text-shadow: 0 1px 0 rgba(255,255,255,.6); }
html[data-mode="light"] .row img, html[data-mode="light"] .lcd img { border-color: #7d8790; }
html[data-mode="light"] .drawer { background: var(--shine), linear-gradient(180deg, #f7f9fa, #dfe5e9); border-color: #9aa4ac; color: #1b2126; }
html[data-mode="light"] .drawer header, html[data-mode="light"] .drawer footer { border-color: #b4bdc4; box-shadow: none; }
html[data-mode="light"] .drawer .line { border-color: #d3dadf; }
html[data-mode="light"] .drawer .free { color: #10161a; }
html[data-mode="light"] .beat h1 { text-shadow: none; }
html[data-mode="light"] .beat .art img { box-shadow: 0 0 0 1px #9aa4ac, 0 12px 30px rgba(60,80,95,.3); }

/* Light/dark switch button */
.mode-btn { width: 26px; height: 26px; border-radius: 50%; font-size: 13px; line-height: 1; padding: 0; }

/* Fallback note when a browser blocks new tabs from the HARZ logo */
.link-note { position: fixed; top: 70px; right: 16px; z-index: 30; padding: 8px 12px; border-radius: 8px; font-size: 12px;
  color: var(--text); background: var(--shine), var(--glass); border: 1px solid #000; box-shadow: inset 0 1px 0 var(--edge), 0 6px 20px rgba(0,0,0,.6);
  opacity: 0; transform: translateY(-6px); pointer-events: none; transition: opacity .2s, transform .2s; }
.link-note.show { opacity: 1; transform: none; pointer-events: auto; }
.link-note a { text-decoration: underline; }
html[data-mode="light"] .link-note { background: var(--shine), linear-gradient(180deg, #ffffff, #dfe5e9); border-color: #9aa4ac; }
