/**
 * PowerIndie Profile Sections - Dark Theme
 * Professional responsive design for clips, albums, and songs
 * Unified dark theme styling
 */

/* Profile Clips Section - Independent Container */
.profile-clips-section {
    width: 100%;
    background: linear-gradient(180deg, #121212 50%, hsla(0, 0%, 100%, 0.5)),
                linear-gradient(359.69deg, #4100f5 17.21%, #9bf0e1 99.6%);

    margin-top: 30px;

}

.clips-section-header {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
    margin-bottom: 30px;
}

.clips-section-title {
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.clips-section-title i {
    color: #9bf0e1;
}

.clips-section-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.clips-section-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.clips-grid-wrapper {
    background: rgba(18, 18, 18, 0.9);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    padding: 30px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Main Grid Layout */
.clips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    width: 100%;
}

/* Individual Clip Grid Items */
.clip-grid-item {
    position: relative;
    aspect-ratio: 9/16; /* Story/Video card aspect ratio */
    overflow: hidden;
    border-radius: 12px;
    background: #1a1a1a;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
    height: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
}


.clip-grid-item:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(65, 0, 245, 0.3);
    z-index: 2;
    border-color: rgba(155, 240, 225, 0.3);
}

/* Clip Thumbnail Container */
.clip-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a1a1a;
}

/* Clip Media */
.clip-media {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Fill the container better */
    object-position: center;
    display: block;
    transition: opacity 0.3s ease, transform 0.3s ease;
    border-radius: 0; /* Remove individual radius since container has it */
}

.clip-grid-item:hover .clip-media {
    opacity: 0.9;
    transform: scale(1.05); /* Subtle zoom on hover */
}

/* For images that need to show complete content */
.clip-media.image-fit {
    object-fit: cover; /* Changed from contain to cover for better fill */
    background: #1a1a1a;
}

/* Audio Clip Placeholder */
.audio-clip-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
}

/* Clip Overlay */
.clip-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: white;
    font-size: 2.5rem;
}

.clip-grid-item:hover .clip-overlay {
    opacity: 1;
}

/* Clip Stats */
.clip-stats {
    position: absolute;
    bottom: 8px;
    left: 8px;
    right: 8px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    opacity: 1; /* Always visible */
    transition: opacity 0.3s ease;
    z-index: 3;
}

.clip-grid-item:hover .clip-stats {
    opacity: 1;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 3px;
    background: rgba(0, 0, 0, 0.75);
    padding: 3px 6px;
    border-radius: 8px;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.stat-item i {
    font-size: 0.8rem;
    filter: brightness(1.2) saturate(1.3);
}

/* Colored icons for different stats in grid */
.stat-item i.fa-eye {
    color: #10b981; /* Views - Green */
}

.stat-item i.fa-heart {
    color: #ef4444; /* Likes - Red */
}

.stat-item i.fa-comment {
    color: #3b82f6; /* Comments - Blue */
}

.stat-item i.fa-dollar-sign,
.stat-item i.fa-coins {
    color: #f59e0b; /* Donations - Gold */
}

/* Empty State */
.clips-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    color: #666;
}

.empty-content {
    max-width: 400px;
    margin: 0 auto;
}

.empty-content i {
    font-size: 5rem;
    color: rgba(255, 255, 255, 0.3);
    margin-bottom: 25px;
    display: block;
}

.empty-content h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: #ffffff;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.empty-content p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 25px;
    line-height: 1.5;
}

.btn-upload {
    background: linear-gradient(135deg, #4100f5 0%, #9bf0e1 100%);
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(65, 0, 245, 0.3);
}

.btn-upload:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(65, 0, 245, 0.4);
    color: white;
    text-decoration: none;
    background: linear-gradient(135deg, #3600d9 0%, #85d4c9 100%);
}

/* Load More Button */
.clips-load-more {
    text-align: center;
    padding: 30px 0 0 0;
}

.btn-load-more {
    background: linear-gradient(135deg, #4100f5 0%, #9bf0e1 100%);
    border: none;
    color: white;
    padding: 15px 40px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(65, 0, 245, 0.3);
}

.btn-load-more:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(65, 0, 245, 0.4);
    background: linear-gradient(135deg, #3600d9 0%, #85d4c9 100%);
}

/* Tablet Styles */
@media (max-width: 1024px) {
    .profile-clips-section {
        padding: 30px 0;
    }
    
    .clips-section-title {
        font-size: 1.8rem;
    }
    
    .clips-section-content {
        padding: 0 15px;
    }
    
    .clips-grid-wrapper {
        padding: 20px;
        background: rgba(18, 18, 18, 0.95);
    }
    
    .clips-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 6px;
    }
    
    .clip-overlay {
        font-size: 2rem;
    }
    
    .clip-stats {
        font-size: 0.8rem;
    }
}

/* Mobile Styles */
@media (max-width: 768px) {
    .profile-clips-section {
        padding: 25px 0;
        margin-top: 20px;
    }
    
    .clips-section-header {
        padding: 0 15px;
        margin-bottom: 20px;
    }
    
    .clips-section-title {
        font-size: 1.6rem;
        flex-direction: column;
        gap: 5px;
    }
    
    .clips-section-subtitle {
        font-size: 1rem;
    }
    
    .clips-section-content {
        padding: 0 10px;
    }
    
    .clips-grid-wrapper {
        padding: 15px;
        border-radius: 8px;
        background: rgba(18, 18, 18, 0.95);
    }
    
    .clips-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 3px;
    }
    
    .clip-grid-item {
        border-radius: 6px;
    }
    
    .clip-overlay {
        font-size: 1.5rem;
        background: rgba(0, 0, 0, 0.6);
    }
    
    .clip-stats {
        font-size: 0.7rem;
        bottom: 4px;
        left: 4px;
        right: 4px;
    }
    
    .stat-item {
        padding: 2px 6px;
        border-radius: 6px;
    }
    
    .audio-clip-placeholder {
        font-size: 1.8rem;
    }
    
    .clips-empty-state {
        padding: 60px 15px;
    }
    
    .empty-content i {
        font-size: 4rem;
    }
    
    .empty-content h3 {
        font-size: 1.5rem;
        color: #ffffff;
    }
    
    .empty-content p {
        font-size: 1rem;
        color: rgba(255, 255, 255, 0.7);
    }
    
    .btn-upload {
        padding: 10px 25px;
        font-size: 0.9rem;
    }
    
    .clips-load-more {
        padding: 20px 0 0 0;
    }
    
    .btn-load-more {
        padding: 12px 30px;
        font-size: 0.9rem;
    }
}

