/* 模态框样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--ant-border);
    background: var(--ant-bg-page);
    border-radius: 16px 16px 0 0;
}

.modal-header h3 {
    font-size: 1.5rem;
    color: var(--ant-text-primary);
    margin: 0;
    background: linear-gradient(135deg, var(--ant-primary), var(--ant-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--ant-text-secondary);
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #e8eaf6;
    color: var(--ant-primary);
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--ant-border);
    background: var(--ant-bg-page);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    border-radius: 0 0 16px 16px;
}

/* 管理员表单样式 */
.admin-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-row .full-width {
    grid-column: 1 / -1;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: var(--ant-text-secondary);
    font-size: 0.95rem;
}

.form-group label i {
    color: var(--ant-primary);
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

.form-group.required label:after {
    content: " *";
    color: var(--ant-error);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 16px;
    border: 2px solid var(--ant-border);
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--ant-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

.form-hint {
    font-size: 0.85rem;
    color: var(--ant-text-secondary);
    margin-top: 4px;
}

/* 动画 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(30px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1rem 1.5rem;
    }
}

/* 个人信息页面样式 */
.profile-form {
    max-width: 700px;
    margin: 0 auto;
}

.avatar-upload {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--ant-bg-page);
    border-radius: 12px;
    border: 1px solid var(--ant-border);
}

.avatar-preview {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--ant-primary);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
}

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

.avatar-upload-controls {
    flex: 1;
}

.avatar-upload-controls h4 {
    font-size: 1.2rem;
    color: var(--ant-text-primary);
    margin-bottom: 0.5rem;
}

.avatar-upload-controls p {
    color: var(--ant-text-secondary);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.upload-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-upload {
    padding: 10px 20px;
    background: var(--ant-primary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-upload:hover {
    background: var(--ant-primary);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.btn-upload.danger {
    background: var(--ant-error);
}

.btn-upload.danger:hover {
    background: var(--ant-error);
}

/* 头像预览样式 */
.avatar-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--ant-primary), var(--ant-primary));
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 2rem;
}

/* 个人资料样式 */
.profile-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--ant-border);
}

.profile-section h3 {
    font-size: 1.3rem;
    color: var(--ant-text-primary);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--ant-bg-page);
}

.profile-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .avatar-upload {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-info-grid {
        grid-template-columns: 1fr;
    }
}