/* CSS Variables */
:root {
    --amp-primary-color: #1db954;
    --amp-secondary-color: #282828;
    --amp-bg-color: #121212;
    --amp-text-color: #ffffff;
}

/* Main Player Wrapper */
.amp-player-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: var(--amp-bg-color);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    color: var(--amp-text-color);
}

/* Album Selector */
.amp-album-selector {
    margin-bottom: 30px;
}

.amp-album-select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: #1a1a1a;  /* Dark grey/black background */
    color: var(--amp-text-color);
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Player Main - Two Column Layout */
.amp-player-main {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
    align-items: start;
}

@media (max-width: 968px) {
    .amp-player-main {
        grid-template-columns: 1fr;
    }
}

/* Left Column - Artwork and Tracklist */
.amp-album-artwork {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    width: 100%;
    margin-bottom: 20px;
}

.amp-current-artwork {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.amp-no-artwork {
    width: 100%;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    font-size: 80px;
    color: rgba(255, 255, 255, 0.3);
}

/* Right Column - Controls and Info */
.amp-player-controls-section {
    display: flex;
    flex-direction: column;
    gap: 25px;
    min-height: 300px;
}

/* Now Playing Info */
.amp-now-playing {
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.amp-current-album-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--amp-text-color);
    margin: 0 0 8px;
    line-height: 1.2;
}

.amp-current-album-artist {
    font-size: 18px;
    color: var(--amp-text-color);
    opacity: 0.7;
    margin: 0;
}

/* Waveform */
.amp-waveform-container {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 20px;
}

.amp-waveform {
    height: 80px;
    cursor: pointer;
}

.amp-time-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    color: var(--amp-text-color);
    font-size: 13px;
    opacity: 0.8;
    font-variant-numeric: tabular-nums;
}

.amp-time-separator {
    margin: 0 5px;
    opacity: 0.5;
}

/* Playback Controls */
.amp-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 15px 0;
}

.amp-control-btn {
    background: transparent;
    border: none;
    color: var(--amp-text-color);
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 18px;
    position: relative;
    padding: 0;
}

.amp-control-btn i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.amp-control-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--amp-primary-color);
    transform: scale(1.1);
}

.amp-control-btn:active {
    transform: scale(0.95);
}

.amp-control-btn.active {
    color: var(--amp-primary-color);
}

.amp-control-btn.amp-primary {
    background: var(--amp-primary-color);
    color: #000;
    width: 50px;
    height: 50px;
    font-size: 22px;
}

.amp-control-btn.amp-primary:hover {
    background: var(--amp-primary-color);
    filter: brightness(1.15);
    color: #000;
    transform: scale(1.05);
}

.amp-repeat.repeat-one i::after {
    content: "1";
    position: absolute;
    font-size: 9px;
    font-weight: bold;
    bottom: 8px;
    right: 8px;
}

/* Volume Control */
.amp-volume-control {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    max-width: 200px;
}

.amp-volume-btn {
    width: 36px;
    height: 36px;
    font-size: 16px;
    flex-shrink: 0;
}

.amp-volume-slider {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.2);
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.amp-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--amp-primary-color);
    cursor: pointer;
    transition: all 0.2s ease;
}

.amp-volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 8px var(--amp-primary-color);
}

.amp-volume-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--amp-primary-color);
    cursor: pointer;
    border: none;
}

/* Tracklist - Full width below everything */
.amp-tracklist {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    overflow: hidden;
    margin-top: 30px;
    width: 100%;
}

@media (max-width: 968px) {
    .amp-tracklist {
        grid-column: 1 / -1;
        margin-top: 30px;
    }
}

/* Album Artwork */
.amp-album-artwork {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease;
    width: 100%;
    max-width: 300px;
}

.amp-album-artwork:hover {
    transform: scale(1.02);
}

