/* TrebleTribe experience layer: loading mark, neon focus, account menu, home quick access, player, miniplayer. */

/* ── Loading: every shape of the shield bops on the beat ── */
.tt-loader { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; align-content: center; gap: 22px; background: radial-gradient(circle at 50% 45%, #2a0812 0%, #0a090b 62%); transition: opacity .6s ease, visibility .6s; }
.tt-loader.done { opacity: 0; visibility: hidden; }
.tt-mark-loader { width: min(34vw, 150px); height: auto; overflow: visible; filter: drop-shadow(0 0 18px #f6334c66); }
.tt-mark .m { transform-box: fill-box; transform-origin: center; animation: tt-bop .62s cubic-bezier(.3, 1.6, .5, 1) infinite; }
.tt-mark .m1 { animation-delay: 0s; } .tt-mark .m2 { animation-delay: .08s; } .tt-mark .m3 { animation-delay: .08s; }
.tt-mark .m4, .tt-mark .m5 { animation-delay: .16s; } .tt-mark .m6 { animation-delay: 0s; animation-name: tt-bop-x; }
.tt-mark .m7, .tt-mark .m8 { animation-delay: .31s; animation-name: tt-bop-bars; }
.tt-mark .m9, .tt-mark .m12 { animation-delay: .23s; } .tt-mark .m10, .tt-mark .m11 { animation-delay: .39s; }
@keyframes tt-bop { 0%, 100% { transform: scale(1); } 35% { transform: scale(1.12); } }
@keyframes tt-bop-x { 0%, 100% { transform: scale(1) rotate(0); } 35% { transform: scale(1.08) rotate(4deg); } }
@keyframes tt-bop-bars { 0%, 100% { transform: scaleX(1); } 35% { transform: scaleX(1.35); } }
.tt-loader-word { font: 900 22px var(--display); letter-spacing: -1px; color: #fff; }
.tt-loader-word b { color: #f6334c; }

/* ── Neon on hover and selection ── */
:root { --tt-neon: #ff2e4d; }
.sidebar nav a, .mobile-bottom a, .tt-menu a, .tt-menu button, .tt-mode-toggle a, .tt-icon-btn, .tt-quick, .tt-genre-card, .tt-playlist-card, .small-button, .tt-filters button { transition: color .2s, box-shadow .25s, background .25s, text-shadow .25s, filter .25s; }
.sidebar nav a.active, .sidebar nav a:hover { box-shadow: inset 0 0 0 1px #ff4d6a66, 0 0 18px #ff1f4766, 0 0 42px #ff1f4722; text-shadow: 0 0 10px #ff9aac; }
.sidebar nav a.active svg, .sidebar nav a:hover svg, .mobile-bottom a.active svg, .mobile-bottom a:hover svg, .tt-icon-btn:hover svg, .tt-icon-btn[aria-pressed="true"] svg, .tt-menu a:hover svg { filter: drop-shadow(0 0 4px var(--tt-neon)) drop-shadow(0 0 10px #ff2e4d99); color: #fff; }
.mobile-bottom a.active, .mobile-bottom a:hover { color: #fff; text-shadow: 0 0 10px var(--tt-neon); }
.round-play:hover { box-shadow: 0 0 0 2px #ff7a90, 0 0 26px #ff1f47, 0 0 60px #ff1f4766; }
.tt-filters button[aria-pressed="true"], .tt-filters button:hover, .small-button.is-on, .small-button:hover { box-shadow: 0 0 14px #ff1f4777; }
.brand:hover .brand-mark { filter: drop-shadow(0 0 14px #ff2e4dcc); }
:focus-visible { outline: 2px solid #ff6a80; outline-offset: 2px; box-shadow: 0 0 16px #ff1f4788; }

/* ── Branding stays visible while scrolling ── */
.sidebar .brand { position: sticky; top: -24px; z-index: 2; margin: -24px -13px 26px; padding: 24px 13px 16px; background: linear-gradient(180deg, #0b0a0c 82%, #0b0a0c00); }
.sidebar .nav-caption:first-of-type { position: sticky; top: 82px; z-index: 1; background: #0b0a0c; padding-top: 4px; }

/* ── Artist call-to-action in the sidebar ── */
.tt-become-artist { margin-top: 22px; display: grid; gap: 4px; padding: 14px; border: 1px solid #5b2734; border-radius: 12px; background: linear-gradient(140deg, #2a0b15, #120d11); }
.tt-become-artist strong { color: #fff; font-size: 12px; }
.tt-become-artist span { color: #c8b6bd; font-size: 11px; line-height: 1.5; }
.tt-become-artist:hover { box-shadow: 0 0 22px #ff1f4744; border-color: #ff4d6a; }
@media (max-width: 970px) { .tt-become-artist { display: none; } }

/* ── Account menu ── */
.tt-account-menu { position: relative; }
#account-menu-button { cursor: pointer; }
#account-menu-button:hover, #account-menu-button[aria-expanded="true"] { box-shadow: 0 0 0 2px #ff4d6a, 0 0 18px #ff1f47aa; }
#account-avatar { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.tt-menu { position: absolute; right: 0; top: calc(100% + 10px); z-index: 90; width: 268px; padding: 8px; border: 1px solid #5c2b39; border-radius: 14px; background: #120d11f5; backdrop-filter: blur(18px); box-shadow: 0 18px 50px #000c, 0 0 30px #ff1f4722; display: grid; gap: 2px; }
.tt-menu[hidden] { display: none; }
.tt-menu-head { padding: 10px 12px 12px; border-bottom: 1px solid #3a2530; margin-bottom: 4px; display: grid; }
.tt-menu-head strong { color: #fff; font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.tt-menu-head small { color: #a99aa2; font-size: 11px; }
.tt-menu a, .tt-menu button { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 9px; color: #ddd2d7; font-size: 12.5px; font-weight: 600; background: none; border: 0; text-align: left; width: 100%; }
.tt-menu a:hover, .tt-menu button:hover, .tt-menu a.active { background: linear-gradient(90deg, #b7082544, #4a081622); color: #fff; }
.tt-menu svg { width: 17px; height: 17px; }
.tt-menu [hidden] { display: none; }

/* ── Toasts ── */
.tt-toasts { position: fixed; z-index: 300; top: 78px; right: 18px; display: grid; gap: 8px; width: min(360px, calc(100vw - 32px)); pointer-events: none; }
.tt-toast { padding: 12px 15px; border-radius: 11px; border: 1px solid #ff4d6a77; background: #1a0f15f2; color: #fff; font-size: 12.5px; box-shadow: 0 10px 30px #000a, 0 0 22px #ff1f4733; animation: tt-in .25s ease-out; transition: opacity .4s, transform .4s; }
.tt-toast[data-kind="error"] { border-color: #ff8a3d; }
.tt-toast.out { opacity: 0; transform: translateY(-6px); }
@keyframes tt-in { from { opacity: 0; transform: translateY(-8px); } }

/* ── Listen / Listen in colour ── */
.tt-mode-toggle { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid #4b2833; border-radius: 999px; background: #120d11; margin: 6px 0 4px; }
.tt-mode-toggle a { padding: 8px 15px; border-radius: 999px; color: #c5b8be; font-size: 12px; font-weight: 700; }
.tt-mode-toggle a.active { background: linear-gradient(100deg, #f6334c, #b5082a); color: #fff; box-shadow: 0 0 18px #ff1f4788; }
.tt-mode-toggle a:hover:not(.active) { color: #fff; text-shadow: 0 0 10px var(--tt-neon); }

/* ── Home: quick access ── */
.tt-home-quick { margin-top: 26px; display: grid; gap: 14px; }
.tt-home-now { display: grid; grid-template-columns: 150px 1fr; gap: 22px; align-items: center; padding: 18px; border: 1px solid #5a2433; border-radius: 18px; background: radial-gradient(circle at 0 0, #6d0b2066, transparent 55%), linear-gradient(120deg, #1b0d14, #0e0c10); }
.tt-home-now-art { width: 150px; aspect-ratio: 1; border-radius: 14px; overflow: hidden; display: grid; place-items: center; background: radial-gradient(circle at 50% 45%, #9a092a85, #12050b 70%); }
.tt-home-now-art img { width: 60%; height: 80%; object-fit: contain; }
.tt-home-now.has-art .tt-home-now-art img { width: 100%; height: 100%; object-fit: cover; }
.tt-home-now-label { color: #ff9aac; font-size: 12px; font-weight: 700; }
.tt-home-now h2 { margin: 4px 0; font-size: clamp(1.5rem, 2.6vw, 2.4rem); }
.tt-home-now p { font-size: 12.5px; }
.tt-home-now-actions { display: flex; align-items: center; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.tt-quick-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tt-quick { display: grid; gap: 4px; align-content: start; text-align: left; padding: 16px; border: 1px solid #3f2a33; border-radius: 14px; background: #141015; color: #fff; font: inherit; cursor: pointer; }
.tt-quick svg { color: #ff3a58; width: 22px; height: 22px; margin-bottom: 6px; }
.tt-quick strong { font-size: 13.5px; }
.tt-quick small { color: #ab9ca4; font-size: 11.5px; }
.tt-quick:hover { border-color: #ff4d6a; box-shadow: 0 0 22px #ff1f4733; }
.tt-rail-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }
.tt-rail-head h2 { font-size: clamp(1.25rem, 2vw, 1.7rem); }
.tt-genre-rail, .tt-playlist-rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(170px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.tt-genre-rail .tt-empty, .tt-playlist-rail .tt-empty { grid-column: 1 / -1; }
.tt-genre-card { position: relative; min-height: 110px; display: grid; align-content: end; gap: 2px; text-align: left; padding: 15px; border-radius: 14px; border: 1px solid #4a2632; color: #fff; font: inherit; cursor: pointer; background: repeating-linear-gradient(135deg, transparent 0 14px, #f6334c14 14px 16px), linear-gradient(150deg, #3a0c19, #120d11 70%); }
.tt-genre-card:nth-child(even) { background: repeating-linear-gradient(45deg, transparent 0 12px, #f2ece60f 12px 14px), linear-gradient(150deg, #241016, #0f0c10 70%); }
.tt-genre-card strong { font-size: 15px; }
.tt-genre-card small { color: #c4b2ba; font-size: 11px; }
.tt-genre-card svg { position: absolute; top: 13px; right: 13px; width: 18px; height: 18px; color: #ff4d6a; }
.tt-genre-card:disabled { opacity: .45; cursor: default; }
.tt-genre-card:not(:disabled):hover { border-color: #ff4d6a; box-shadow: 0 0 22px #ff1f4744; }
.tt-playlist-card { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 10px; padding: 12px; border: 1px solid #3f2a33; border-radius: 14px; background: #141015; }
.tt-playlist-card strong { display: block; color: #fff; font-size: 13px; }
.tt-playlist-card small { color: #a99aa2; font-size: 11px; }
.tt-playlist-play { width: 40px; height: 40px; border-radius: 50%; border: 0; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #ff2142, #ad072b); }
.tt-playlist-play svg { width: 16px; height: 16px; fill: currentColor; stroke: none; }
.tt-playlist-card:hover { border-color: #ff4d6a; box-shadow: 0 0 18px #ff1f4733; }

/* ── Track rows: playlist + like ── */
.tt-track .tt-save[aria-pressed="true"] svg { fill: #ff2e4d; color: #ff2e4d; filter: drop-shadow(0 0 6px #ff2e4d); }

/* ── Add-to-playlist picker ── */
.tt-picker { position: fixed; z-index: 250; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(360px, calc(100vw - 30px)); max-height: 70vh; overflow: auto; padding: 18px; display: grid; gap: 8px; border: 1px solid #a6344a; border-radius: 16px; background: radial-gradient(circle at 100% 0, #5c1126, #111015 60%); box-shadow: 0 30px 80px #000d; }
.tt-picker[hidden] { display: none; }
.tt-picker h3 { margin-bottom: 4px; }
.tt-picker-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 10px; border: 1px solid #4a2632; background: #171215; color: #fff; font: inherit; text-align: left; cursor: pointer; }
.tt-picker-item small { color: #a99aa2; }
.tt-picker-item:hover { border-color: #ff4d6a; box-shadow: 0 0 16px #ff1f4744; }
.tt-picker-new { color: #ff9aac; }

/* ── Player ── */
.tt-icon-btn { width: 36px; height: 36px; min-width: 36px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: #bbaeb6; position: relative; cursor: pointer; }
.tt-icon-btn:hover { color: #fff; background: #ffffff0d; }
.tt-icon-btn[aria-pressed="true"] { color: #ff4d6a; }
.tt-icon-btn svg { width: 18px; height: 18px; }
#player-like[aria-pressed="true"] svg { fill: #ff2e4d; }
.tt-repeat-one { display: none; position: absolute; right: 4px; bottom: 4px; font-size: 9px; color: #ff4d6a; }
#player-repeat[data-repeat="one"] .tt-repeat-one { display: block; }
.global-control { flex-direction: column; gap: 2px; }
.tt-transport { display: flex; align-items: center; justify-content: center; gap: 8px; }
.tt-seek { display: flex; align-items: center; gap: 10px; width: 100%; }
.tt-seek input { flex: 1; accent-color: #e70a2f; min-width: 30px; }
.tt-seek span { color: #aba1a8; font-size: 10px; white-space: nowrap; }
.global-player { height: 84px; }
.song-cover.has-art img { width: 100%; height: 100%; object-fit: cover; border-radius: 5px; }
.volume-control > button.tt-icon-btn { padding: 0; }

/* ── Miniplayer ── */
.tt-mini { position: fixed; z-index: 120; right: 18px; bottom: 100px; width: 330px; display: grid; grid-template-columns: 56px 1fr; grid-template-rows: auto auto 3px; gap: 6px 12px; align-items: center; padding: 12px; border: 1px solid #ff4d6a77; border-radius: 16px; background: #120c10f2; backdrop-filter: blur(16px); box-shadow: 0 20px 50px #000c, 0 0 28px #ff1f4744; }
.tt-mini[hidden] { display: none; }
.tt-mini > img { grid-row: 1 / 3; width: 56px; height: 56px; border-radius: 10px; object-fit: cover; background: #2a0c16; }
.tt-mini-text { min-width: 0; }
.tt-mini-text strong, .tt-mini-text span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tt-mini-text strong { color: #fff; font-size: 13px; }
.tt-mini-text span { color: #a99aa2; font-size: 11px; }
.tt-mini-controls { display: flex; align-items: center; gap: 4px; }
.tt-mini-controls .round-play { width: 38px; height: 38px; min-width: 38px; }
.tt-mini-controls .round-play svg { width: 16px; height: 16px; }
.tt-mini-progress { grid-column: 1 / -1; height: 3px; border-radius: 3px; background: #3a2530; overflow: hidden; }
.tt-mini-progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #f6334c, #f2ece6); box-shadow: 0 0 8px #ff2e4d; }
body.tt-mini-on #global-player { display: none !important; }
body.tt-pip { margin: 0; background: #0a090b; }
body.tt-pip .tt-mini { position: static; width: auto; height: 100vh; border-radius: 0; border: 0; box-shadow: none; box-sizing: border-box; }

/* ── Upload: automatic technical details ── */
.tt-tech:empty { display: none; }
.tt-tech { margin-top: 6px; padding: 14px; border: 1px solid #3f2a33; border-radius: 12px; background: #141015; }
.tt-tech h3 { font-size: 14px; }
.tt-tech p { font-size: 11.5px; margin: 2px 0 10px; }
.tt-tech dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin: 0; }
.tt-tech dl div { padding: 8px 10px; border-radius: 9px; background: #1d1519; }
.tt-tech dt { color: #a99aa2; font-size: 10.5px; }
.tt-tech dd { margin: 2px 0 0; color: #fff; font-weight: 700; font-size: 13px; }

/* ── Account, settings, about ── */
.tt-account-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 14px; align-items: start; }
.tt-account-grid > .action-row { grid-column: 1 / -1; }
.tt-account-photo { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; }
.tt-account-photo .profile-avatar { width: 76px; height: 76px; font-size: 24px; }
.tt-account-photo .profile-avatar img, .tt-profile-banner .profile-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.tt-member-form { display: grid; gap: 10px; margin-top: 10px; }
.tt-member-form small { color: #a99aa2; font-size: 11px; }
.tt-muted { color: #a99aa2; font-size: 12px; }
.tt-settings, .tt-about { max-width: 760px; display: grid; gap: 10px; margin-bottom: 14px; }
.tt-settings small { color: #a99aa2; }
.tt-about-mark { width: 70px; height: 90px; object-fit: contain; filter: drop-shadow(0 0 14px #f6334c55); }
.tt-lead { font-size: 16px; color: #fff; }

/* ── Calm mode ── */
body.tt-calm *, body.tt-calm *::before, body.tt-calm *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
@media (prefers-reduced-motion: reduce) { .tt-mark .m { animation: none; } }

/* ── Mobile ── */
@media (max-width: 970px) { .tt-quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) {
  .topbar { position: sticky; top: 0; }
  .tt-toasts { top: 60px; }
  .tt-home-now { grid-template-columns: 96px 1fr; gap: 14px; padding: 13px; }
  .tt-home-now-art { width: 96px; }
  .tt-home-now .button { font-size: 10px; min-height: 38px; padding: 8px 10px; }
  .tt-genre-rail, .tt-playlist-rail { grid-auto-columns: minmax(150px, 70%); }
  .global-player { height: 70px; }
  .global-control { flex-direction: row; }
  .tt-seek, #player-shuffle, #player-repeat, #volume-range, #goto-theatre { display: none; }
  .tt-transport { gap: 2px; }
  .volume-control { gap: 0; }
  .tt-mini { left: 10px; right: 10px; width: auto; bottom: 74px; }
  .tt-menu { position: fixed; top: 58px; right: 10px; left: 10px; width: auto; }
  .floating-feedback { bottom: 146px; }
}
.tt-home-now-text { min-width: 0; }
.tt-home-now h2 { overflow-wrap: anywhere; }
