/* Profile Look (2026-09-06): the song bar, mood, Top 8, trophies, and the Customize page. Loaded only on
   profile pages and Settings › Customize profile. Colours come from the member's row via --c1 / --c2 and
   the page's --mz-* tokens (midnight.css). */

/* ---------- the song bar ---------- */
.mz-musicbar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; margin: 14px 0 0; border-radius: 14px; border: 1px solid var(--mz-accent-line); background: linear-gradient(90deg, color-mix(in srgb, var(--c1, #7d49d4) 22%, transparent), color-mix(in srgb, var(--c2, #26b8ab) 12%, transparent)); color: var(--mz-text); }
@supports not (background: color-mix(in srgb, red 10%, transparent)) { .mz-musicbar { background: var(--mz-accent-soft); } }
.mz-musicbar .mz-disc { width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0; position: relative; background: conic-gradient(from 0deg, #1b2230, var(--c1, #7d49d4), var(--c2, #26b8ab), #1b2230); box-shadow: 0 0 18px color-mix(in srgb, var(--c1, #7d49d4) 45%, transparent); }
.mz-musicbar .mz-disc::after { content: ""; position: absolute; inset: 16px; border-radius: 50%; background: var(--mz-ground); }
.mz-musicbar.mz-playing .mz-disc { animation: mz-spin 3s linear infinite; }
@keyframes mz-spin { to { transform: rotate(360deg); } }
.mz-musicbar .mz-play, .mz-musicbar .mz-mute { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--mz-line-strong); background: var(--mz-raised); color: var(--mz-text); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; cursor: pointer; font-size: 15px; }
.mz-musicbar .mz-play:hover, .mz-musicbar .mz-mute:hover { border-color: var(--mz-accent-line); color: var(--mz-accent-2); }
.mz-musicbar .mz-play .fa-pause, .mz-musicbar.mz-playing .mz-play .fa-play { display: none; }
.mz-musicbar.mz-playing .mz-play .fa-pause { display: inline-block; }
.mz-musicbar .mz-mute .fa-volume-xmark, .mz-musicbar.mz-muted .mz-mute .fa-volume-high { display: none; }
.mz-musicbar.mz-muted .mz-mute .fa-volume-xmark { display: inline-block; }
.mz-musicbar.mz-tap .mz-play { animation: mz-pulse 1.4s ease-in-out infinite; border-color: var(--mz-accent-line); }
@keyframes mz-pulse { 0%, 100% { box-shadow: 0 0 0 0 var(--mz-accent-soft); } 50% { box-shadow: 0 0 0 8px transparent; } }
.mz-musicbar .mz-song-title { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mz-musicbar .mz-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--mz-text-2); }
.mz-musicbar .mz-bars { display: flex; align-items: flex-end; gap: 2px; height: 18px; width: 18px; flex-shrink: 0; }
.mz-musicbar .mz-bars i { width: 3px; height: 30%; border-radius: 2px; background: var(--c2, #26b8ab); }
.mz-musicbar.mz-playing .mz-bars i { animation: mz-eq .8s ease-in-out infinite alternate; }
.mz-musicbar .mz-bars i:nth-child(2) { animation-delay: .15s; } .mz-musicbar .mz-bars i:nth-child(3) { animation-delay: .3s; } .mz-musicbar .mz-bars i:nth-child(4) { animation-delay: .45s; }
@keyframes mz-eq { from { height: 20%; } to { height: 100%; } }
.mz-musicbar .mz-progress { width: 160px; max-width: 24vw; height: 6px; border-radius: 999px; background: var(--mz-line-strong); overflow: hidden; cursor: pointer; flex-shrink: 0; }
.mz-musicbar .mz-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--c1, #7d49d4), var(--c2, #26b8ab)); transition: width .5s linear; }
.mz-musicbar .mz-time { font-family: var(--mz-hud); font-size: 12px; color: var(--mz-text-2); white-space: nowrap; flex-shrink: 0; }
.mz-musicbar.mz-broken { opacity: .7; }
.mz-embed { margin-top: 10px; border-radius: 14px; overflow: hidden; border: 1px solid var(--mz-line); background: var(--mz-surface); }
.mz-embed iframe { display: block; width: 100%; height: 166px; border: 0; }
@media (max-width: 720px) {
  .mz-musicbar { flex-wrap: wrap; gap: 10px; padding: 10px 12px; }
  .mz-musicbar .mz-progress, .mz-musicbar .mz-time, .mz-musicbar .mz-bars { display: none; }
}

/* ---------- mood under the name ---------- */
.mz-mood-row { margin-top: 6px; }
.mz-mood { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px; background: var(--mz-accent-soft); border: 1px solid var(--mz-accent-line); font-size: 14px; font-weight: 600; color: var(--mz-text); max-width: 100%; }
.mz-mood i { color: var(--mz-accent-2); }

/* ---------- Top 8 + trophies ---------- */
.mz-top8 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.mz-top8 a, .mz-top8-item { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--mz-text); text-align: center; text-decoration: none; min-width: 0; }
.mz-top8 a span, .mz-top8-item span:first-of-type { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mz-top8 img { width: 64px; height: 64px; border-radius: 16px; object-fit: cover; border: 2px solid var(--mz-accent-line); box-shadow: 0 0 16px var(--mz-accent-soft); background: var(--mz-raised); }
.mz-top8 a:hover img { border-color: var(--mz-accent); }
.mz-trophies { display: flex; flex-wrap: wrap; gap: 8px; }
.mz-trophy { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px; font-family: var(--mz-hud); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; border: 1px solid var(--mz-line-strong); color: var(--mz-text-2); background: var(--mz-raised); }
.mz-trophy-plus, .mz-trophy-purple { color: var(--mz-accent-2); border-color: var(--mz-accent-line); background: var(--mz-accent-soft); }
.mz-trophy-teal { color: var(--mz-teal-2); border-color: var(--mz-teal-line); background: var(--mz-teal-soft); }
.mz-trophy-gold { color: var(--mz-gold); border-color: rgba(244, 197, 66, .45); background: var(--mz-gold-soft); }
.mz-trophy-fire { color: var(--mz-fire-2); border-color: rgba(255, 90, 31, .45); background: rgba(255, 90, 31, .12); }
.mz-customize-btn { margin-left: 6px; }

/* ---------- Settings › Customize profile ---------- */
.mz-look-settings { display: flex; flex-direction: column; gap: 4px; }
.mz-look-section { display: flex; flex-direction: column; gap: 10px; padding: 18px 0; border-bottom: 1px solid var(--mz-line); }
.mz-look-section:last-of-type { border-bottom: 0; }
.mz-look-grid { gap: 12px; }
@media (max-width: 640px) { .mz-look-grid { grid-template-columns: 1fr; } }
.mz-look-settings .mz-input { width: 100%; height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--mz-line); background: var(--mz-sunken); color: var(--mz-text); font-size: 14px; }
.mz-look-settings .mz-input:focus { outline: none; border-color: var(--mz-accent-line); box-shadow: 0 0 0 3px var(--mz-accent-soft); }
.mz-look-settings select.mz-input { appearance: auto; }
.mz-swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.mz-swatch { width: 72px; height: 72px; border-radius: 16px; border: 3px solid transparent; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 6px; font-family: var(--mz-hud); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: #fff; text-shadow: 0 1px 4px rgba(0, 0, 0, .6); cursor: pointer; }
.mz-swatch.on { border-color: var(--mz-text); box-shadow: 0 0 0 3px var(--mz-accent-soft); }
.mz-colour input[type=color] { width: 44px; height: 36px; border: 1px solid var(--mz-line-strong); border-radius: 10px; background: var(--mz-sunken); padding: 2px; cursor: pointer; }
.mz-look-settings .mz-check, .mz-look-settings .mz-colour { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--mz-text-2); cursor: pointer; width: auto; max-width: none; margin: 0; white-space: nowrap; flex: 0 0 auto; }
.mz-look-settings .mz-check span, .mz-look-settings .mz-colour span { white-space: nowrap; }
.mz-check input { width: 18px; height: 18px; accent-color: var(--mz-accent); }
.mz-look-settings .mz-chip { position: relative; margin: 0; width: auto; }
.mz-look-colours { row-gap: 10px; }
.mz-look-settings .mz-chip input { position: absolute; opacity: 0; width: 0; height: 0; }
.mz-bg-opt { display: flex; flex-direction: column; gap: 10px; }
.mz-bg-preview { width: 140px; height: 90px; border-radius: 12px; border: 1px dashed var(--mz-line-strong); background: var(--mz-sunken) center / cover no-repeat; flex-shrink: 0; }
.mz-range { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--mz-text-2); }
.mz-range input { flex: 1; accent-color: var(--mz-accent); max-width: 320px; }
.mz-range b { font-family: var(--mz-hud); font-size: 12px; color: var(--mz-text); min-width: 40px; }
.mz-song-now { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--mz-accent-line); background: var(--mz-accent-soft); flex-wrap: wrap; }
.mz-song-now.mz-hidden { display: none; }
.mz-song-now .mz-disc { width: 36px; height: 36px; border-radius: 50%; position: relative; flex-shrink: 0; background: conic-gradient(from 0deg, #1b2230, var(--mz-accent), var(--mz-teal), #1b2230); }
.mz-song-now .mz-disc::after { content: ""; position: absolute; inset: 13px; border-radius: 50%; background: var(--mz-ground); }
.mz-song-now audio { height: 36px; max-width: 100%; }
.mz-progress-line { height: 6px; border-radius: 999px; background: var(--mz-line-strong); overflow: hidden; }
.mz-progress-line span { display: block; height: 100%; width: 0; background: var(--mz-accent); transition: width .2s; }
.mz-picker-host { position: relative; }
.mz-top8-results { position: absolute; z-index: 30; left: 0; right: 0; top: 48px; max-height: 320px; overflow: auto; background: var(--mz-surface); border: 1px solid var(--mz-accent-line); border-radius: 14px; box-shadow: var(--mz-shadow); padding: 6px; display: flex; flex-direction: column; gap: 2px; }
.mz-top8-hit { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 10px; background: transparent; color: var(--mz-text); text-align: left; cursor: pointer; font-size: 14px; }
.mz-top8-hit:hover { background: var(--mz-accent-soft); }
.mz-top8-hit img { width: 36px; height: 36px; border-radius: 10px; object-fit: cover; }
.mz-top8-hit small { color: var(--mz-text-3); margin-left: auto; }
.mz-top8-edit { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (min-width: 900px) { .mz-top8-edit { grid-template-columns: repeat(8, minmax(0, 1fr)); } }
.mz-top8-item { position: relative; padding: 8px 4px 6px; border-radius: 14px; border: 1px solid var(--mz-line); background: var(--mz-sunken); }
.mz-top8-item img { width: 56px; height: 56px; border-radius: 14px; object-fit: cover; border: 2px solid var(--mz-accent-line); }
.mz-top8-tools { display: flex; gap: 2px; }
.mz-top8-tools button { width: 26px; height: 26px; border-radius: 8px; border: 1px solid var(--mz-line); background: var(--mz-raised); color: var(--mz-text-2); font-size: 11px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.mz-top8-tools button:hover { color: var(--mz-accent-2); border-color: var(--mz-accent-line); }
.mz-look-actions { padding-top: 18px; }
