/* Lydbølge A/B Comparison Player */

.lydbolge-ab-player {
    background: #1c383f;
    border-radius: 12px;
    margin: 32px auto;
    overflow: hidden;
    max-width: 600px;
}

/* Current Track Info - Just centered cover */
.lydbolge-ab-current {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
}

.lydbolge-ab-cover-wrap {
    position: relative;
    flex-shrink: 0;
}

.lydbolge-ab-cover {
    width: 150px;
    height: 150px;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.lydbolge-ab-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.lydbolge-ab-cover-placeholder {
    font-size: 48px;
    opacity: 0.3;
}

/* Pulsing Glow Effect - OUTSIDE cover, only when playing master (side B) */
.lydbolge-ab-cover-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 190px;
    height: 190px;
    background: radial-gradient(circle, rgba(44, 178, 187, 0.4) 0%, rgba(44, 178, 187, 0.2) 40%, transparent 70%);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 1;
    pointer-events: none;
}

.lydbolge-ab-player.mode-b.playing .lydbolge-ab-cover-glow {
    opacity: 1;
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.4;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.7;
    }
}

.lydbolge-ab-info {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
}

.lydbolge-ab-artist {
    font-size: 18px;
    color: rgba(255,255,255,0.9);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
}

/* A/B Switch - iOS Toggle Style */
.lydbolge-ab-switcher {
    padding: 0 24px 20px 24px;
    text-align: center;
}

.ab-switch-wrapper {
    background: #fff;
    border-radius: 50px;
    padding: 12px 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    margin: 0 auto;
}

.ab-label-text {
    font-size: 18px;
    font-weight: 700;
    color: #2d3e4f;
    letter-spacing: 0.5px;
}

.ab-toggle {
    position: relative;
    width: 70px;
    height: 38px;
    cursor: pointer;
    flex-shrink: 0;
}

.ab-toggle-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    background: #2d3e4f;
    border-radius: 19px;
    transition: background 0.3s;
}

.ab-toggle.mode-b .ab-toggle-bg {
    background: #1db954;
}

.ab-toggle-circle {
    position: absolute;
    width: 30px;
    height: 30px;
    background: #fff;
    border-radius: 50%;
    top: 4px;
    left: 4px;
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    animation: bounce-hint 3s ease-in-out infinite;
}

.ab-toggle.mode-b .ab-toggle-circle {
    transform: translateX(32px);
}

/* Bounce animation - slower bounces, then quickly returns */
@keyframes bounce-hint {
    0% {
        transform: translateX(0);
    }
    5% {
        transform: translateX(6px);
    }
    10% {
        transform: translateX(-2px);
    }
    15% {
        transform: translateX(5px);
    }
    20% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(0);
    }
}

.ab-toggle.mode-b .ab-toggle-circle {
    animation: none;
}

/* Controls */
.lydbolge-ab-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 24px;
    background: rgba(0,0,0,0.3);
}

/* Play Button */
#ab-play {
    width: 52px;
    height: 52px;
    background: #2cb2bb;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0;
    outline: none;
    transition: transform 0.2s, background 0.2s;
}

#ab-play:hover {
    transform: scale(1.05);
    background: #3dc5cf;
}

#ab-play::after {
    content: '▶';
    font-size: 20px;
    color: #fff;
    display: block;
    padding-left: 3px;
}

#ab-play.playing::after {
    content: '❚❚';
    padding-left: 0;
}

/* Volume Button */
#ab-volume {
    width: 40px;
    height: 40px;
    min-width: 40px;
    background: rgba(255,255,255,0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    outline: none;
    padding: 0;
    transition: background 0.2s;
}

#ab-volume:hover {
    background: #fff;
}

#ab-volume::after {
    content: '🔊';
    font-size: 16px;
}

#ab-volume.muted::after {
    content: '🔇';
}

/* Progress */
.lydbolge-ab-progress-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

.lydbolge-ab-progress {
    flex: 1;
    height: 6px;
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
}

.lydbolge-ab-progress-bar {
    height: 100%;
    background: #2cb2bb;
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s;
}

.lydbolge-ab-time {
    font-size: 13px;
    color: #fff;
    opacity: 0.8;
    min-width: 45px;
    text-align: center;
    font-weight: 500;
}

/* Volume Control */
.lydbolge-ab-volume-control {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 16px;
}

.lydbolge-ab-volume-control svg {
    color: #fff;
    opacity: 0.8;
    flex-shrink: 0;
}

#ab-volume-slider {
    width: 80px;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

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

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

#ab-volume-slider:hover::-webkit-slider-thumb {
    background: #2cb2bb;
}

