  :root {
    --green:     #1db954;
    --green-h:   #1ed760;
    --black:     #000000;
    --bg:        #121212;
    --bg2:       #181818;
    --bg3:       #282828;
    --bg4:       #3e3e3e;
    --white:     #ffffff;
    --text:      #ffffff;
    --text2:     #b3b3b3;
    --text3:     #6a6a6a;
    --player-bg: #181818;
    --sidebar-w: 240px;
    --player-h:  90px;
    --radius:    8px;
  }
  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
  html { font-size: 16px; }
  body { font-family: 'Figtree', sans-serif; background: var(--black); color: var(--text); min-height: 100vh; overflow: hidden; }

  .app {
    display: grid;
    grid-template-columns: var(--sidebar-w) 1fr;
    grid-template-rows: 1fr var(--player-h);
    grid-template-areas: "sidebar main" "player player";
    height: 100vh;
  }

  /* SIDEBAR */
  .sidebar { grid-area: sidebar; background: var(--black); display: flex; flex-direction: column; padding: 24px 12px 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--bg4) transparent; }
  .sidebar::-webkit-scrollbar { width: 4px; }
  .sidebar::-webkit-scrollbar-thumb { background: var(--bg4); border-radius: 4px; }

  .logo { display: flex; align-items: center; gap: 10px; padding: 0 12px; margin-bottom: 24px; text-decoration: none; }
  .logo svg { width: 32px; height: 32px; fill: var(--white); flex-shrink: 0; }
  .logo span { font-size: 22px; font-weight: 800; color: var(--white); letter-spacing: -0.5px; }

  .nav-link { display: flex; align-items: center; gap: 16px; padding: 10px 12px; border-radius: var(--radius); text-decoration: none; color: var(--text2); font-weight: 600; font-size: 14px; transition: color 0.15s, background 0.15s; cursor: pointer; }
  .nav-link svg { width: 24px; height: 24px; fill: currentColor; flex-shrink: 0; }
  .nav-link:hover { color: var(--white); }
  .nav-link.active { color: var(--white); }

  .sidebar-divider { height: 1px; background: var(--bg3); margin: 8px 12px 16px; }

  .library-header { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; margin-bottom: 4px; }
  .library-header span { font-size: 14px; font-weight: 700; color: var(--text2); }
  .library-header button { background: none; border: none; color: var(--text2); cursor: pointer; padding: 4px; border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: color 0.15s, background 0.15s; }
  .library-header button:hover { color: var(--white); background: var(--bg3); }
  .library-header button svg { width: 16px; height: 16px; fill: currentColor; }

  .playlist-item { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: var(--radius); cursor: pointer; transition: background 0.15s; }
  .playlist-item:hover { background: var(--bg2); }
  .playlist-thumb { width: 42px; height: 42px; border-radius: 4px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 18px; }
  .playlist-info { overflow: hidden; }
  .playlist-info p { font-size: 14px; font-weight: 500; color: var(--white); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .playlist-info span { font-size: 12px; color: var(--text2); }

  /* MAIN */
  .main { grid-area: main; background: var(--bg); overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--bg4) transparent; position: relative; }
  .main::-webkit-scrollbar { width: 6px; }
  .main::-webkit-scrollbar-thumb { background: var(--bg4); border-radius: 4px; }

  .topbar { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; padding: 16px 32px; background: transparent; transition: background 0.3s; }
  .topbar.scrolled { background: rgba(18,18,18,0.95); backdrop-filter: blur(10px); }
  .topbar-nav { display: flex; gap: 8px; }
  .topbar-btn { width: 32px; height: 32px; border-radius: 50%; background: rgba(0,0,0,0.7); border: none; color: var(--white); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.15s; }
  .topbar-btn:hover { background: var(--bg3); }
  .topbar-btn svg { width: 18px; height: 18px; fill: currentColor; }
  .topbar-right { display: flex; align-items: center; gap: 8px; }

  .topbar-pill { padding: 8px 20px; border-radius: 500px; font-size: 14px; font-weight: 700; cursor: pointer; transition: all 0.15s; text-decoration: none; font-family: 'Figtree', sans-serif; }
  .pill-ghost { background: transparent; border: 1px solid var(--bg4); color: var(--text2); }
  .pill-ghost:hover { border-color: var(--white); color: var(--white); }
  .pill-white { background: var(--white); border: none; color: var(--black); }
  .pill-white:hover { background: #f0f0f0; transform: scale(1.04); }

  /* HERO */
  .hero { position: relative; min-height: 380px; padding: 0 32px 40px; margin-top: -80px; display: flex; align-items: flex-end; overflow: hidden; }
  .hero-bg { position: absolute; inset: 0; background: linear-gradient(180deg, #1a6b35 0%, #0f4020 50%, var(--bg) 100%); z-index: 0; }
  .hero-bg-glow { position: absolute; inset: 0; background: radial-gradient(ellipse 60% 80% at 70% 30%, rgba(29,185,84,0.3) 0%, transparent 70%); z-index: 1; }
  .hero-content { position: relative; z-index: 2; display: flex; align-items: flex-end; gap: 24px; }
  .hero-art { width: 220px; height: 220px; border-radius: var(--radius); box-shadow: 0 20px 60px rgba(0,0,0,0.6); flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 80px; background: linear-gradient(135deg,#1db954,#0a8a3a); animation: floatArt 4s ease-in-out infinite; }
  @keyframes floatArt { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
  .hero-info { padding-bottom: 8px; }
  .hero-info .label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 8px; }
  .hero-info h1 { font-size: clamp(2.5rem,5vw,5rem); font-weight: 900; line-height: 1; letter-spacing: -2px; margin-bottom: 16px; }
  .hero-info p { font-size: 14px; color: var(--text2); }
  .hero-info p span { color: var(--white); font-weight: 600; }

  /* SECTIONS */
  .section { padding: 28px 32px 0; }
  .section-header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
  .section-header h2 { font-size: 22px; font-weight: 700; }
  .section-header a { font-size: 13px; font-weight: 700; color: var(--text2); text-decoration: none; letter-spacing: 0.05em; text-transform: uppercase; transition: color 0.15s; }
  .section-header a:hover { color: var(--white); }

  .cards-scroll { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }

  .card { background: var(--bg2); border-radius: var(--radius); padding: 16px; cursor: pointer; transition: background 0.2s; position: relative; }
  .card:hover { background: var(--bg3); }
  .card-art { width: 100%; aspect-ratio: 1; border-radius: 4px; margin-bottom: 12px; display: flex; align-items: center; justify-content: center; font-size: 42px; position: relative; overflow: hidden; box-shadow: 0 8px 24px rgba(0,0,0,0.5); }
  .card-art.round { border-radius: 50%; }

  .play-fab { position: absolute; bottom: 8px; right: 8px; width: 44px; height: 44px; border-radius: 50%; background: var(--green); border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; opacity: 0; transform: translateY(8px); transition: opacity 0.2s, transform 0.2s; box-shadow: 0 8px 16px rgba(0,0,0,0.4); }
  .play-fab svg { width: 18px; height: 18px; fill: var(--black); margin-left: 2px; }
  .card:hover .play-fab { opacity: 1; transform: translateY(0); }
  .play-fab:hover { background: var(--green-h); }

  .card-title { font-size: 14px; font-weight: 700; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .card-sub { font-size: 12px; color: var(--text2); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

  /* FEATURED BANNER */
  .featured-banner { margin: 28px 32px 0; border-radius: 12px; padding: 32px; display: flex; align-items: center; gap: 32px; cursor: pointer; transition: filter 0.2s; }
  .featured-banner:hover { filter: brightness(1.08); }
  .fb-art { width: 100px; height: 100px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; font-size: 48px; flex-shrink: 0; box-shadow: 0 8px 24px rgba(0,0,0,0.4); }
  .fb-info { flex: 1; }
  .fb-label { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 6px; opacity: 0.8; }
  .fb-title { font-size: 28px; font-weight: 900; line-height: 1.1; margin-bottom: 8px; }
  .fb-sub { font-size: 14px; opacity: 0.75; }

  .fb-play { width: 56px; height: 56px; border-radius: 50%; background: var(--green); border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: transform 0.15s, background 0.15s; box-shadow: 0 8px 24px rgba(29,185,84,0.4); }
  .fb-play svg { width: 22px; height: 22px; fill: var(--black); margin-left: 3px; }
  .fb-play:hover { background: var(--green-h); transform: scale(1.08); }

  /* CATEGORY PILLS */
  .categories { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 32px 28px; }
  .cat-pill { padding: 8px 20px; border-radius: 500px; font-size: 13px; font-weight: 700; cursor: pointer; transition: all 0.15s; border: none; background: var(--bg2); color: var(--white); font-family: 'Figtree', sans-serif; }
  .cat-pill:hover { background: var(--bg3); }
  .cat-pill.active { background: var(--white); color: var(--black); }

  /* HERO CONTROLS */
  .hero-controls { display: flex; align-items: center; gap: 24px; padding: 20px 32px 0; }

  /* PLAYER */
  .player { grid-area: player; background: var(--player-bg); border-top: 1px solid rgba(255,255,255,0.1); display: flex; align-items: center; padding: 0 16px; gap: 16px; z-index: 100; }
  .player-left { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
  .now-playing-art { width: 56px; height: 56px; border-radius: 4px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 26px; }
  .now-playing-info { overflow: hidden; }
  .np-title { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .np-artist { font-size: 11px; color: var(--text2); white-space: nowrap; }

  .heart-btn { background: none; border: none; color: var(--text2); cursor: pointer; padding: 8px; display: flex; transition: color 0.15s; flex-shrink: 0; }
  .heart-btn:hover { color: var(--white); }
  .heart-btn.liked { color: var(--green); }
  .heart-btn svg { width: 16px; height: 16px; fill: currentColor; }

  .player-center { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 2; max-width: 540px; }
  .player-controls { display: flex; align-items: center; gap: 16px; }

  .ctrl-btn { background: none; border: none; color: var(--text2); cursor: pointer; padding: 6px; display: flex; align-items: center; justify-content: center; border-radius: 50%; transition: color 0.15s; }
  .ctrl-btn:hover { color: var(--white); }
  .ctrl-btn svg { width: 16px; height: 16px; fill: currentColor; }
  .ctrl-btn.active { color: var(--green); }

  .play-btn { width: 36px; height: 36px; border-radius: 50%; background: var(--white); border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: transform 0.1s; flex-shrink: 0; }
  .play-btn:hover { transform: scale(1.06); }
  .play-btn svg { width: 14px; height: 14px; fill: var(--black); margin-left: 2px; }

  .progress-bar { display: flex; align-items: center; gap: 8px; width: 100%; }
  .progress-time { font-size: 11px; color: var(--text2); font-variant-numeric: tabular-nums; min-width: 32px; text-align: center; }
  .progress-track { flex: 1; height: 4px; background: var(--bg4); border-radius: 2px; cursor: pointer; position: relative; }
  .progress-fill { height: 100%; background: var(--text2); border-radius: 2px; transition: width 0.5s linear; }
  .progress-track:hover .progress-fill { background: var(--green); }

  .player-right { display: flex; align-items: center; gap: 8px; flex: 1; justify-content: flex-end; }
  .vol-bar { display: flex; align-items: center; gap: 8px; width: 120px; }
  .vol-track { flex: 1; height: 4px; background: var(--bg4); border-radius: 2px; cursor: pointer; }
  .vol-fill { height: 100%; background: var(--text2); border-radius: 2px; width: 70%; transition: width 0.1s; }
  .vol-track:hover .vol-fill { background: var(--green); }

  .section-end { height: 32px; }

  @media (max-width: 768px) {
    .app { grid-template-columns: 1fr; grid-template-areas: "main" "player"; }
    .sidebar { display: none; }
    .hero-art { width: 140px; height: 140px; font-size: 52px; }
    .hero-info h1 { font-size: 2rem; }
    .section { padding: 20px 16px 0; }
    .featured-banner { margin: 20px 16px 0; padding: 20px; flex-wrap: wrap; }
    .categories { padding: 0 16px 20px; }
    .cards-scroll { grid-template-columns: repeat(auto-fill, minmax(140px,1fr)); gap: 12px; }
    .hero-controls { padding: 16px 16px 0; }
  }
