/* Avatar Upload Modal */
.avatar-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 4000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.avatar-modal-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
    width: 500px;
    max-width: 90vw;
    animation: slideIn 0.4s ease;
    overflow: hidden;
}

.avatar-header {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.avatar-header h3 {
    color: white;
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.avatar-header i {
    margin-right: 8px;
    color: #ffc107;
}

.avatar-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.avatar-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.avatar-body {
    padding: 30px;
    text-align: center;
}

.avatar-preview {
    width: 128px;
    height: 128px;
    border-radius: 50%;
    margin: 0 auto 20px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.avatar-placeholder {
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
}

.avatar-placeholder i {
    font-size: 40px;
    margin-bottom: 8px;
    display: block;
}

.avatar-placeholder p {
    margin: 0;
    font-size: 12px;
}

.avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.avatar-upload-area {
    margin: 20px 0;
}

.btn-select {
    background: rgba(255, 255, 255, 0.2);
    border: 2px dashed rgba(255, 255, 255, 0.5);
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-select:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.8);
    transform: translateY(-2px);
}

.btn-delete {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: 10px;
}

.btn-delete:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(231, 76, 60, 0.4);
}

.upload-hint {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    margin: 10px 0 0 0;
}

.avatar-crop {
    margin-top: 20px;
}

#avatar-canvas {
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: white;
    margin-bottom: 15px;
}

.crop-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.btn-avatar {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-avatar:hover {
    background: linear-gradient(45deg, #ee5a24, #ff6b6b);
    transform: translateY(-1px);
}

/* Responsive */
@media (max-width: 768px) {
    .avatar-modal-content {
        width: 400px;
        margin: 20px;
    }
    
    .avatar-preview {
        width: 100px;
        height: 100px;
    }
    
    #avatar-canvas {
        width: 100px;
        height: 100px;
    }
}