#ab-volume-slider:hover::-moz-range-thumb {
    background: #2cb2bb;
}

/* Tracklist */
.lydbolge-ab-tracklist {
    padding: 12px 0;
}

.lydbolge-ab-track {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 24px;
    cursor: pointer;
    transition: background 0.2s;
}

.lydbolge-ab-track:hover {
    background: rgba(255,255,255,0.05);
}

.lydbolge-ab-track.playing {
    background: rgba(44, 178, 187, 0.15);
}

.lydbolge-ab-track-number {
    width: 24px;
    text-align: center;
    color: rgba(255,255,255,0.6);
    font-size: 15px;
    font-weight: 600;
}

.lydbolge-ab-track-info {
    flex: 1;
}

.lydbolge-ab-track-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 4px 0;
    color: #fff;
}

.lydbolge-ab-track-artist {
    font-size: 13px;
    color: rgba(255,255,255,0.6);
}

/* Track Play Button */
.lydbolge-ab-track-play {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
    transition: all 0.2s;
}

.lydbolge-ab-track-play::after {
    content: '▶';
    font-size: 16px;
    color: #1c383f;
    padding-left: 2px;
}

.lydbolge-ab-track-play:hover {
    background: #fff;
    transform: scale(1.05);
}

.lydbolge-ab-track.playing .lydbolge-ab-track-play {
    background: #2cb2bb;
}

.lydbolge-ab-track.playing .lydbolge-ab-track-play::after {
    content: '❚❚';
    color: #fff;
    padding-left: 0;
}

/* Footer */
.lydbolge-footer {
    padding: 12px 32px;
    text-align: center;
    background: rgba(0,0,0,0.2);
    border-top: 1px solid rgba(255,255,255,0.1);
}

.lydbolge-logo {
    height: 16px;
    max-height: 16px;
    width: auto;
    opacity: 1;
    transition: opacity 0.2s;
}

.lydbolge-logo:hover {
    opacity: 0.8;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .lydbolge-ab-player {
        margin: 16px 0;
        border-radius: 8px;
    }
    
    .lydbolge-ab-current {
        padding: 20px 16px 16px 16px;
    }
    
    .lydbolge-ab-cover {
        width: 120px;
        height: 120px;
    }
    
    .lydbolge-ab-cover-glow {
        width: 150px;
        height: 150px;
    }
    
    .lydbolge-ab-switcher {
        padding: 0 16px 16px 16px;
    }
    
    .ab-switch-wrapper {
        padding: 10px 20px;
        gap: 16px;
    }
    
    .ab-label-text {
        font-size: 16px;
    }
    
    .ab-toggle {
        width: 60px;
        height: 32px;
    }
    
    .ab-toggle-bg {
        border-radius: 16px;
    }
    
    .ab-toggle-circle {
        width: 24px;
        height: 24px;
        top: 4px;
    }
    
    .ab-toggle.mode-b .ab-toggle-circle {
        transform: translateX(28px);
    }
    
    .lydbolge-ab-controls {
        padding: 14px 16px;
        gap: 10px;
    }
    
    #ab-play {
        width: 48px;
        height: 48px;
        min-width: 48px;
    }
    
    #ab-play::after {
        font-size: 18px;
    }
    
    #ab-volume {
        width: 36px;
        height: 36px;
        min-width: 36px;
    }
    
    #ab-volume::after {
        font-size: 14px;
    }
    
    .lydbolge-ab-progress-wrap {
        gap: 8px;
    }
    
    .lydbolge-ab-time {
        font-size: 11px;
        min-width: 38px;
    }
    
    .lydbolge-ab-volume-control {
        display: none;
    }
    
    .lydbolge-ab-track {
        padding: 8px 16px;
        gap: 10px;
    }
    
    .lydbolge-ab-track-number {
        width: 20px;
        font-size: 14px;
    }
    
    .lydbolge-ab-track-title {
        font-size: 14px;
    }
    
    .lydbolge-ab-track-artist {
        font-size: 12px;
    }
    
    .lydbolge-ab-track-play {
        width: 36px;
        height: 36px;
    }
    
    .lydbolge-ab-track-play::after {
        font-size: 14px;
    }
    
    .lydbolge-footer {
        padding: 10px 16px;
    }
    
    .lydbolge-logo {
        height: 13px;
        max-height: 13px;
    }
}

/* Extra small devices */
@media (max-width: 400px) {
    .lydbolge-ab-title {
        font-size: 18px;
    }
    
    .ab-label {
        font-size: 10px;
    }
    
    .lydbolge-ab-track-title {
        font-size: 13px;
    }
}
