/* play.beatz-nodefox.de - Hi Beatz Player Hub
   Dark, flat, built around the colours the game itself uses. */

:root {
  --bg:        #0A0B12;
  --bg-soft:   #10121C;
  --panel:     #141726;
  --panel-2:   #1A1E30;
  --line:      #242942;
  --line-soft: #1C2036;
  --text:      #E9EBF5;
  --muted:     #8C93AE;
  --dim:       #5B6180;

  --pop:    #FF63A1;
  --rock:   #FF3537;
  --hiphop: #6EB1FF;
  --rnb:    #2CD3FF;
  --edm:    #B145FF;

  --default:  #7C8497;
  --gold:     #FFC83B;
  --diamond:  #46E3FF;

  --ok:   #47E39B;
  --warn: #FFB13B;
  --bad:  #FF5B6E;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 18px 40px rgba(0, 0, 0, .45);
  --font: "Segoe UI", Roboto, "Helvetica Neue", Arial, system-ui, sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(60vw 40vh at 10% -10%, rgba(177, 69, 255, .18), transparent 70%),
    radial-gradient(50vw 40vh at 95% 0%, rgba(255, 99, 161, .14), transparent 70%);
  z-index: 0;
}

a { color: var(--rnb); text-decoration: none; }
a:hover { text-decoration: underline; }

button { font: inherit; cursor: pointer; }

/* ------------------------------------------------------------------ *
 * Login
 * ------------------------------------------------------------------ */

body.gate {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
}

.login {
  position: relative;
  z-index: 1;
  width: min(940px, 100%);
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.login-art {
  background:
    linear-gradient(150deg, rgba(177, 69, 255, .35), rgba(255, 99, 161, .18) 45%, rgba(44, 211, 255, .22));
  display: grid;
  place-items: center;
  border-right: 1px solid var(--line);
}

.eq { display: flex; align-items: flex-end; gap: 9px; height: 160px; }
.eq span {
  display: block;
  width: 14px;
  border-radius: 7px;
  background: rgba(255, 255, 255, .85);
  animation: bounce 1.4s ease-in-out infinite;
}
.eq span:nth-child(1) { height: 40%;  animation-delay: -.1s; background: var(--pop); }
.eq span:nth-child(2) { height: 75%;  animation-delay: -.5s; background: var(--edm); }
.eq span:nth-child(3) { height: 55%;  animation-delay: -.9s; background: var(--rnb); }
.eq span:nth-child(4) { height: 95%;  animation-delay: -.3s; background: var(--pop); }
.eq span:nth-child(5) { height: 60%;  animation-delay: -.7s; background: var(--hiphop); }
.eq span:nth-child(6) { height: 85%;  animation-delay: -.2s; background: var(--edm); }
.eq span:nth-child(7) { height: 45%;  animation-delay: -.6s; background: var(--rnb); }
.eq span:nth-child(8) { height: 70%;  animation-delay: -.4s; background: var(--pop); }

@keyframes bounce {
  0%, 100% { transform: scaleY(.45); }
  50%      { transform: scaleY(1); }
}

@media (prefers-reduced-motion: reduce) {
  .eq span { animation: none; }
}

.login-card { padding: 38px 36px; }

.brand {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .2px;
  margin: 0 0 6px;
  color: var(--text);
}
.brand span {
  background: linear-gradient(90deg, var(--pop), var(--edm));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.sub { color: var(--muted); margin: 0 0 22px; font-size: 14px; }

.login-form { display: grid; gap: 8px; }
.login-form label { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); }
.login-form input[type="text"],
.login-form input[type="password"] {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 11px 13px;
  font-family: var(--mono);
  font-size: 14px;
  outline: none;
}
.login-form input:focus { border-color: var(--edm); box-shadow: 0 0 0 3px rgba(177, 69, 255, .18); }

.check {
  display: flex !important;
  align-items: center;
  gap: 8px;
  text-transform: none !important;
  letter-spacing: 0 !important;
  font-size: 13px !important;
  color: var(--muted) !important;
  margin-top: 4px;
}
.check input { accent-color: var(--edm); width: 15px; height: 15px; }

.primary {
  margin-top: 10px;
  padding: 12px 16px;
  border: 0;
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, var(--pop), var(--edm));
  color: #fff;
  font-weight: 600;
  letter-spacing: .2px;
}
.primary:hover { filter: brightness(1.08); }

.hint { font-size: 12.5px; color: var(--dim); margin: 10px 0 0; line-height: 1.55; }
.foot { margin: 22px 0 0; font-size: 12.5px; color: var(--dim); }

.alert {
  background: rgba(255, 91, 110, .12);
  border: 1px solid rgba(255, 91, 110, .35);
  color: #FFC2CA;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 13.5px;
  margin: 0 0 16px;
}

@media (max-width: 760px) {
  .login { grid-template-columns: 1fr; }
  .login-art { height: 140px; border-right: 0; border-bottom: 1px solid var(--line); }
  .eq { height: 84px; }
  .login-card { padding: 26px 22px; }
}

/* ------------------------------------------------------------------ *
 * Shell
 * ------------------------------------------------------------------ */

.top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px 22px;
  background: rgba(10, 11, 18, .88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.top .brand { flex: 0 0 auto; }
.top .brand:hover { text-decoration: none; }

.tabs { display: flex; gap: 4px; flex: 1 1 auto; }
.tabs-login { margin: 0 0 18px; }

.tab {
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
}
.tab:hover { color: var(--text); background: var(--panel-2); }
.tab.is-active {
  color: var(--text);
  background: var(--panel-2);
  border-color: var(--line);
  box-shadow: inset 0 -2px 0 var(--edm);
}

.ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13.5px;
}
.ghost:hover { color: var(--text); border-color: var(--pop); }

