/* ========== PLAYER V2 STYLES ========== */
/* Glass Container */
.player-v2-container {
    max-width: 820px;
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(18px) saturate(180%);
    -webkit-backdrop-filter: blur(18px) saturate(180%);
    border-radius: 32px;
    padding: 24px 28px 28px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transition: all 0.25s ease;
    margin: 20px 0;
    background: #0a0a0f;
}

@media (max-width: 640px) {
    .player-v2-container {
        padding: 18px 16px 20px;
        border-radius: 24px;
    }
}

@media (max-width: 420px) {
    .player-v2-container {
        padding: 14px 12px 16px;
        border-radius: 20px;
    }
}

/* Header */
.player-v2-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px 10px;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.player-v2-header-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1 1 auto;
    min-width: 160px;
}

.player-v2-logo {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    transition: 0.2s;
}

.player-v2-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.player-v2-title {
    color: #fff;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.3px;
    line-height: 1.2;
    background: linear-gradient(135deg, #ffffff 70%, rgba(255,255,255,0.55));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

.player-v2-title small {
    display: block;
    font-weight: 400;
    font-size: 13px;
    opacity: 0.5;
    -webkit-text-fill-color: rgba(255,255,255,0.5);
    margin-top: 2px;
    letter-spacing: 0.2px;
}

/* Toggle */
.player-v2-toggle-container {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.04);
    padding: 4px;
    border-radius: 40px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
    margin-left: auto;
}

.player-v2-toggle-btn {
    position: relative;
    padding: 8px 22px;
    border: none;
    border-radius: 30px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.35);
    background: transparent;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.3, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.2px;
    user-select: none;
    white-space: nowrap;
}

.player-v2-toggle-btn .icon {
    font-size: 16px;
    transition: 0.2s;
}

.player-v2-toggle-btn:hover {
    color: rgba(255,255,255,0.65);
}

.player-v2-toggle-btn.active {
    color: #fff;
    background: rgba(108, 99, 255, 0.25);
    box-shadow: 0 4px 16px rgba(108, 99, 255, 0.15), inset 0 1px 0 rgba(255,255,255,0.08);
}

.player-v2-toggle-btn.active::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 30px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(108, 99, 255, 0.3), rgba(168, 85, 247, 0.1));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* Player Wrapper */
.player-v2-wrapper {
    margin-top: 6px;
    border-radius: 18px;
    overflow: hidden;
    transition: 0.3s;
    animation: playerV2FadeSlide 0.35s cubic-bezier(0.25, 0.1, 0.25, 1);
}

@keyframes playerV2FadeSlide {
    from { opacity: 0; transform: translateY(10px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Audio */
.audio-player-v2-wrapper {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 18px;
    padding: 18px 20px 20px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.audio-player-v2-wrapper:hover {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
}

.audio-player-v2-wrapper audio {
    width: 100%;
    display: block;
    height: 56px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
}

@media (max-width: 480px) {
    .audio-player-v2-wrapper {
        padding: 14px 14px 16px;
    }
    .audio-player-v2-wrapper audio {
        height: 48px;
    }
}

/* Video */
.video-player-v2-wrapper {
    display: none;
    border-radius: 18px;
    overflow: hidden;
    background: #0a0a12;
}

.video-player-v2-wrapper.active {
    display: block;
}

.video-player-v2-wrapper video {
    width: 100%;
    display: block;
    border-radius: 18px;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    background: #0a0a12;
}

/* Info / Status Bar */
.player-v2-info {
    margin-bottom: 14px;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 12px;
    letter-spacing: 0.2px;
}

.player-v2-title-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.player-v2-badge {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 2px 14px;
    border-radius: 30px;
    background: rgba(108, 99, 255, 0.15);
    color: #a78bfa;
    border: 1px solid rgba(108, 99, 255, 0.08);
}

.player-v2-status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.03);
    padding: 4px 16px 4px 12px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    flex-shrink: 0;
}

.player-v2-status-text {
    transition: color 0.2s;
}

/* Dot Indicator */
.player-v2-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.player-v2-dot.loading {
    background: #f87171;
    animation: playerV2BlinkRed 0.8s ease-in-out infinite;
    box-shadow: 0 0 18px rgba(248, 113, 113, 0.25);
}

.player-v2-dot.ready {
    background: #34d399;
    animation: playerV2PulseGreen 1.6s ease-in-out infinite;
    box-shadow: 0 0 16px rgba(52, 211, 153, 0.15);
}

.player-v2-dot.playing {
    background: #10b981;
    animation: playerV2PulsePlaying 1.1s ease-in-out infinite;
    box-shadow: 0 0 22px rgba(16, 185, 129, 0.25);
}

.player-v2-dot.error {
    background: rgba(255,255,255,0.12);
    animation: none;
    box-shadow: none;
}

@keyframes playerV2BlinkRed {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.2; transform: scale(0.7); }
}

@keyframes playerV2PulseGreen {
    0%, 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.2); }
    50% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); }
}

@keyframes playerV2PulsePlaying {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.3); transform: scale(1); }
    50% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); transform: scale(1.15); }
}

/* Responsive */
@media (max-width: 700px) {
    .player-v2-header {
        flex-direction: row;
        align-items: center;
        gap: 10px;
    }
    
    .player-v2-header-left {
        min-width: auto;
        flex: 1 1 auto;
    }
    
    .player-v2-title {
        font-size: 17px;
    }
    
    .player-v2-title small {
        font-size: 11px;
    }
    
    .player-v2-logo {
        width: 48px;
        height: 48px;
        border-radius: 14px;
        padding: 4px;
    }
    
    .player-v2-toggle-btn {
        padding: 6px 16px;
        font-size: 12px;
        gap: 5px;
    }
    
    .player-v2-toggle-btn .icon {
        font-size: 14px;
    }
    
    .player-v2-info {
        font-size: 12px;
        gap: 6px 10px;
    }
    
    .player-v2-status-indicator {
        font-size: 11px;
        padding: 3px 12px 3px 10px;
    }
    
    .player-v2-dot {
        width: 8px;
        height: 8px;
    }
}

@media (max-width: 480px) {
    .player-v2-title {
        font-size: 15px;
    }
    
    .player-v2-title small {
        font-size: 10px;
    }
    
    .player-v2-logo {
        width: 40px;
        height: 40px;
        border-radius: 12px;
        padding: 3px;
    }
}