* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

:root {
  --bg: #050505;
  --bg-soft: #0a0a0a;
  --text: #ffffff;
  --text-2: rgba(255, 255, 255, 0.6);
  --text-3: rgba(255, 255, 255, 0.4);
  --border: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.15);
  --r-sm: 8px;
  --r-btn: 10px;
  --r-pill: 999px;
  --nav-h: 64px;
  --mini-h: 72px;
}

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 400;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

body { padding-top: var(--nav-h); padding-bottom: 0; }

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(600px circle at 0% 0%, rgba(255,255,255,0.04), transparent 60%),
    radial-gradient(600px circle at 100% 100%, rgba(255,255,255,0.03), transparent 60%);
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img { display: block; max-width: 100%; }

.app-bg { position: fixed; inset: 0; z-index: -1; background: #050505; }

#splash-screen {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 45%, #1a1a1a 0%, #050505 70%);
  transition: opacity 0.35s ease-out, visibility 0.35s ease-out;
}
#splash-screen.hide { opacity: 0; visibility: hidden; pointer-events: none; }

.splash-logo {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: rgba(0,0,0,0.8);
  border: 2px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 0 40px rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.splash-logo img {
  width: 90%;
  height: 90%;
  object-fit: cover;
  object-position: center;
  border-radius: 50%;
  display: block;
}

.splash-title { margin-top: 26px; font-weight: 900; font-size: 15px; letter-spacing: 4px; color: #fff; }
.splash-sub { margin-top: 6px; font-size: 11px; color: rgba(255,255,255,0.4); letter-spacing: 2px; text-transform: uppercase; min-height: 14px; transition: opacity 0.3s ease; }
.splash-bar { margin-top: 26px; width: 120px; height: 2px; border-radius: 2px; background: rgba(255,255,255,0.12); overflow: hidden; }
.splash-bar i { display: block; height: 100%; width: 40%; background: linear-gradient(90deg, transparent, #ffffff, transparent); animation: splashBar 1.4s ease-in-out infinite; }
@keyframes splashBar { 0% { transform: translateX(-100%); } 100% { transform: translateX(250%); } }

.wrap { position: relative; z-index: 1; width: 100%; max-width: none; margin: 0; padding: 0; }

.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  background: rgba(5,5,5,0.85);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-in { width: 100%; height: 100%; padding: 0 32px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #fff;
  flex-shrink: 0;
}
.logo img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  flex-shrink: 0;
  border: 1px solid var(--border-strong);
  background: rgba(255,255,255,0.03);
  overflow: hidden;
}
.logo span b { color: #ffffff; font-weight: 900; }

.nav-menu { display: flex; gap: 28px; list-style: none; font-size: 13px; letter-spacing: 0.5px; font-weight: 600; color: var(--text-2); }
.nav-menu a { transition: color 0.2s ease; position: relative; cursor: pointer; padding: 6px 0; }
.nav-menu a:hover, .nav-menu a.active { color: #fff; }
.nav-menu a.active::after {
  content: ""; position: absolute; left: 50%; bottom: 0;
  transform: translateX(-50%);
  width: 6px; height: 6px; border-radius: 50%;
  background: #ffffff; box-shadow: 0 0 8px rgba(255,255,255,0.6);
}

.nav-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.icon-btn {
  width: 40px; height: 40px; border-radius: var(--r-btn);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-2); transition: all 0.2s ease; cursor: pointer; flex-shrink: 0;
}
.icon-btn:hover { color: #ffffff; border-color: var(--border-strong); background: rgba(255,255,255,0.05); }
.icon-btn svg { width: 18px; height: 18px; stroke-width: 2.5; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
.mobile-toggle { display: none; }

.mobile-menu {
  display: none; position: fixed; top: var(--nav-h); left: 0; right: 0; z-index: 99;
  background: rgba(5,5,5,0.97);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  flex-direction: column; gap: 4px;
}
.mobile-menu.open { display: flex; }
.mobile-menu a { font-size: 14px; letter-spacing: 1px; text-transform: uppercase; color: var(--text-2); padding: 12px 0; cursor: pointer; font-weight: 600; }
.mobile-menu a:hover { color: #fff; }

#main-area { padding-bottom: 180px; min-height: calc(100vh - var(--nav-h)); }

.spotify-hero { position: relative; padding: 40px 32px 24px; overflow: hidden; }
.spotify-hero-gradient {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.10) 0%, rgba(255,255,255,0.02) 60%, transparent 100%);
  pointer-events: none;
}
.spotify-hero-content { position: relative; max-width: 1800px; margin: 0 auto; }
.spotify-greeting { font-size: 32px; font-weight: 900; letter-spacing: -0.5px; color: #fff; margin-bottom: 20px; }
.spotify-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; -ms-overflow-style: none; }
.spotify-chips::-webkit-scrollbar { display: none; }
.spotify-chip {
  flex-shrink: 0;
  padding: 8px 18px;
  border-radius: var(--r-pill);
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.08);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.spotify-chip:hover { background: rgba(255,255,255,0.20); transform: scale(1.02); }

.spotify-main { max-width: 1800px; margin: 0 auto; padding: 24px 32px 40px; }
.spotify-rows { display: flex; flex-direction: column; gap: 40px; }
.spotify-row { width: 100%; overflow: hidden; }
.spotify-row-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 16px; gap: 16px; }
.spotify-row-head h2 { font-size: 22px; font-weight: 800; letter-spacing: -0.4px; color: #fff; }
.spotify-row-more {
  font-size: 11px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase;
  color: rgba(255,255,255,0.5); cursor: pointer; transition: color 0.2s ease;
}
.spotify-row-more:hover { color: #fff; }

.spotify-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
  padding: 4px 4px 12px;
  width: 100%;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.spotify-grid::-webkit-scrollbar { display: none; }

.spotify-card {
  flex: 0 0 180px;
  width: 180px;
  min-width: 180px;
  max-width: 180px;
  scroll-snap-align: start;
  padding: 14px;
  border-radius: var(--r-sm);
  background: rgba(255,255,255,0.03);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.spotify-card:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.08);
}
.spotify-card-img {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--r-sm);
  overflow: hidden;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #1a1a1a, #0a0a0a);
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  display: block;
  line-height: 0;
}
.spotify-card-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}
.spotify-card-play {
  position: absolute;
  bottom: 8px; right: 8px;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: #fff;
  color: #050505;
  border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.25s ease;
  box-shadow: 0 8px 20px rgba(0,0,0,0.5);
  pointer-events: auto;
  z-index: 5;
}
.spotify-card-play svg { width: 20px; height: 20px; margin-left: 2px; pointer-events: none; }
.spotify-card:hover .spotify-card-play { opacity: 1; transform: translateY(0); }
.spotify-card-play:hover { background: #e5e5e5; transform: scale(1.05); }

.spotify-card-title {
  font-size: 14px; font-weight: 700; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 4px;
}
.spotify-card-artist {
  font-size: 12px; color: rgba(255,255,255,0.5);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.spotify-skel { flex: 0 0 180px; width: 180px; min-width: 180px; pointer-events: none; }
.skel-img { background: rgba(255,255,255,0.04); animation: skelPulse 1.4s ease-in-out infinite; }
.skel-line { height: 10px; border-radius: 4px; background: rgba(255,255,255,0.06); margin-bottom: 6px; animation: skelPulse 1.4s ease-in-out infinite; }
.skel-line.short { width: 60%; }
@keyframes skelPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

.search-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  align-items: start;
  grid-auto-rows: min-content;
}
.search-card {
  cursor: pointer;
  transition: transform 0.2s ease;
  padding: 12px;
  border-radius: var(--r-sm);
  background: rgba(255,255,255,0.02);
  border: 1px solid transparent;
  display: flex;
  flex-direction: column;
}
.search-card:hover { background: rgba(255,255,255,0.06); transform: translateY(-2px); }
.search-card-img {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--r-sm);
  overflow: hidden;
  margin-bottom: 10px;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, #1a1a1a, #0a0a0a);
  display: block;
  line-height: 0;
}
.search-card-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}
.search-card-title {
  font-size: 14px; font-weight: 700; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.search-card-sub {
  font-size: 12px; color: var(--text-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-top: 2px;
}

.filter-btn {
  padding: 8px 18px;
  border-radius: var(--r-pill);
  font-size: 13px; font-weight: 700;
  color: var(--text-3);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  cursor: pointer;
  transition: all 0.2s ease;
}
.filter-btn:hover { color: #fff; background: rgba(255,255,255,0.10); }
.filter-btn.active { background: #fff; color: #050505; border-color: #fff; }

#mini-player {
  position: fixed !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  z-index: 95 !important;
  background: #000 !important;
  border-top: 1px solid rgba(255,255,255,0.08) !important;
  padding: 10px 16px !important;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
#mini-player.show,
#mini-player[style*="display: block"] {
  transform: translateY(0);
}
#mini-player img {
  display: block;
  object-fit: cover;
}
#mini-player button {
  pointer-events: auto !important;
  position: relative;
  z-index: 10;
}
#mini-player button *,
#mini-player svg,
#mini-player svg * {
  pointer-events: none !important;
}
#mini-player input[type="range"] {
  height: 4px;
  cursor: pointer;
}
#mini-player input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
}
#mini-player input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: none;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
}

