/* Enhanced Cover Photo Styles - Fixed Version */
.cover-image-container {
    position: relative;
    width: 100%;
    margin-bottom: 70px;
    border-radius: 10px 10px 0 0;
    overflow: hidden;
}

.cover-image {
    width: 100%;
    height: 250px;
    position: relative;
    overflow: hidden;
    background-color: rgba(0, 255, 204, 0.1);
    border-bottom: 2px solid var(--theme-color);
}

.cover-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.cover-image:hover img {
    transform: scale(1.03);
}

.cover-image-overlay {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: var(--theme-color);
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s ease;
    border: 1px solid var(--theme-color);
    font-size: 0.9rem;
    z-index: 10;
}

.cover-image:hover .cover-image-overlay {
    opacity: 1;
}

.cover-image-overlay:hover {
    background: rgba(0, 255, 204, 0.2);
}

/* Upload Progress Bar Styles */
.cover-upload-progress {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    padding: 15px;
    display: none;
    z-index: 20;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.progress-title {
    color: var(--theme-color);
    font-weight: bold;
    font-size: 0.9rem;
}

.progress-percentage {
    color: var(--theme-color);
    font-size: 0.9rem;
}

.progress-bar-container {
    width: 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--theme-color), rgba(var(--rgb-theme-color), 0.7));
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 3px;
    box-shadow: 0 0 10px rgba(var(--rgb-theme-color), 0.5);
}

.progress-status {
    color: var(--theme-color);
    font-size: 0.8rem;
    opacity: 0.8;
}

.progress-cancel {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 51, 102, 0.2);
    border: 1px solid #ff3366;
    color: #ff3366;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.2s ease;
}

.progress-cancel:hover {
    background: rgba(255, 51, 102, 0.4);
    transform: scale(1.1);
}

/* Cover Photo Crop Modal */
.cover-crop-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    z-index: 1000;
    overflow: auto;
}

.cover-crop-container {
    max-width: 900px;
    width: 90%;
    margin: 2rem auto;
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid var(--theme-color);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 0 30px rgba(var(--rgb-theme-color), 0.4);
}

.crop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(var(--rgb-theme-color), 0.3);
    padding-bottom: 1rem;
}

.crop-title {
    font-size: 1.5rem;
    color: var(--theme-color);
    font-weight: bold;
}

.crop-close {
    background: transparent;
    border: none;
    color: var(--theme-color);
    font-size: 1.5rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.crop-close:hover {
    background: rgba(var(--rgb-theme-color), 0.2);
}

.crop-canvas-container {
    position: relative;
    width: 100%;
    max-height: 400px;
    overflow: hidden;
    border: 2px solid rgba(var(--rgb-theme-color), 0.3);
    border-radius: 8px;
    margin-bottom: 1.5rem;
    background: #000;
}

.crop-canvas {
    display: block;
    max-width: 100%;
    max-height: 400px;
    margin: 0 auto;
    cursor: grab;
    background: #000;
}

.crop-canvas:active {
    cursor: grabbing;
}

/* Remove the overlay completely - no more fixed frame */
.crop-overlay {
    display: none;
}

.crop-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.crop-zoom-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.zoom-label {
    color: var(--theme-color);
    font-size: 0.9rem;
    white-space: nowrap;
}

.zoom-slider {
    width: 150px;
    height: 5px;
    background: rgba(var(--rgb-theme-color), 0.2);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
    appearance: none;
}

.zoom-slider::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--theme-color);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 5px rgba(var(--rgb-theme-color), 0.5);
    transition: all 0.2s ease;
}

.zoom-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 0 8px rgba(var(--rgb-theme-color), 0.7);
}

.zoom-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: var(--theme-color);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 5px rgba(var(--rgb-theme-color), 0.5);
}

.crop-position-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.position-btn {
    background: rgba(var(--rgb-theme-color), 0.1);
    border: 1px solid var(--theme-color);
    color: var(--theme-color);
    padding: 0.5rem 0.8rem;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.8rem;
    white-space: nowrap;
}