/* Small Mobile Styles */
@media (max-width: 480px) {
    .profile-clips-section {
        padding: 20px 0;
    }
    
    .clips-section-title {
        font-size: 1.4rem;
    }
    
    .clips-section-subtitle {
        font-size: 0.9rem;
    }
    
    .clips-section-content {
        padding: 0 8px;
    }
    
    .clips-grid-wrapper {
        padding: 12px;
        background: rgba(18, 18, 18, 0.95);
    }
    
    .clips-grid {
        grid-template-columns: repeat(2, 1fr); /* Better for story aspect ratio */
        gap: 8px;
    }
    
    .clip-overlay {
        font-size: 1.2rem;
    }
    
    .clip-stats {
        font-size: 0.65rem;
        flex-wrap: wrap;
        gap: 2px;
    }
    
    .stat-item {
        padding: 2px 4px;
        border-radius: 6px;
        font-size: 0.6rem;
        min-width: auto;
    }
    
    .stat-item i {
        font-size: 0.65rem;
    }
    
    .audio-clip-placeholder {
        font-size: 1.5rem;
    }
    
    .clips-empty-state {
        padding: 50px 10px;
    }
    
    .empty-content h3 {
        font-size: 1.3rem;
        color: #ffffff;
    }
    
    .empty-content p {
        font-size: 0.9rem;
        color: rgba(255, 255, 255, 0.7);
    }
    
    .btn-upload {
        padding: 8px 20px;
        font-size: 0.85rem;
    }
    
    .btn-load-more {
        padding: 10px 25px;
        font-size: 0.85rem;
    }
}

/* Clip Detail Modal Styles */
.clip-detail-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: none;
    overflow: hidden;
}

.clip-detail-modal.show {
    display: flex;
}

.clip-detail-content {
    display: flex;
    width: 100%;
    height: 100%;
    max-width: 1200px;
    margin: 0 auto;
    background: #fff;
}

.clip-media-container {
    flex: 1;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.clip-media-container video,
.clip-media-container img {
    max-width: 70%;
    max-height: 70%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.1);
}

.clip-media-container .image-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    padding: 20px;
}

.clip-media-container .image-container img {
    max-width: 80%;
    max-height: 80%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.1);
}

.clip-media-container .video-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    padding: 20px;
}

.clip-media-container .video-container video {
    max-width: 80%;
    max-height: 80%;
    width: auto;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.clip-info-sidebar {
    width: 400px;
    background: #fff;
    display: flex;
    flex-direction: column;
    border-left: 1px solid #eee;
}

.clip-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 15px;
}

.clip-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.clip-user-info h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.clip-user-info p {
    margin: 0;
    font-size: 0.85rem;
    color: #666;
}

.clip-details {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.clip-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.clip-description {
    color: #666;
    line-height: 1.5;
    margin-bottom: 20px;
}

.clip-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: #666;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.clip-actions {
    padding: 20px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 15px;
}

.action-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.action-btn.like-btn {
    background: #ff3040;
    color: white;
}

.action-btn.like-btn:hover {
    background: #e5202f;
}


.action-btn.share-btn {
    background: #1877f2;
    color: white;
}

.action-btn.share-btn:hover {
    background: #166fe5;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: background 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 1);
}

/* Mobile Modal Styles */
@media (max-width: 768px) {
    .clip-detail-content {
        flex-direction: column;
        height: 100vh;
    }
    
    .clip-media-container {
        flex: none;
        height: 60vh;
        background: #000;
    }
    
    .clip-media-container .image-container,
    .clip-media-container .video-container {
        padding: 20px;
    }
    
    .clip-media-container .image-container img {
        max-width: 85%;
        max-height: 85%;
        width: auto;
        height: auto;
        border-radius: 4px;
    }
    
    .clip-media-container .video-container video {
        max-width: 90%;
        max-height: 90%;
        width: auto;
        height: auto;
        border-radius: 4px;
    }
    
    .clip-info-sidebar {
        width: 100%;
        height: 40vh;
        border-left: none;
        border-top: 1px solid #eee;
    }
    
    .clip-header {
        padding: 15px;
    }
    
    .clip-details {
        padding: 15px;
    }
    
    .clip-actions {
        padding: 15px;
    }
    
    .modal-close {
        top: 10px;
        right: 10px;
        background: rgba(0, 0, 0, 0.7);
        color: white;
        z-index: 1000;
    }
}