* {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }
    body {
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        sans-serif;
      background: #0d1117;
      color: #e6edf3;
      min-height: 100vh;
    }
    button {
      font-family: inherit;
      cursor: pointer;
    }
    input,
    select {
      font-family: inherit;
    }

    .app {
      display: grid;
      grid-template-columns: 280px 1fr 320px;
      grid-template-rows: auto 1fr auto;
      height: 100vh;
    }

    /* Sidebar */
    .sidebar {
      grid-row: 1 / 3;
      background: #010409;
      border-right: 1px solid #21262d;
      padding: 16px;
      overflow-y: auto;
    }
    .logo {
      color: #1db954;
      font-size: 20px;
      font-weight: 700;
      margin-bottom: 24px;
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .nav-section {
      margin-bottom: 24px;
    }
    .nav-title {
      font-size: 11px;
      text-transform: uppercase;
      color: #7d8590;
      margin-bottom: 12px;
      font-weight: 600;
      letter-spacing: 0.5px;
    }
    .nav-item {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 10px 12px;
      border-radius: 6px;
      color: #7d8590;
      cursor: pointer;
      transition: all 0.15s;
      border: none;
      background: none;
      width: 100%;
      text-align: left;
      font-size: 14px;
    }
    .nav-item:hover {
      color: #e6edf3;
      background: #21262d;
    }
    .nav-item.active {
      color: #e6edf3;
      background: #21262d;
    }
    .nav-item .icon {
      font-size: 18px;
      width: 24px;
      text-align: center;
    }
    .playlist-item {
      justify-content: space-between;
    }
    .playlist-item .name {
      flex: 1;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .playlist-item .count {
      font-size: 12px;
      color: #7d8590;
    }
    .new-playlist {
      border: 1px dashed #30363d;
      color: #7d8590;
      justify-content: center;
      margin-top: 8px;
    }
    .new-playlist:hover {
      border-color: #1db954;
      color: #1db954;
      background: transparent;
    }

    /* Main content */
    .main {
      grid-column: 2;
      overflow-y: auto;
      padding: 24px;
    }
    .main-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 24px;
    }
    .main-header h1 {
      font-size: 28px;
      font-weight: 700;
    }
    .add-form {
      display: flex;
      gap: 12px;
    }
    .add-form input {
      flex: 1;
      padding: 12px 16px;
      border: 1px solid #30363d;
      border-radius: 8px;
      background: #161b22;
      color: #e6edf3;
      font-size: 14px;
      min-width: 300px;
    }
    .add-form input:focus {
      outline: none;
      border-color: #1db954;
    }
    .add-form button {
      padding: 12px 24px;
      background: #1db954;
      color: #000;
      border: none;
      border-radius: 8px;
      font-weight: 600;
      font-size: 14px;
    }
    .add-form button:hover {
      background: #1ed760;
    }
    .add-form button:disabled {
      background: #30363d;
      color: #7d8590;
    }

    .status-bar {
      padding: 12px 16px;
      background: #161b22;
      border-radius: 8px;
      margin-bottom: 24px;
      font-size: 13px;
    }
    .status-bar.error {
      background: #3d1a1a;
      color: #f85149;
    }
    .status-bar.loading {
      background: #2d2a1a;
      color: #d29922;
    }
    .status-bar.success {
      background: #1a3d2a;
      color: #3fb950;
    }

    /* Search/Filter */
    .filter-bar {
      display: flex;
      gap: 12px;
      margin-bottom: 24px;
      flex-wrap: wrap;
    }
    .search-input {
      flex: 1;
      min-width: 200px;
      padding: 10px 16px;
      border: 1px solid #30363d;
      border-radius: 8px;
      background: #161b22;
      color: #e6edf3;
      font-size: 14px;
    }
    .search-input:focus {
      outline: none;
      border-color: #1db954;
    }
    .tag-filter {
      padding: 10px 16px;
      border: 1px solid #30363d;
      border-radius: 8px;
      background: #161b22;
      color: #e6edf3;
      font-size: 14px;
    }

    /* Tags */
    .tags {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin-top: 8px;
    }
    .tag {
      font-size: 11px;
      padding: 4px 10px;
      background: #21262d;
      border-radius: 20px;
      color: #7d8590;
      cursor: pointer;
      border: 1px solid transparent;
      transition: all 0.15s;
    }
    .tag:hover {
      border-color: #1db954;
      color: #1db954;
    }
    .tag.active {
      background: #1db954;
      color: #000;
      border-color: #1db954;
    }

    /* Album Grid */
    .album-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
      gap: 20px;
    }
    .album-card {
      background: #161b22;
      border-radius: 8px;
      padding: 16px;
      cursor: pointer;
      transition: all 0.2s;
    }
    .album-card:hover {
      background: #21262d;
      transform: translateY(-2px);
    }
    .album-card.expanded {
      grid-column: 1 / -1;
      display: grid;
      grid-template-columns: 200px 1fr;
      gap: 24px;
      cursor: default;
      position: relative;
    }
    .album-card.expanded:hover {
      transform: none;
    }
    .album-art {
      width: 100%;
      aspect-ratio: 1;
      object-fit: cover;
      border-radius: 6px;
      background: #21262d;
    }
    .album-card.expanded .album-art {
      width: 200px;
    }
    .album-info {
      margin-top: 12px;
    }
    .album-card.expanded .album-info {
      margin-top: 0;
    }
    .album-title {
      font-weight: 600;
      font-size: 14px;
      margin-bottom: 4px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .album-card.expanded .album-title {
      font-size: 24px;
      white-space: normal;
      margin-bottom: 8px;
    }
    .album-artist {
      font-size: 13px;
      color: #7d8590;
    }
    .album-card.expanded .album-artist {
      font-size: 16px;
      color: #1db954;
      margin-bottom: 16px;
    }
    .album-actions {
      display: flex;
      gap: 8px;
      margin-top: 12px;
    }
    .album-actions button {
      padding: 8px 16px;
      border-radius: 20px;
      font-size: 13px;
      font-weight: 600;
      border: none;
    }
    .btn-play {
      background: #1db954;
      color: #000;
    }
    .btn-play:hover {
      background: #1ed760;
    }
    .btn-queue {
      background: transparent;
      border: 1px solid #30363d !important;
      color: #e6edf3;
    }
    .btn-queue:hover {
      border-color: #e6edf3 !important;
    }
    .btn-remove {
      background: transparent;
      color: #f85149;
      border: 1px solid #f85149 !important;
    }

    /* Track list in expanded album */
    .track-list {
      margin-top: 16px;
    }
    .track-row {
      display: flex;
      align-items: center;
      padding: 8px 12px;
      border-radius: 4px;
      font-size: 13px;
    }
    .track-row:hover {
      background: #21262d;
    }
    .track-row.playing {
      background: #1a3d2a;
    }
    .track-num {
      width: 32px;
      color: #7d8590;
      text-align: center;
    }
    .track-row.playing .track-num {
      color: #1db954;
    }
    .track-name {
      flex: 1;
    }
    .track-duration {
      color: #7d8590;
      margin-left: 16px;
    }
    .track-add {
      opacity: 0;
      background: none;
      border: none;
      color: #7d8590;
      font-size: 16px;
      margin-left: 8px;
    }
    .track-row:hover .track-add {
      opacity: 1;
    }
    .track-add:hover {
      color: #1db954;
    }

    /* Queue Panel */
    .queue-panel {
      grid-column: 3;
      background: #010409;
      border-left: 1px solid #21262d;
      display: flex;
      flex-direction: column;
    }
    .queue-header {
      padding: 16px;
      border-bottom: 1px solid #21262d;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }
    .queue-header h2 {
      font-size: 16px;
      font-weight: 600;
    }
    .queue-tabs {
      display: flex;
      gap: 8px;
    }
    .queue-tab {
      padding: 6px 12px;
      border-radius: 4px;
      font-size: 12px;
      background: none;
      border: none;
      color: #7d8590;
    }
    .queue-tab.active {
      background: #21262d;
      color: #e6edf3;
    }
    .queue-content {
      flex: 1;
      overflow-y: auto;
      padding: 12px;
    }
    .queue-empty {
      text-align: center;
      color: #7d8590;
      padding: 40px 20px;
      font-size: 14px;
    }
    .queue-item {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 10px;
      border-radius: 6px;
      margin-bottom: 4px;
      cursor: pointer;
    }
    .queue-item:hover {
      background: #161b22;
    }
    .queue-item.playing {
      background: #1a3d2a;
    }
    .queue-item img {
      width: 48px;
      height: 48px;
      border-radius: 4px;
      object-fit: cover;
    }
    .queue-item-info {
      flex: 1;
      overflow: hidden;
    }
    .queue-item-title {
      font-size: 13px;
      font-weight: 500;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .queue-item-artist {
      font-size: 12px;
      color: #7d8590;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .queue-item-remove {
      background: none;
      border: none;
      color: #7d8590;
      opacity: 0;
      font-size: 14px;
    }
    .queue-item:hover .queue-item-remove {
      opacity: 1;
    }
    .queue-item-remove:hover {
      color: #f85149;
    }
    .queue-actions {
      padding: 12px;
      border-top: 1px solid #21262d;
      display: flex;
      gap: 8px;
    }
    .queue-actions button {
      flex: 1;
      padding: 10px;
      border-radius: 6px;
      font-size: 13px;
      font-weight: 500;
    }
    .queue-save {
      background: #1db954;
      color: #000;
      border: none;
    }
    .queue-clear {
      background: none;
      border: 1px solid #30363d;
      color: #7d8590;
    }

    /* Player Bar */
    .player-bar {
      grid-column: 1 / -1;
      background: #181818;
      border-top: 1px solid #21262d;
      padding: 12px 16px;
      display: grid;
      grid-template-columns: 280px 1fr 200px;
      gap: 16px;
      align-items: center;
    }
    .player-track {
      display: flex;
      align-items: center;
      gap: 12px;
    }
    .player-track img {
      width: 56px;
      height: 56px;
      border-radius: 4px;
      object-fit: cover;
    }
    .player-track-info {
      overflow: hidden;
    }
    .player-track-title {
      font-size: 14px;
      font-weight: 500;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .player-track-artist {
      font-size: 12px;
      color: #7d8590;
    }
    .player-controls {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 8px;
    }
    .player-buttons {
      display: flex;
      align-items: center;
      gap: 16px;
    }
    .player-btn {
      background: none;
      border: none;
      color: #7d8590;
      font-size: 20px;
      padding: 8px;
    }
    .player-btn:hover {
      color: #e6edf3;
    }
    .player-btn.play {
      width: 40px;
      height: 40px;
      border-radius: 50%;
      background: #e6edf3;
      color: #000;
      font-size: 18px;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .player-btn.play:hover {
      transform: scale(1.05);
    }
    .player-progress {
      display: flex;
      align-items: center;
      gap: 8px;
      width: 100%;
      max-width: 600px;
    }
    .player-time {
      font-size: 11px;
      color: #7d8590;
      min-width: 40px;
    }
    .progress-bar {
      flex: 1;
      height: 4px;
      background: #4d4d4d;
      border-radius: 2px;
      cursor: pointer;
      position: relative;
    }
    .progress-bar:hover {
      height: 6px;
    }
    .progress-fill {
      height: 100%;
      background: #1db954;
      border-radius: 2px;
      position: relative;
    }
    .progress-bar:hover .progress-fill::after {
      content: "";
      position: absolute;
      right: -6px;
      top: 50%;
      transform: translateY(-50%);
      width: 12px;
      height: 12px;
      background: #fff;
      border-radius: 50%;
    }
    .player-volume {
      display: flex;
      align-items: center;
      gap: 8px;
      justify-content: flex-end;
    }
    .volume-slider {
      width: 100px;
      accent-color: #1db954;
    }

    /* Modals */
    .modal-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.8);
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 1000;
    }
    .modal {
      background: #161b22;
      border-radius: 12px;
      padding: 24px;
      min-width: 400px;
      max-width: 500px;
    }
    .modal h2 {
      margin-bottom: 16px;
    }
    .modal input {
      width: 100%;
      padding: 12px;
      border: 1px solid #30363d;
      border-radius: 6px;
      background: #0d1117;
      color: #e6edf3;
      margin-bottom: 16px;
      font-size: 14px;
    }
    .modal-actions {
      display: flex;
      gap: 12px;
      justify-content: flex-end;
    }
    .modal-actions button {
      padding: 10px 20px;
      border-radius: 6px;
      font-size: 14px;
      font-weight: 500;
    }
    .modal-cancel {
      background: none;
      border: 1px solid #30363d;
      color: #e6edf3;
    }
    .modal-confirm {
      background: #1db954;
      border: none;
      color: #000;
    }

    /* View: Playlist detail */
    .playlist-header {
      display: flex;
      gap: 24px;
      margin-bottom: 32px;
      padding: 24px;
      background: linear-gradient(transparent, #161b22);
      border-radius: 8px;
    }
    .playlist-header-art {
      width: 200px;
      height: 200px;
      background: linear-gradient(135deg, #1db954 0%, #191414 100%);
      border-radius: 8px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 64px;
    }
    .playlist-header-info {
      display: flex;
      flex-direction: column;
      justify-content: flex-end;
    }
    .playlist-header-info .label {
      font-size: 12px;
      text-transform: uppercase;
      margin-bottom: 8px;
    }
    .playlist-header-info h1 {
      font-size: 48px;
      margin-bottom: 16px;
    }
    .playlist-header-info .meta {
      color: #7d8590;
      font-size: 14px;
    }
    .playlist-play-btn {
      margin-top: 24px;
      padding: 14px 32px;
      background: #1db954;
      color: #000;
      border: none;
      border-radius: 24px;
      font-size: 16px;
      font-weight: 600;
    }

    .empty-state {
      text-align: center;
      padding: 60px;
      color: #7d8590;
    }
    .empty-state .icon {
      font-size: 48px;
      margin-bottom: 16px;
    }