.rptc-player-dark {
    --bg-color: #2a2a2e;
    --text-color: #ffffff;
    --text-color-muted: #b3b3b3;
    --border-color: #404044;
    --slider-track-color: #4d4d52;
    --slider-thumb-color: #ffffff;
    --shadow-color: rgba(0,0,0,0.5);

    background-color: var(--bg-color);
    color: var(--text-color);
    border-radius: 8px;
    padding: 16px;
    font-family: 'Roboto', sans-serif;
    max-width: 520px;
    margin: 16px auto;
    box-shadow: 0 4px 12px var(--shadow-color);
}

.rptc-header {
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 12px;
}

.rptc-station {
    font-size: 16px;
    font-weight: 500;
    margin: 0;
    text-align: left;
    color: var(--text-color-muted);
}

.rptc-body {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.rptc-artwork {
    width: 80px;
    height: 80px;
    border-radius: 5px;
    object-fit: cover;
    overflow: hidden;
}

.rptc-artwork-img {
    width: 100%;
    height: 100%;
    border-radius: 5px;
    object-fit: cover;
}

.rptc-track-info {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.rptc-title {
    font-size: 16px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rptc-artist {
    font-size: 14px;
    color: var(--text-color-muted);
    margin-bottom: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rptc-progress {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-color-muted);
}

.rptc-slider-container {
    position: relative;
    flex: 1;
    height: 20px;
    display: flex;
    align-items: center;
}

.rptc-progress .rptc-slider-container {
    height: 4px;
    position: relative;
    overflow: hidden;
}

.rptc-progress .rptc-slider-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 4px;
    background-color: #9ca3af;
    border-radius: 2px;
    width: var(--progress-width, 0%);
    transition: width 0.1s ease;
    z-index: 1;
}

.rptc-player-dark input[type="range"] {
    padding: 0;
}

.rptc-progress-bar {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    background: transparent;
    outline: none;
    position: absolute;
    margin: 0;
    z-index: 2;
}

.rptc-volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    background: transparent;
    outline: none;
    position: absolute;
    margin: 0;
}

.rptc-progress-bar-fill {
    height: 4px;
    border-radius: 2px;
    position: absolute;
    top: 0;
    left: 0;
    background-color: #9ca3af;
    z-index: 1;
    width: var(--progress-width, 0%);
    transition: width 0.1s ease;
}

.rptc-volume-slider-fill {
    height: 4px;
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 0;
    background-color: var(--slider-thumb-color);
}

.rptc-progress-bar::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: linear-gradient(to right, #9ca3af 0%, #9ca3af var(--progress-width, 0%), #404044 var(--progress-width, 0%), #404044 100%);
    border-radius: 2px;
}

.rptc-volume-slider::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: var(--slider-track-color);
    border-radius: 2px;
}

.rptc-progress-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 0;
    height: 0;
    background: transparent;
    cursor: pointer;
    margin-top: -8px;
}

.rptc-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    background: var(--slider-thumb-color);
    border-radius: 50%;
    cursor: pointer;
    margin-top: -4px;
}

/* Firefox styles */
.rptc-progress-bar::-moz-range-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: linear-gradient(to right, #9ca3af 0%, #9ca3af var(--progress-width, 0%), #404044 var(--progress-width, 0%), #404044 100%);
    border-radius: 2px;
    border: none;
}

.rptc-progress-bar::-moz-range-thumb {
    width: 0;
    height: 0;
    background: transparent;
    border: none;
    cursor: pointer;
}

.rptc-volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: var(--slider-thumb-color);
    border-radius: 50%;
    border: none;
    cursor: pointer;
}

.rptc-footer {
    display: flex;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
    margin-bottom: 12px;
}

.rptc-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    flex-shrink: 0;
}

.rptc-play-pause-btn {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
}

.rptc-play-pause-btn svg {
    width: 36px;
    height: 36px;
}

.rptc-volume-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.volume-icon {
    color: var(--text-color-muted);
    cursor: pointer;
    transition: color 0.2s ease;
}

.volume-icon:hover {
    color: var(--text-color);
}

.rptc-volume-container .rptc-slider-container {
    width: 120px;
}

.rptc-tabs {
    display: flex;
    justify-content: space-around;
    padding-top: 12px;
}

