body {
    font-family: Arial, sans-serif;
    background-color: #f0f2f5;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
}

.container {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 400px;
    width: 100%;
}

#album-art {
    width: 200px;
    height: 200px;
    border-radius: 12px;
    margin-bottom: 16px;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.2s;
}

#album-art:hover {
    transform: scale(1.05);
}
#track-title {
    margin: 4px 0;
    font-size: 1.0rem;
    color: #333;

  line-height: 1.5em;
  max-height: 3em;      /* 2 x line-height for two lines */
  overflow: hidden;
  white-space: normal;  /* Allow wrapping */
}

audio {
    display: none;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 16px 0;
}

.controls button {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(145deg, #007bff, #0056b3);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.controls button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
    background: linear-gradient(145deg, #0056b3, #003d82);
}

.controls button:active {
    transform: scale(0.95);
}

.controls button i {
    font-size: 1.2rem;
}

#play-pause-btn {
    width: 64px;
    height: 64px;
}

#shuffle-btn.active {
    background: linear-gradient(145deg, #28a745, #1e7e34);
}

#favorite-btn.active i {
    color: #e25555;
    font-weight: bold;
}

.progress {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 16px 0;
}

#seek-bar {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    cursor: pointer;
}

#seek-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #007bff;
    cursor: pointer;
}

#seek-bar::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #007bff;
    cursor: pointer;
}

#current-time, #duration {
    font-size: 0.9rem;
    color: #555;
}

.volume {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 16px 0;
}

.volume label {
    color: #555;
}

#volume-slider {
    width: 100px;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    cursor: pointer;
}

#volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #007bff;
    cursor: pointer;
}

#volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #007bff;
    cursor: pointer;
}

#volume-value {
    font-size: 0.9rem;
    color: #555;
    min-width: 40px;
    text-align: right;
}


.genre {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 16px 0;
}

.genre label {
    color: #555;
}

#genre-select {
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    font-size: 0.9rem;
    cursor: pointer;
    transition: border-color 0.2s;
}

#genre-select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.2);
}

#favorites-list {
    margin-top: 16px;
}

#favorites-list ul {
    list-style: none;
    padding: 0;
    max-height: 150px;
    overflow-y: auto;
}

#favorites-list li {
    cursor: pointer;
    padding: 8px;
    border-bottom: 1px solid #eee;
    transition: background 0.2s;
}

#favorites-list li:hover {
    background: #f0f0f0;
}

@media (max-width: 480px) {
  .container { padding: 16px; }
  #album-art { width: 150px; height: 150px; }
}