/* BuddyPress Custom Profile Uploads Enhanced CSS */
.field_profile-background-image{
	display:none;
}
.field_profile-music{
	display:none;
}
.field_intro-video{
		display:none;
}
.field_photo-gallery{
		display:none;
}
.bp-widget.profile-customization {
    display: none;
}
/* Profile Background Enhancement */
button#unmute_video {
    background: white;
    color: #667eea;
    border: none;
    padding: 10px 10px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    position: absolute;
    top: 3px;
    margin: 0 auto;
    left: 0;
    width: 140px;
}
button#cn_close_video {
    background: white;
    /* color: #667eea; */
  
    padding: 10px 35px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    position: absolute;
    top: 50%;
    right: 0;
    margin: 0 auto;
    left: 0;
    font-weight: bold;
    width: 150px;
}
.cn_model{
      left:0!important;
      top: 0px!important;
      width: 100%!important;
      height: 100%!important;
      position: fixed!important;
      background: rgba(0, 0, 0, 0.5)!important;
      z-index: 9999 !important; 
      display: block;
      overflow-y: scroll; 
      display: none;
    }

    .cn_model_body{
        position: relative;
    	width: 60%;
    	top: 20%;
    	left: 0px;
    	right: 0px;
    	margin: 0px auto;
    	z-index: 9999;
    	border-radius: 3px;
    }
    .cn_close {
        cursor: pointer;
        font-weight: bold;
        color: #000;
    }
svg.cn_close {
        background: #fff;
    border-radius: 15px;
    position: absolute;
        right: -12px;
    top: -10px;
    z-index: 99999999;
}
.bp-user #buddypress {
    min-height: 100vh;
    position: relative;
}

/* Ensure content remains readable over background */
.bp-user #item-header,
.bp-user #item-nav,
.bp-user #item-body {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Profile Music Player Styling */
.profile-music {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 15px;
    margin: 25px 0;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.profile-music::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(0.8); opacity: 0.5; }
    50% { transform: scale(1.2); opacity: 0.8; }
}

.profile-music h5 {
    margin-bottom: 20px;
    color: white;
    font-size: 20px;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.profile-music audio {
    width: 100%;
    max-width: 500px;
    position: relative;
    z-index: 1;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.2);
}

/* Custom audio controls styling for webkit browsers */
.profile-music audio::-webkit-media-controls-panel {
    background: rgba(255, 255, 255, 0.9);
}

/* Music waiting notice */
.music-waiting-notice,
.music-manual-notice,
.play-hint {
    margin-top: 15px;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    font-style: italic;
    text-align: center;
    animation: pulse 2s ease-in-out infinite;
}

/* Clickable music widget when autoplay fails */
.profile-music.click-to-play {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.profile-music.click-to-play:hover {
    transform: scale(1.02);
}

.profile-music .play-hint {
    font-size: 16px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.3);
    animation: bounceHint 1.5s ease-in-out infinite;
}

@keyframes bounceHint {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* Audio player waiting for video */
.profile-music audio.waiting-for-video {
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    padding: 2px;
    animation: waitingPulse 2s ease-in-out infinite;
}

@keyframes waitingPulse {
    0%, 100% { 
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
        transform: scale(1.02);
    }
}

/* Video Overlay Styling */
.video-overlay-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    z-index: 9998;
    cursor: pointer;
    animation: fadeIn 0.5s ease-out;
}

.profile-video-overlay {
    position: fixed;
    top: 52%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    z-index: 9999;
    /* border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    background: #000; */
    /* animation: slideIn 0.6s ease-out; */
}
.profile-video-overlay_video {
    /* position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    max-width: 800px;
    max-height: 80vh;
    z-index: 9999;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    background: #000; */
    width: 100%;
    max-width: 800px;
    max-height: 80vh;
      z-index: 9999;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    background: #000; 
    /* animation: slideIn 0.6s ease-out; */
}

/* Play Music Overlay */
.play-music-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 9997;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.5s ease-out;
}

.play-music-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    color: white;
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.5);
    animation: slideIn 0.6s ease-out;
}