#mini-play-btn,
#mini-prev-btn,
#mini-next-btn,
#mini-vol-btn {
  pointer-events: auto !important;
  cursor: pointer !important;
}
#mini-play-btn *,
#mini-prev-btn *,
#mini-next-btn *,
#mini-vol-btn * {
  pointer-events: none !important;
}

#mini-cover {
  border-radius: 6px !important;
  object-fit: cover !important;
}

#full-player {
  position: fixed !important;
  inset: 0 !important;
  z-index: 170 !important;
  background: #050505 !important;
  display: none;
  flex-direction: column;
  padding: 16px 20px 20px;
  overflow: hidden;
}
#full-player button {
  pointer-events: auto !important;
  position: relative;
  z-index: 10;
}
#full-player button *,
#full-player svg,
#full-player svg * {
  pointer-events: none !important;
}
#full-player input[type="range"] {
  height: 4px;
  cursor: pointer;
}
#full-player input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
}
#full-player input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: none;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
}

#fp-play-btn,
#fp-prev-btn,
#fp-next-btn,
#fp-shuffle,
#fp-repeat {
  pointer-events: auto !important;
  cursor: pointer !important;
}
#fp-play-btn *,
#fp-prev-btn *,
#fp-next-btn *,
#fp-shuffle *,
#fp-repeat * {
  pointer-events: none !important;
}