.rptc-tabs button {
    background: none;
    border: none;
    color: var(--text-color-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

.rptc-tabs button:hover {
    color: var(--text-color);
}

.rptc-tabs button.active {
    color: var(--primary-color, #6750A4);
    background: rgba(var(--primary-color-rgb, 103, 80, 164), 0.1);
    border-radius: 8px;
}

.rptc-tabs svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Shimmer Loading Effect */
@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

/* Offline state styles */
.rptc-offline {
    opacity: 0.7;
}

.rptc-offline .rptc-artwork {
    filter: grayscale(100%);
}

.rptc-offline .rptc-title {
    color: #ef4444;
}

.rptc-offline .rptc-artist {
    color: #6b7280;
}

.rptc-offline .rptc-play-pause-btn {
    opacity: 0.5;
    cursor: not-allowed;
}

.rptc-offline .rptc-play-pause-btn:hover {
    transform: none;
}

.rptc-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rptc-offline-indicator {
    background: #ef4444;
    color: white;
    padding: 2px 6px;
    border-radius: 5px;
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
    display: none;
}

.rptc-offline-indicator.show {
    display: block;
}

/* Album art shimmer and offline states */
.rptc-artwork {
    position: relative;
    background: #2a2a2e;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    overflow: hidden;
}

.rptc-artwork.no-image {
    background: linear-gradient(90deg, 
        #2a2a2e 25%, 
        #3a3a3e 50%, 
        #2a2a2e 75%);
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite linear;
    border-radius: 5px;
}

.rptc-artwork.offline-icon {
    background: #2a2a2e;
    color: #6b7280;
    border-radius: 5px;
}

.rptc-artwork.offline-icon svg {
    width: 48px;
    height: 48px;
    opacity: 0.6;
    border-radius: 5px;
}

.rptc-shimmer {
    background: linear-gradient(90deg, 
        var(--shimmer-bg, #3a3a3e) 25%, 
        var(--shimmer-highlight, #4a4a4e) 50%, 
        var(--shimmer-bg, #3a3a3e) 75%);
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

.rptc-shimmer-text {
    height: 16px;
    margin-bottom: 8px;
}

.rptc-shimmer-text.short {
    width: 60%;
}

.rptc-shimmer-text.medium {
    width: 80%;
}

.rptc-shimmer-text.long {
    width: 100%;
}

.rptc-shimmer-artwork {
    width: 80px;
    height: 80px;
    border-radius: 5px;
}

.rptc-shimmer-progress {
    height: 4px;
    width: 100%;
    margin: 0 8px;
}

.rptc-shimmer-time {
    height: 12px;
    width: 30px;
}

/* Loading states with shimmer overlays */
.rptc-loading .rptc-title::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 16px;
    background: linear-gradient(90deg, 
        var(--shimmer-bg, #3a3a3e) 25%, 
        var(--shimmer-highlight, #4a4a4e) 50%, 
        var(--shimmer-bg, #3a3a3e) 75%);
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    width: 80%;
}

.rptc-loading .rptc-artist::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 16px;
    background: linear-gradient(90deg, 
        var(--shimmer-bg, #3a3a3e) 25%, 
        var(--shimmer-highlight, #4a4a4e) 50%, 
        var(--shimmer-bg, #3a3a3e) 75%);
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    width: 60%;
}

.rptc-loading .rptc-artwork::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 80px;
    height: 80px;
    background: linear-gradient(90deg, 
        var(--shimmer-bg, #3a3a3e) 25%, 
        var(--shimmer-highlight, #4a4a4e) 50%, 
        var(--shimmer-bg, #3a3a3e) 75%);
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 5px;
}

.rptc-loading .rptc-elapsed::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 30px;
    height: 12px;
    background: linear-gradient(90deg, 
        var(--shimmer-bg, #3a3a3e) 25%, 
        var(--shimmer-highlight, #4a4a4e) 50%, 
        var(--shimmer-bg, #3a3a3e) 75%);
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

.rptc-loading .rptc-total::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 30px;
    height: 12px;
    background: linear-gradient(90deg, 
        var(--shimmer-bg, #3a3a3e) 25%, 
        var(--shimmer-highlight, #4a4a4e) 50%, 
        var(--shimmer-bg, #3a3a3e) 75%);
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

.rptc-loading .rptc-progress-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        var(--shimmer-bg, #3a3a3e) 25%, 
        var(--shimmer-highlight, #4a4a4e) 50%, 
        var(--shimmer-bg, #3a3a3e) 75%);
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

/* Make elements positioned relative for absolute shimmer overlays */
.rptc-loading .rptc-title,
.rptc-loading .rptc-artist,
.rptc-loading .rptc-artwork,
.rptc-loading .rptc-elapsed,
.rptc-loading .rptc-total,
.rptc-loading .rptc-progress-bar {
    position: relative;
}

.rptc-loading .rptc-title,
.rptc-loading .rptc-artist {
    color: transparent;
}

.rptc-loading .rptc-artwork {
    opacity: 0;
}

.rptc-loading .rptc-elapsed,
.rptc-loading .rptc-total {
    color: transparent;
}

.rptc-loading .rptc-progress-bar {
    opacity: 0;
}

/* Mobile Responsive */
@media (max-width: 767.98px) {
    .rptc-player-dark {
        margin: 12px auto;
        padding: 12px;
    }
    
    .rptc-tabs {
        flex-direction: column;
        gap: 8px;
    }
    
    .rptc-tabs button {
        padding: 12px 16px;
        min-height: 48px;
        justify-content: center;
        font-size: 14px;
    }
    
    .rptc-tabs svg {
        width: 28px !important;
        height: 28px !important;
    }
}

/* Slider Border Radius - Specific Rules */
.rptc-progress .rptc-slider-container {
    background-color: #404044;
    border-radius: 5px;
}

.rptc-progress-bar-fill {
    border-radius: 5px;
}

.rptc-volume-slider-fill {
    border-radius: 5px;
}

.rptc-progress-bar {
    border-radius: 5px;
}

.rptc-volume-slider {
    border-radius: 5px;
}

.rptc-progress-bar::-webkit-slider-runnable-track {
    border-radius: 5px;
}

.rptc-volume-slider::-webkit-slider-runnable-track {
    border-radius: 5px;
}

.rptc-progress-bar::-moz-range-track {
    border-radius: 5px;
}

.rptc-volume-slider::-moz-range-track {
    border-radius: 5px;
}