.play-music-content h3 {
    margin: 0 0 20px 0;
    font-size: 28px;
    font-weight: 600;
}

.play-music-content p {
    margin: 15px 0 0 0;
    opacity: 0.9;
    font-size: 16px;
}

#start-profile-music {
    background: white;
    color: #667eea;
    border: none;
    padding: 15px 40px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

#start-profile-music:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    background: #f8f9fa;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* Rotating Photo Gallery */
.rotating-photo-gallery {
    background: white;
    padding: 25px;
    border-radius: 15px;
    margin: 25px 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.rotating-photo-gallery h5 {
    margin-bottom: 25px;
    color: #333;
    font-size: 20px;
    font-weight: 600;
    text-align: center;
}

.gallery-container {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
    border-radius: 15px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.1);
}

.gallery-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 2.5s ease-in-out;
    object-fit: contain;
    background-color: #f8f9fa;
}

.gallery-image.active {
    opacity: 1;
}

/* Gallery container hover effect */
.gallery-container:hover {
    box-shadow: inset 0 2px 15px rgba(0, 0, 0, 0.15);
}

/* Upload Form Enhancements */
.custom-upload-section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    margin: 25px 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.custom-upload-section h4 {
    margin-bottom: 20px;
    color: #333;
    font-size: 20px;
    font-weight: 600;
    border-bottom: 3px solid #667eea;
    padding-bottom: 15px;
    position: relative;
}

.custom-upload-section h4::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 50px;
    height: 3px;
    background: #764ba2;
}

.custom-upload-section input[type="file"] {
    display: block;
    width: 100%;
    padding: 15px;
    margin-bottom: 20px;
    border: 2px dashed #cbd5e0;
    border-radius: 10px;
    background: #f7fafc;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.custom-upload-section input[type="file"]:hover {
    border-color: #667eea;
    background: #eef2ff;
    transform: translateY(-2px);
}

.custom-upload-section input[type="file"]:focus {
    outline: none;
    border-color: #764ba2;
    box-shadow: 0 0 0 3px rgba(118, 75, 162, 0.2);
}

.upload-info {
    font-size: 14px;
    color: #718096;
    margin-bottom: 15px;
    font-style: italic;
}

/* Gallery Upload Area */
.gallery-upload-area {
    margin-top: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

#upload-gallery-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 10px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

#upload-gallery-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

#upload-gallery-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Gallery Preview Grid */
.gallery-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    margin-top: 25px;
}

.gallery-preview-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    background: white;
}

.gallery-preview-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.gallery-preview-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.gallery-preview-item .delete-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    opacity: 0;
    transform: scale(0.8);
    box-shadow: 0 2px 10px rgba(239, 68, 68, 0.3);
}

.gallery-preview-item:hover .delete-btn {
    opacity: 1;
    transform: scale(1);
}

.gallery-preview-item .delete-btn:hover {
    background: #dc2626;
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.5);
}

/* File name display */
.file-name {
    display: inline-block;
    margin-left: 15px;
    color: #4a5568;
    font-size: 14px;
    padding: 5px 10px;
    background: #e2e8f0;
    border-radius: 15px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .gallery-container {
        height: 300px;
    }
    
    .profile-video-overlay {
        width: 95%;
        max-width: 95%;
    }
    
    .gallery-preview {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 15px;
    }
    
    .gallery-preview-item img {
        height: 120px;
    }
    
    .custom-upload-section {
        padding: 20px;
    }
    
    .profile-music,
    .rotating-photo-gallery {
        padding: 20px;
    }
}

/* Loading States */
.loading {
    position: relative;
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid #f3f4f6;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Success/Error Messages */
.bp-messages {
    padding: 15px 20px;
    border-radius: 10px;
    margin: 20px 0;
    font-size: 16px;
    animation: slideDown 0.3s ease-out;
}

.bp-messages.error {
    background: #fee;
    color: #c33;
    border-left: 4px solid #c33;
}

.bp-messages.success {
    background: #efe;
    color: #383;
    border-left: 4px solid #383;
}


@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}