  :root {
    --main-bg: #f4f4f9;
    --text-color: #333;
    --sidebar-bg: #fff;
    --search-input-bg: #fff;
    --search-input-border: #ddd;
    --settings-button-bg: #fff;
    --settings-button-border: #ddd;
    --album-art-bg: #ddd;
    --player-bg: #fff;
    --progress-container-bg: #e0e0e0;
    --progress-bar-bg: #6200ee;
  }

  body.custom-theme {
    --main-bg: var(--custom-main-bg, var(--main-bg));
    --sidebar-bg: var(--custom-sidebar-bg, var(--sidebar-bg));
    --search-input-bg: var(--custom-search-input-bg, var(--search-input-bg));
    --settings-button-bg: var(--custom-settings-button-bg, var(--settings-button-bg));
    --player-bg: var(--custom-player-bg, var(--player-bg));
    --progress-container-bg: var(--custom-progress-container-bg, var(--progress-container-bg));
    --progress-bar-bg: var(--custom-progress-bar-bg, var(--progress-bar-bg));
  }

  body { 
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    height: 100vh;
    overflow: hidden;
    background: var(--main-bg);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
  }
  body.dark-mode {
    --main-bg: #121212;
    --text-color: #fff;
    --sidebar-bg: #1e1e1e;
    --search-input-bg: #333;
    --search-input-border: #444;
    --settings-button-bg: #333;
    --settings-button-border: #444;
    --player-bg: #1e1e1e;
    --progress-bar-bg: #bb86fc;
  }
  body.nebula-mode {
    --main-bg: #1a1a2e;
    --text-color: #e94560;
    --sidebar-bg: #16213e;
    --search-input-bg: #16213e;
    --search-input-border: #e94560;
    --settings-button-bg: #16213e;
    --settings-button-border: #e94560;
    --player-bg: #16213e;
    --progress-bar-bg: #e94560;
  }
  body.sunset-mode {
    --main-bg: #2c3e50;
    --text-color: #f39c12;
    --sidebar-bg: #34495e;
    --search-input-bg: #34495e;
    --search-input-border: #f39c12;
    --settings-button-bg: #34495e;
    --settings-button-border: #f39c12;
    --player-bg: #34495e;
    --progress-bar-bg: #f39c12;
  }

  .sidebar {
    width: 100%;
    background-color: var(--sidebar-bg);
    overflow-y: auto;
    padding: 20px;
    padding-bottom: 140px;
    transition: background-color 0.3s ease;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .sidebar::-webkit-scrollbar { display: none; }

  .search-bar { margin-bottom: 20px; padding-right: 70px; position: relative; }
  .search-bar input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--search-input-border);
    border-radius: 8px;
    font-size: 14px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    height: 40px;
    box-sizing: border-box;
    background-color: var(--search-input-bg);
    color: var(--text-color);
  }

  .settings-button {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    background-color: var(--settings-button-bg);
    border: 1px solid var(--settings-button-border);
    border-radius: 8px;
    color: #6200ee;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    height: 40px;
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, border-color 0.3s ease;
  }
  .settings-button:hover { background-color: rgba(0, 0, 0, 0.1); }

  .album-section { margin-bottom: 20px; }  
  .album-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
    cursor: pointer;
  }
  
  .album-header .material-icons {
    transition: transform 0.3s ease;
  }
  
  .album-header.collapsed .material-icons {
    transform: rotate(-90deg);
  }
  
  .track-list {
    display: none;
    flex-direction: column;
    gap: 10px;
  }
  
  .album-section.expanded .track-list {
    display: flex;
  }
  
  .album-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  
  .album-artist {
    font-size: 12px;
    color: #666;
  }
  
  body.dark-mode .album-artist {
    color: #bbb;
  }
  
  body.nebula-mode .album-artist {
    color: #e94560;
  }
  
  body.sunset-mode .album-artist {
    color: #f39c12;
  }
  .track-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
  }
  .album-art {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    background-color: var(--album-art-bg);
    background-size: cover;
    background-position: center;
  }
  .album-title { font-size: 18px; font-weight: 500; }
  .track-item:hover { background-color: #f0f0f0; }
  body.dark-mode .track-item:hover { background-color: #333; }
  body.nebula-mode .track-item:hover { background-color: #16213e; }
  body.sunset-mode .track-item:hover { background-color: #34495e; }
  .track-item.active { background-color: #6200ee; color: #fff; }
  .track-item.active .track-info p { color: #fff; }
  body.nebula-mode .track-item.active { background-color: #e94560; }
  body.sunset-mode .track-item.active { background-color: #f39c12; }
  .track-number { width: 30px; font-size: 14px; text-align: center; }
  .track-info { flex: 1; }
  .track-info h4 { margin: 0; font-size: 14px; }
  .track-info p { margin: 0; font-size: 12px; color: #666; }
  body.dark-mode .track-info p { color: #bbb; }
  body.nebula-mode .track-info p { color: #e94560; }
  body.sunset-mode .track-info p { color: #f39c12; }

  .player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--player-bg);
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
    padding: 10px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: background-color 0.3s ease;
  }
  .apple-pwa .player { margin-bottom: env(safe-area-inset-bottom, 20px); }

  .player-top { display: flex; align-items: center; gap: 20px; }
  .album-art-player {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    background-color: var(--album-art-bg);
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
  }
  .track-details { flex: 1; text-align: left; min-width: 0; }
  .track-details h3 {
    margin: 0;
    font-size: 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .track-details p {
    margin: 0;
    font-size: 14px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  body.dark-mode .track-details p { color: #bbb; }
  body.nebula-mode .track-details p { color: #e94560; }
  body.sunset-mode .track-details p { color: #f39c12; }

  .controls {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
  }
  .controls button {
    background: none;
    border: none;
    cursor: pointer;
    color: #6200ee;
    font-size: 24px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  body.dark-mode .controls button { color: #bb86fc; }
  body.nebula-mode .controls button { color: #e94560; }
  body.sunset-mode .controls button { color: #f39c12; }

  .progress-container {
    width: 100%;
    background-color: var(--progress-container-bg);
    border-radius: 5px;
    height: 5px;
    position: relative;
    cursor: pointer;
  }
  .progress-bar {
    background-color: var(--progress-bar-bg);
    border-radius: 5px;
    height: 100%;
    width: 0%;
    transition: width 0.1s ease;
  }
  .time {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #666;
    margin-top: 5px;
  }
  body.dark-mode .time { color: #bbb; }
  body.nebula-mode .time { color: #e94560; }
  body.sunset-mode .time { color: #f39c12; }

  .settings-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: left;
    align-items: left;
    z-index: 1000;
  }
  .settings-menu-content {
    background-color: #fff;
    border-radius: 0 12px 12px 0;
    padding: 20px;
    width: 300px;
    text-align: left;
    transition: background-color 0.3s ease;
    font-family: 'Inter', sans-serif;
  }
  body.dark-mode .settings-menu-content { background-color: #1e1e1e; }
  body.nebula-mode .settings-menu-content { background-color: #16213e; }
  body.sunset-mode .settings-menu-content { background-color: #34495e; }
  .settings-menu-content h3 {
    margin: 0 0 20px;
    font-size: 18px;
    color: #333;
  }
  body.dark-mode .settings-menu-content h3 { color: #fff; }
  body.nebula-mode .settings-menu-content h3 { color: #e94560; }
  body.sunset-mode .settings-menu-content h3 { color: #f39c12; }
  .settings-menu-content button {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #333;
    transition: color 0.3s ease;
    width: 100%;
    padding: 10px;
    border-radius: 8px;
  }
  body.dark-mode .settings-menu-content button { color: #fff; }
  body.nebula-mode .settings-menu-content button { color: #e94560; }
  body.sunset-mode .settings-menu-content button { color: #f39c12; }
  .settings-menu-content button:hover { background-color: #f0f0f0; }
  body.dark-mode .settings-menu-content button:hover { background-color: #333; }
  body.nebula-mode .settings-menu-content button:hover { background-color: #16213e; }
  body.sunset-mode .settings-menu-content button:hover { background-color: #34495e; }

  .color-circle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #ddd;
  }
  .light-circle { background-color: #f4f4f9; }
  .dark-circle { background-color: #121212; }
  .nebula-circle { background-color: #1a1a2e; }
  .sunset-circle { background-color: #2c3e50; }

  #apply-custom-css,
  #apply-custom-colors {
    font-family: 'Inter', sans-serif;
    background-color: #6200ee;
    color: #fff;
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 10px;
    transition: background-color 0.3s ease;
  } 
  #apply-custom-css:hover,
  #apply-custom-colors:hover { background-color: #4e00c8; }
  body.dark-mode #apply-custom-css,
  body.dark-mode #apply-custom-colors { background-color: #bb86fc; }
  body.dark-mode #apply-custom-css:hover,
  body.dark-mode #apply-custom-colors:hover { background-color: #9b70e3; }
  body.nebula-mode #apply-custom-css,
  body.nebula-mode #apply-custom-colors { background-color: #e94560; }
  body.nebula-mode #apply-custom-css:hover,
  body.nebula-mode #apply-custom-colors:hover { background-color: #d13f55; }
  body.sunset-mode #apply-custom-css,
  body.sunset-mode #apply-custom-colors { background-color: #f39c12; }
  body.sunset-mode #apply-custom-css:hover,
  body.sunset-mode #apply-custom-colors:hover { background-color: #d07a0b; }

  .btn {
    font-family: 'Inter', sans-serif;
    background-color: #6200ee;
    color: #fff;
    padding: 10px 15px;
    border-radius: 8px;
    text-decoration: none;
    display: inline-block;
    margin-top: 10px;
    transition: background-color 0.3s ease;
  }
  .btn:hover { background-color: #4e00c8; }
button { font-family: 'Inter', sans-serif; }
  #custom-theme-dropdown {
    font-family: 'Inter', sans-serif;
    background-color: #fff;
    color: #333;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ddd;
    width: 100%;
    margin-bottom: 10px;
    transition: background-color 0.3s ease, color 0.3s ease;
  }
  body.dark-mode #custom-theme-dropdown { background-color: #333; color: #fff; border-color: #444; }
  body.nebula-mode #custom-theme-dropdown { background-color: #16213e; color: #e94560; border-color: #e94560; }
  body.sunset-mode #custom-theme-dropdown { background-color: #34495e; color: #f39c12; border-color: #f39c12; }