#fp-cover {
  border-radius: 14px !important;
}

#fp-mini-cover {
  border-radius: 6px !important;
  object-fit: cover !important;
}

#pPlayBtn {
  pointer-events: auto !important;
  cursor: pointer !important;
}
#pPlayBtn * {
  pointer-events: none !important;
}

.lyric-line {
  transition: opacity 0.35s ease, transform 0.35s ease, color 0.35s ease;
  font-size: 1.45rem; font-weight: 800;
  color: rgba(255,255,255,0.35);
  opacity: 0.4;
  padding: 10px 0;
  line-height: 1.35;
  letter-spacing: -0.02em;
  cursor: pointer;
  text-align: left;
  transform-origin: left center;
}
.lyric-line.active-lyric { opacity: 1 !important; color: #ffffff !important; transform: scale(1.06) translateX(4px); }
.lyric-line.past-lyric { opacity: 0.28 !important; color: rgba(255,255,255,0.4) !important; transform: scale(0.97); }
.lyric-translation { display: block; font-size: 0.58em; font-weight: 500; opacity: 0.75; margin-top: 4px; letter-spacing: 0; line-height: 1.35; color: inherit; }

.inline-lyric-line {
  transition: opacity 0.25s ease, color 0.25s ease;
  font-size: 0.92rem; line-height: 1.4; font-weight: 600;
  color: rgba(255,255,255,0.4);
  opacity: 0.5; padding: 5px 0;
  cursor: pointer; text-align: left; word-break: break-word;
}
.inline-lyric-line.active-lyric { opacity: 1 !important; color: #ffffff !important; font-weight: 800 !important; }
.inline-lyric-line.past-lyric { opacity: 0.3 !important; color: rgba(255,255,255,0.35) !important; }

#lyrics-content { padding-top: 35vh; padding-bottom: 50vh; }

.viewer-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: #050505;
  display: none; flex-direction: column;
}

.hidden { display: none !important; }
.hide-scrollbar::-webkit-scrollbar { display: none; }
.hide-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

.user-avatar,
.user-avatar img,
.msg-avatar,
.msg-avatar img,
.profile-avatar,
.profile-avatar img,
img[src*="logo-web"] {
  border-radius: 50% !important;
  overflow: hidden;
}

@media (max-width: 1024px) {
  .spotify-hero { padding: 32px 24px 20px; }
  .spotify-main { padding: 20px 24px 40px; }
  .nav-in { padding: 0 24px; }
  .search-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
  .logo img { width: 42px; height: 42px; }
  .splash-logo { width: 150px; height: 150px; }
}

@media (max-width: 768px) {
  :root { --nav-h: 60px; }
  .nav-menu { display: none; }
  .mobile-toggle { display: flex; }
  .nav-in { padding: 0 16px; }
  .spotify-greeting { font-size: 24px; margin-bottom: 16px; }
  .spotify-row-head h2 { font-size: 18px; }
  .spotify-hero { padding: 24px 16px 16px; }
  .spotify-main { padding: 16px 16px 40px; }
  .spotify-rows { gap: 28px; }
  .spotify-grid { gap: 12px; padding: 4px 0 10px; }
  .spotify-card, .spotify-skel {
    flex: 0 0 148px; width: 148px; min-width: 148px; max-width: 148px;
    padding: 10px;
  }
  .spotify-card-play { opacity: 1; transform: translateY(0); width: 40px; height: 40px; }
  .spotify-card-play svg { width: 16px; height: 16px; }
  .search-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
  .search-card { padding: 10px; }
  #main-area { padding-bottom: 170px; }

  .logo img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
  }

  .splash-logo {
    width: 140px;
    height: 140px;
    border-radius: 50%;
  }
}