.amp-current-artwork {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.amp-no-artwork {
    width: 100%;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    font-size: 80px;
    color: rgba(255, 255, 255, 0.3);
}

/* Player Controls Section */
.amp-player-controls-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Now Playing Info */
.amp-now-playing {
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.amp-current-album-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--amp-text-color);
    margin: 0 0 8px;
}

.amp-current-album-artist {
    font-size: 18px;
    color: var(--amp-text-color);
    opacity: 0.7;
    margin: 0;
}

/* Waveform */
.amp-waveform-container {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 20px;
}

.amp-waveform {
    height: 80px;
}

.amp-time-display {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    color: var(--amp-text-color);
    font-size: 13px;
    opacity: 0.8;
}

.amp-time-separator {
    margin: 0 5px;
}

/* Playback Controls */
.amp-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 20px 0;
}

.amp-control-btn {
    background: transparent;
    border: none;
    color: var(--amp-text-color);
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 18px;
}

.amp-control-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--amp-primary-color);
    transform: scale(1.1);
}

.amp-control-btn:active {
    transform: scale(0.95);
}

.amp-control-btn.active {
    color: var(--amp-primary-color);
}

.amp-control-btn.amp-primary {
    background: var(--amp-primary-color);
    color: white;
    width: 50px;
    height: 50px;
    font-size: 20px;
}

.amp-control-btn.amp-primary:hover {
    background: var(--amp-primary-color);
    filter: brightness(1.1);
    color: white;
}

.amp-repeat.repeat-one i::after {
    content: "1";
    position: absolute;
    font-size: 10px;
    font-weight: bold;
}

/* Volume Control */
.amp-volume-control {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
}

.amp-volume-btn {
    width: 35px;
    height: 35px;
    font-size: 16px;
}

.amp-volume-slider {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.2);
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.amp-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--amp-primary-color);
    cursor: pointer;
    transition: all 0.2s ease;
}

.amp-volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.amp-volume-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--amp-primary-color);
    cursor: pointer;
    border: none;
}

/* Tracklist */
.amp-tracklist {
    margin-top: 30px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    overflow: hidden;
}

.amp-tracklist-header {
    display: grid;
    grid-template-columns: 50px 1fr 80px;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--amp-text-color);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.amp-tracklist-items {
    max-height: 400px;
    overflow-y: auto;
}

.amp-tracklist-items::-webkit-scrollbar {
    width: 8px;
}

.amp-tracklist-items::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.amp-tracklist-items::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.amp-tracklist-items::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.amp-track-item {
    display: grid;
    grid-template-columns: 50px 1fr 80px;
    padding: 15px 20px;
    color: var(--amp-text-color);
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.amp-track-item:last-child {
    border-bottom: none;
}

.amp-track-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.amp-track-item.active {
    background: color-mix(in srgb, var(--amp-primary-color) 20%, transparent);
    color: var(--amp-primary-color);
}

.amp-track-item.active .amp-track-title {
    font-weight: 600;
}

.amp-track-number {
    text-align: center;
    opacity: 0.7;
}

.amp-track-title {
    padding: 0 15px;
}

.amp-track-duration {
    text-align: right;
    opacity: 0.7;
    font-size: 14px;
}

/* No Albums Message */
.amp-no-albums {
    padding: 60px 20px;
    text-align: center;
    color: var(--amp-text-color);
    opacity: 0.7;
}

/* Responsive */
@media (max-width: 968px) {
    .amp-player-main {
        grid-template-columns: 1fr;
    }
    
    .amp-album-artwork {
        max-width: 100%;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .amp-player-wrapper {
        padding: 15px;
    }
    
    .amp-current-album-title {
        font-size: 22px;
    }
    
    .amp-current-album-artist {
        font-size: 16px;
    }
    
    .amp-tracklist-header,
    .amp-track-item {
        grid-template-columns: 40px 1fr 70px;
        padding: 12px 15px;
    }
    
    .amp-controls {
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .amp-player-wrapper {
        padding: 10px;
    }
    
    .amp-controls {
        gap: 8px;
    }
    
    .amp-control-btn {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .amp-control-btn.amp-primary {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}