.wrap {
  position: relative;
  z-index: 1;
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px 22px 60px;
}

.site-foot {
  border-top: 1px solid var(--line-soft);
  color: var(--dim);
  font-size: 12.5px;
  padding: 18px 22px 30px;
  text-align: center;
}

/* ------------------------------------------------------------------ *
 * Building blocks
 * ------------------------------------------------------------------ */

.card {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 18px;
}

.section-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--dim);
  margin: 26px 0 12px;
}
.section-title:first-child { margin-top: 0; }

.grid { display: grid; gap: 14px; }
.grid.stats { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.grid.two   { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.stat .label { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); }
.stat .value { font-size: 26px; font-weight: 700; font-family: var(--mono); margin-top: 6px; }
.stat .note  { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .02em;
  border: 1px solid currentColor;
  background: rgba(255, 255, 255, .04);
}

.loading, .empty {
  color: var(--muted);
  padding: 40px 0;
  text-align: center;
  font-size: 14px;
}
.error-box {
  background: rgba(255, 91, 110, .1);
  border: 1px solid rgba(255, 91, 110, .3);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  color: #FFC2CA;
  font-size: 14px;
}

/* Profile header */

.hero {
  position: relative;
  border-radius: var(--radius);
  border: 1px solid var(--line-soft);
  overflow: hidden;
  background: var(--panel);
}
.hero-banner {
  height: 190px;
  background: linear-gradient(120deg, rgba(177, 69, 255, .5), rgba(255, 99, 161, .35) 55%, rgba(44, 211, 255, .4));
  background-size: cover;
  background-position: center;
}
.hero-body {
  display: flex;
  align-items: flex-end;
  gap: 18px;
  padding: 0 22px 20px;
  margin-top: -46px;
}
.avatar {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  border: 3px solid var(--panel);
  background: var(--panel-2);
  object-fit: cover;
  flex: 0 0 auto;
}
.hero-name { font-size: 24px; font-weight: 700; margin: 0; }
.hero-meta { color: var(--muted); font-size: 13.5px; display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }

/* Progress bars */

.bar {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--line-soft);
  overflow: hidden;
}
.bar > i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: currentColor;
}
.bar .mark {
  position: absolute;
  top: -1px;
  bottom: -1px;
  width: 2px;
  background: rgba(255, 255, 255, .28);
}

/* ------------------------------------------------------------------ *
 * Songs
 * ------------------------------------------------------------------ */

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
}
.toolbar input[type="search"], .toolbar select {
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 14px;
  outline: none;
}
.toolbar input[type="search"] { min-width: 240px; flex: 1 1 240px; }
.toolbar input:focus, .toolbar select:focus { border-color: var(--edm); }
.toolbar .count { color: var(--dim); font-size: 13px; margin-left: auto; }

.chipset { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
}
.chip.is-active { color: #fff; border-color: currentColor; }

.songlist { display: grid; gap: 10px; }

.song {
  display: grid;
  grid-template-columns: 62px minmax(180px, 1.6fr) repeat(3, minmax(120px, 1fr));
  gap: 16px;
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-left: 3px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 16px;
  transition: border-color .15s ease, transform .15s ease;
}
.song:hover { transform: translateY(-1px); border-color: var(--line); }
.song.is-locked { opacity: .5; }

.song .cover {
  width: 62px;
  height: 62px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--panel-2);
}
.song .title { font-weight: 600; }
.song .artist { color: var(--muted); font-size: 13px; }
.song .meta { display: flex; gap: 8px; align-items: center; margin-top: 5px; flex-wrap: wrap; }
.song .meta small { color: var(--dim); font-family: var(--mono); font-size: 11.5px; }

.tier { font-size: 12px; }
.tier .head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 5px;
}
.tier .name { text-transform: uppercase; letter-spacing: .08em; font-size: 10.5px; color: var(--dim); }
.tier .score { font-family: var(--mono); font-size: 13px; font-weight: 600; }
.tier.is-empty .score { color: var(--dim); font-weight: 400; }
.tier .sub { color: var(--dim); font-size: 11px; margin-top: 4px; display: flex; justify-content: space-between; }

.songhead {
  display: grid;
  grid-template-columns: 62px minmax(180px, 1.6fr) repeat(3, minmax(120px, 1fr));
  gap: 16px;
  padding: 0 16px 8px;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--dim);
}

@media (max-width: 900px) {
  .songhead { display: none; }
  .song { grid-template-columns: 54px 1fr; }
  .song .cover { width: 54px; height: 54px; }
  .song .tier { grid-column: span 2; }
}

/* ------------------------------------------------------------------ *
 * Collection
 * ------------------------------------------------------------------ */

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 12px;
}
.tile {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  background: var(--panel);
  aspect-ratio: 1 / 1;
}
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile.locked img { filter: grayscale(1) brightness(.4); }
.tile .cap {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 5px 7px;
  font-size: 11px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .85));
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tile.owned { border-color: rgba(177, 69, 255, .55); }

/* ------------------------------------------------------------------ *
 * Ranked
 * ------------------------------------------------------------------ */

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
table.data th {
  text-align: left;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--dim);
  padding: 0 12px 10px;
  font-weight: 600;
}
table.data td {
  padding: 10px 12px;
  border-top: 1px solid var(--line-soft);
}
table.data tr.me td { background: rgba(177, 69, 255, .12); }
table.data td.num { font-family: var(--mono); text-align: right; }
table.data th:first-child, table.data td:first-child { width: 64px; text-align: left; }

.tier-badge {
  display: flex;
  align-items: center;
  gap: 14px;
}
.tier-badge img { width: 84px; height: 84px; object-fit: contain; }