@media (max-width: 480px) {
  .nav-in { padding: 0 12px; }
  .logo { font-size: 12px; letter-spacing: 2px; }
  .logo img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
  }
  .spotify-greeting { font-size: 22px; }
  .spotify-chip { padding: 6px 14px; font-size: 12px; }
  .spotify-row-head h2 { font-size: 16px; }
  .spotify-row-more { font-size: 10px; }
  .spotify-grid { gap: 10px; }
  .spotify-card, .spotify-skel {
    flex: 0 0 132px; width: 132px; min-width: 132px; max-width: 132px;
    padding: 8px;
  }
  .spotify-card-title { font-size: 12px; }
  .spotify-card-artist { font-size: 10px; }
  .search-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .search-card { padding: 8px; }
  .search-card-title { font-size: 12px; }
  .search-card-sub { font-size: 10px; }
  .lyric-line { font-size: 1.15rem; }
  .lyric-line.active-lyric { transform: scale(1.04) translateX(2px); }
  #mini-player { padding: 8px 12px !important; }

  .splash-logo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
  }
  .splash-title { font-size: 13px; letter-spacing: 3px; }
  .splash-sub { font-size: 10px; }
}

.cookie-consent{position:fixed;left:16px;right:16px;bottom:16px;z-index:9500;max-width:520px;margin:0 auto;padding:16px 18px;border-radius:18px;background:linear-gradient(150deg,rgba(24,28,33,.96),rgba(12,15,18,.97));border:1px solid rgba(255,255,255,.13);box-shadow:0 18px 60px rgba(0,0,0,.55);display:flex;gap:14px;align-items:center;opacity:0;transform:translateY(18px);transition:opacity .26s,transform .26s cubic-bezier(.22,1,.36,1);backdrop-filter:blur(18px)}
.cookie-consent.show{opacity:1;transform:translateY(0)}
.cookie-consent-text{flex:1;min-width:0}
.cookie-consent-text b{display:block;color:#fff;font-size:13px;margin-bottom:4px}
.cookie-consent-text span{display:block;color:rgba(255,255,255,.62);font-size:11.5px;line-height:1.45}
.cookie-consent-actions{display:flex;flex-direction:column;gap:8px;flex:0 0 auto}
.cookie-btn{padding:9px 16px;border-radius:11px;border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.06);color:rgba(255,255,255,.82);font:inherit;font-size:12px;font-weight:700;cursor:pointer;transition:background .18s,filter .18s;white-space:nowrap}
.cookie-btn:hover{background:rgba(255,255,255,.12)}
.cookie-btn-yes{background:#1ed760;border-color:#1ed760;color:#061008}
.cookie-btn-yes:hover{filter:brightness(1.08);background:#1ed760}
@media(max-width:480px){.cookie-consent{flex-direction:column;align-items:stretch}.cookie-consent-actions{flex-direction:row}.cookie-btn{flex:1;text-align:center}}

.card-like{position:absolute;bottom:10px;left:10px;width:32px;height:32px;border-radius:50%;border:none;background:rgba(0,0,0,.55);backdrop-filter:blur(8px);color:#fff;display:grid;place-items:center;cursor:pointer;opacity:0;transform:translateY(4px);transition:opacity .18s,transform .18s,background .18s;z-index:3}
.card-like svg{width:15px;height:15px;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;fill:none;transition:fill .18s,stroke .18s}
.spotify-card:hover .card-like,.search-card:hover .card-like,.card-like:focus-visible{opacity:1;transform:translateY(0)}
.card-like:hover{background:rgba(0,0,0,.75)}
.card-like.liked svg{fill:#1ed760;stroke:#1ed760}
.card-like.liked{background:rgba(0,0,0,.65)}
@media(hover:none){.card-like{opacity:1;transform:none;width:30px;height:30px}}