.position-btn:hover {
    background: rgba(var(--rgb-theme-color), 0.2);
    transform: translateY(-1px);
}

.crop-actions {
    display: flex;
    gap: 1rem;
}

.crop-btn {
    padding: 0.7rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    font-size: 0.9rem;
    white-space: nowrap;
}

.crop-btn-save {
    background: rgba(var(--rgb-theme-color), 0.15);
    border: 1px solid var(--theme-color);
    color: var(--theme-color);
}

.crop-btn-save:hover {
    background: rgba(var(--rgb-theme-color), 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.crop-btn-cancel {
    background: rgba(255, 51, 102, 0.15);
    border: 1px solid #ff3366;
    color: #ff3366;
}

.crop-btn-cancel:hover {
    background: rgba(255, 51, 102, 0.3);
    transform: translateY(-2px);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .cover-crop-container {
        width: 95%;
        padding: 1rem;
        margin: 1rem auto;
    }

    .crop-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 1.5rem;
    }

    .crop-zoom-controls,
    .crop-position-controls {
        justify-content: center;
        flex-wrap: wrap;
    }

    .crop-actions {
        justify-content: space-between;
        width: 100%;
    }

    .crop-btn {
        flex: 1;
        margin: 0 0.25rem;
    }

    .zoom-slider {
        width: 120px;
    }
}

@media (max-width: 480px) {
    .cover-crop-container {
        margin: 0.5rem auto;
        padding: 0.8rem;
    }

    .crop-header {
        margin-bottom: 1rem;
        padding-bottom: 0.8rem;
    }

    .crop-title {
        font-size: 1.2rem;
    }

    .crop-actions {
        flex-direction: column;
        gap: 0.8rem;
    }

    .crop-btn {
        margin: 0;
    }
}

/* Loading animation */
@keyframes uploading {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.uploading .progress-bar-fill {
    background: linear-gradient(90deg, var(--theme-color), rgba(var(--rgb-theme-color), 0.7), var(--theme-color));
    background-size: 200% 200%;
    animation: uploading 2s ease-in-out infinite;
}

/* Smooth canvas transitions */
.crop-canvas {
    transition: opacity 0.2s ease;
}

/* Better visual feedback for dragging */
.crop-canvas:active {
    cursor: grabbing;
    opacity: 0.9;
}

/* Zoom slider styling improvements */
.zoom-slider::-webkit-slider-track {
    background: rgba(var(--rgb-theme-color), 0.2);
    height: 5px;
    border-radius: 3px;
}

.zoom-slider::-moz-range-track {
    background: rgba(var(--rgb-theme-color), 0.2);
    height: 5px;
    border-radius: 3px;
    border: none;
}

/* Add this to your cover image CSS for smooth transitions */
.cover-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.cover-image img.loading {
    opacity: 0.7;
}

/* GIF Preview Modal Styles */
.gif-preview-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.gif-info-banner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(var(--rgb-theme-color), 0.1);
    border: 1px solid rgba(var(--rgb-theme-color), 0.3);
    border-radius: 8px;
    padding: 0.8rem;
    font-size: 0.9rem;
    color: var(--theme-color);
}

.gif-info-banner::before {
    content: "";
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2300ffcc'%3E%3Cpath d='M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    flex-shrink: 0;
}

.gif-preview-wrapper {
    position: relative;
    width: 100%;
    max-height: 300px;
    overflow: hidden;
    border: 2px solid rgba(var(--rgb-theme-color), 0.3);
    border-radius: 8px;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gif-preview-image {
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
    border-radius: 6px;
}

.gif-file-info {
    display: flex;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid rgba(var(--rgb-theme-color), 0.2);
}

.gif-info-item {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.gif-info-label {
    font-size: 0.8rem;
    opacity: 0.7;
    text-transform: uppercase;
    color: var(--theme-color);
}

.gif-info-item span:last-child {
    font-weight: bold;
    color: var(--theme-color);
}

.gif-warning {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    background: rgba(255, 153, 0, 0.1);
    border: 1px solid rgba(255, 153, 0, 0.3);
    border-radius: 8px;
    padding: 0.8rem;
    font-size: 0.85rem;
    color: #ffaa00;
    line-height: 1.4;
}

.gif-warning::before {
    content: "";
    width: 18px;
    height: 18px;
    margin-top: 0.1rem;
    flex-shrink: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffaa00'%3E%3Cpath d='M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

/* Responsive adjustments for GIF modal */
@media (max-width: 768px) {
    .gif-file-info {
        flex-direction: column;
        gap: 1rem;
    }
    
    .gif-info-item {
        align-items: center;
        text-align: center;
    }
    
    .gif-preview-wrapper {
        max-height: 250px;
    }
}

@media (max-width: 480px) {
    .gif-preview-wrapper {
        max-height: 200px;
    }
    
    .gif-warning {
        font-size: 0.8rem;
    }
}

/* Animation for GIF modal appearance */
#gifPreviewModal.show {
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* SVG Icon Styles for Crop and GIF Modals */
.crop-title {
    font-size: 1.5rem;
    color: var(--theme-color);
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Crop tool icon for regular image cropping */
.crop-title::before {
    content: "";
    width: 24px;
    height: 24px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2300ffcc'%3E%3Cpath d='M7 17h10V7h2V5h-2V3c0-.55-.45-1-1-1s-1 .45-1 1v2H7V3c0-.55-.45-1-1-1s-1 .45-1 1v2H3v2h2v10H3v2h2v2c0 .55.45 1 1 1s1-.45 1-1v-2h10v2c0 .55.45 1 1 1s1-.45 1-1v-2h2v-2h-2zM7 7h8v8H7V7z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    flex-shrink: 0;
}

/* Movie camera icon for GIF modals */
#gifPreviewModal .crop-title::before,
#gifFeedbackModal .crop-title::before {
    content: "";
    width: 24px;
    height: 24px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2300ffcc'%3E%3Cpath d='M18 3v2h-2V3H8v2H6V3H4v18h2v-2h2v2h8v-2h2v2h2V3h-2zM8 17H6v-2h2v2zm0-4H6v-2h2v2zm0-4H6V7h2v2zm8 8h-2v-2h2v2zm0-4h-2v-2h2v2zm0-4h-2V7h2v2z'/%3E%3Cpath d='M12 8.5c-1.38 0-2.5 1.12-2.5 2.5s1.12 2.5 2.5 2.5 2.5-1.12 2.5-2.5-1.12-2.5-2.5-2.5z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    flex-shrink: 0;
}

/* Info icon for banners */
.info-icon {
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2300ffcc'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    flex-shrink: 0;
}

/* Warning icon */
.warning-icon {
    width: 18px;
    height: 18px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffaa00'%3E%3Cpath d='M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    flex-shrink: 0;
}

/* Progress cancel button icon */
.progress-cancel::before {
    content: "";
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ff3366'%3E%3Cpath d='M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.profile-picture-section {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    /* Add any existing styles for this section */
}

.profile-info {
    flex-grow: 1;
    /* Keep existing styles */
}

.profile-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-left: auto; /* Push to the right */
    align-self: center; /* Center vertically */
    transform: translateY(30px); /* Move down by 15px */
}

.profile-action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(var(--rgb-theme-color), 0.1);
    border: 1px solid rgba(var(--rgb-theme-color), 0.3);
    color: var(--theme-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    min-width: 120px;
}

.profile-action-btn:hover {
    background: rgba(var(--rgb-theme-color), 0.2);
    border-color: rgba(var(--rgb-theme-color), 0.5);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(var(--rgb-theme-color), 0.2);
}

.profile-action-btn svg {
    flex-shrink: 0;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .profile-picture-section {
        flex-direction: column;
        gap: 12px;
    }
    
    .profile-actions {
        flex-direction: row;
        justify-content: center;
        margin-left: 0;
    }
    
    .profile-action-btn {
        padding: 8px;
        font-size: 0;
        min-width: auto;
    }
}

.profile-picture-section {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 2rem;
    flex-direction: row;
    position: relative;
    z-index: 5;
    margin-top: -100px;
    padding: 0 2rem;
}

.profile-info {
    flex-grow: 1;
    margin-top: 2rem;
}

.profile-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-left: auto;
    align-self: center;
    transform: translateY(30px);
    flex-shrink: 0; /* Prevent shrinking */
}

.profile-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 12px;
    background: rgba(var(--rgb-theme-color), 0.1);
    border: 1px solid rgba(var(--rgb-theme-color), 0.3);
    color: var(--theme-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    min-width: 130px;
    text-decoration: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.profile-action-btn:hover {
    background: rgba(var(--rgb-theme-color), 0.2);
    border-color: rgba(var(--rgb-theme-color), 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--rgb-theme-color), 0.2);
}

.profile-action-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.profile-action-btn svg {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

/* Tablet view adjustments */
@media (max-width: 1024px) {
    .profile-actions {
        transform: translateY(20px);
    }
    
    .profile-action-btn {
        min-width: 120px;
        font-size: 0.8rem;
        padding: 9px 10px;
    }
}

/* Mobile responsive - stacked layout */
@media (max-width: 768px) {
    .profile-picture-section {
        flex-direction: column;
        align-items: center;
        text-align: center;
        margin-top: -75px;
        gap: 15px;
        padding: 0 1rem;
    }
    
    .profile-info {
        text-align: center;
        margin-top: 0;
        order: 1; /* Profile info comes first */
    }
    
    .profile-actions {
        flex-direction: row;
        justify-content: center;
        margin-left: 0;
        transform: translateY(0);
        order: 2; /* Actions come after profile info */
        gap: 10px;
        margin-top: 15px;
        width: 100%;
    }
    
    .profile-action-btn {
        flex: 1;
        max-width: 140px;
        min-width: 110px;
        padding: 10px 8px;
        font-size: 0.75rem;
    }
    
    .profile-action-btn svg {
        width: 14px;
        height: 14px;
    }
}

/* Small mobile screens - icon-only buttons */
@media (max-width: 480px) {
    .profile-picture-section {
        padding: 0 0.5rem;
    }
    
    .profile-actions {
        gap: 8px;
        justify-content: space-evenly;
    }
    
    .profile-action-btn {
        flex: 1;
        max-width: 50px;
        min-width: 45px;
        padding: 12px 8px;
        font-size: 0; /* Hide text */
        border-radius: 50%; /* Make circular */
        aspect-ratio: 1; /* Keep square/circular */
        position: relative;
    }
    
    .profile-action-btn span {
        display: none; /* Hide text completely */
    }
    
    .profile-action-btn svg {
        width: 18px;
        height: 18px;
        margin: 0; /* Remove gap since text is hidden */ 
        transform: translateX(7px);
    }
    
    /* Add tooltips for small screens */
    .profile-action-btn::after {
        content: attr(title);
        position: absolute;
        bottom: -35px;
        left: 50%;
        transform: translateX(-50%);
        background: rgba(0, 0, 0, 0.8);
        color: var(--theme-color);
        padding: 4px 8px;
        border-radius: 4px;
        font-size: 0.7rem;
        white-space: nowrap;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 10;
        pointer-events: none;
    }
    
    .profile-action-btn:hover::after {
        opacity: 1;
        visibility: visible;
        bottom: -30px;
    }
}

/* Very small screens */
@media (max-width: 360px) {
    .profile-action-btn {
        max-width: 44px;
        min-width: 40px;
        padding: 10px 6px;
    }
    
    .profile-action-btn svg {
        width: 16px;
        height: 16px;
    }
}

/* Ensure proper spacing and alignment */
.profile-picture {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 3px solid var(--theme-color);
    overflow: hidden;
    position: relative;
    background: rgba(0, 0, 0, 0.8);
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

@media (max-width: 768px) {
    .profile-picture {
        width: 120px;
        height: 120px;
    }
}

@media (max-width: 480px) {
    .profile-picture {
        width: 100px;
        height: 100px;
    }
}